Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wilhelm-lenz committed Nov 29, 2023
1 parent d731748 commit 5f37743
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 323 deletions.
72 changes: 5 additions & 67 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ a {
margin-bottom: 2%;
}

.heading-primary-dark {
font-size: 6.4rem;
font-family: "Poppins-Bold";
.light .heading-primary {
color: #444;
margin-bottom: 2%;
}

.heading-secondary {
Expand All @@ -87,11 +84,8 @@ a {
font-size: 3.6rem;
}

.heading-secondary-dark {
font-family: "Poppins-Bold";
.light .heading-secondary {
color: #444;
margin-bottom: 3%;
font-size: 3.6rem;
}

.heading-tertiary {
Expand All @@ -101,11 +95,8 @@ a {
margin-bottom: 3%;
}

.heading-tertiary-dark {
.light .heading-tertiary {
color: #444;
font-family: "Poppins-Bold";
font-size: 3.2rem;
margin-bottom: 3%;
}

.light {
Expand All @@ -122,23 +113,15 @@ a {
text-align: left;
}

.heading-primary-dark {
font-size: 3rem;
text-align: left;
}

.heading-secondary {
color: #cdcdff;
margin-bottom: 8%;
font-size: 2.4rem;
text-align: left;
}

.heading-secondary-dark {
.light .heading-secondary {
color: #444;
margin-bottom: 8%;
font-size: 2.4rem;
text-align: left;
}

.heading-tertiary {
Expand All @@ -147,81 +130,36 @@ a {
text-align: left;
padding-inline: 5%;
}

.heading-tertiary-dark {
font-size: 1.8rem;
margin-block: 8%;
text-align: left;
padding-inline: 5%;
}
}

@media (min-width: 768px) and (max-width: 819px) {
.heading-primary {
font-size: 4.4rem;
}

.heading-primary-dark {
font-size: 4.4rem;
}

.heading-secondary {
color: #cdcdff;
font-size: 3rem;
margin-bottom: 0;
}

.heading-secondary-dark {
.light .heading-secondary {
color: #444;
font-size: 3rem;
margin-bottom: 0;
}

.heading-tertiary {
font-size: 2.8rem;
margin-block: 6%;
padding-inline: 5%;
}

.heading-tertiary-dark {
font-size: 2.8rem;
margin-block: 6%;
padding-inline: 5%;
}
}

@media (min-width: 1200px) and (max-width: 1439px) {
.heading-primary {
font-size: 5.2rem;
}

.heading-primary-dark {
font-size: 5.2rem;
}

.heading-tertiary {
font-size: 3rem;
}

.heading-tertiary-dark {
font-size: 3rem;
}
}

/*
// Small devices (landscape phones, 576px and up)
@media (max-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (max-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (max-width: 992px) { ... }
// X-Large devices (large desktops, 1200px and up)
@media (max-width: 1200px) { ... }
// XX-Large devices (larger desktops, 1400px and up)
@media (max-width: 1400px) { ... }
*/
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function App() {
return (
<div className={`'inline-padding' ${darkMode ? "light" : null}`}>
<Header setDarkMode={setDarkMode} darkMode={darkMode} />
<Main darkMode={darkMode} />
<Footer darkMode={darkMode} />
<Main />
<Footer />
</div>
);
}
Expand Down
32 changes: 14 additions & 18 deletions src/assets/components/button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,35 @@
transition: all 0.2s ease-out;
}

.btn-light {
font-family: "Poppins-Medium";
border: 2px solid #2978b5;
color: #2978b5;
.btn:hover,
.btn:active,
.btn:focus {
border: 2px solid #90a0d9;
color: #23283e;
font-size: 1.8rem;
padding: 1.2rem 2rem;
background-position: left;
}

.light .btn {
border: 2px solid #2978b5;
color: #2978b5;
background: linear-gradient(to left, transparent 50%, #2978b5 50%);
background-size: 200% 100%;
background-position: right bottom;
cursor: pointer;
transition: all 0.2s ease-out;
}

.btn-light:hover,
.btn-light:active,
.btn-light:focus {
.light .btn:hover,
.light .btn:active,
.light .btn:focus {
border: 2px solid #2978b5;
color: #fff;
font-size: 1.8rem;
padding: 1.2rem 2rem;
background-position: left;
}

.btn:hover,
.btn:active,
.btn:focus {
border: 2px solid #90a0d9;
color: #23283e;
font-size: 1.8rem;
padding: 1.2rem 2rem;
background-position: left;
}

@media (max-width: 567px) {
.btn {
margin-left: 5%;
Expand Down
6 changes: 2 additions & 4 deletions src/assets/components/button/Button.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import "./Button.css";

const Button = ({ contentText, darkMode }) => {
return (
<button className={darkMode ? "btn-light" : "btn"}>{contentText}</button>
);
const Button = ({ contentText }) => {
return <button className="btn">{contentText}</button>;
};

export default Button;
Loading

0 comments on commit 5f37743

Please sign in to comment.