added lightmode for footer, box shadows for header and paddings for main element

This commit is contained in:
Patrick Schwarzer 2025-05-10 03:52:29 +02:00
parent d7093ad4f0
commit d355176be1
3 changed files with 43 additions and 7 deletions

View file

@ -24,10 +24,14 @@ header {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.075);
} }
body.light-mode header { body.light-mode header {
background-color: #ffffff; background-color: #ffffff;
} }
header.scrolled {
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.logo a { .logo a {
color: white; color: white;
@ -106,7 +110,13 @@ footer {
background-color: rgb(27, 31, 34); background-color: rgb(27, 31, 34);
padding: 48px 0px; padding: 48px 0px;
width: 100%; width: 100%;
border-top: 1px solid #222222;
} }
body.light-mode footer {
background-color: #eeeeee;
border-top: 1px solid #d8d8d8;
}
footer .links { footer .links {
display: flex; display: flex;
align-items: center; align-items: center;
@ -130,19 +140,34 @@ footer a {
border-radius: 50%; border-radius: 50%;
text-decoration: none; text-decoration: none;
} }
footer a:hover {
background-color: rgb(20, 23, 26);
}
body.light-mode footer a {
background-color: rgb(231, 231, 231);
color: rgb(29, 29, 29);
}
body.light-mode footer a:hover {
background-color: rgb(192, 192, 192);
}
footer p { footer p {
color: rgb(216, 216, 216); color: rgb(216, 216, 216);
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 14px;
justify-self: center; justify-self: center;
} }
body.light-mode footer p {
color: #242424;
}
/* /*
MAIN MAIN
*/ */
main { main {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; padding-top: 32px;
margin: 72px auto 0 auto; /* Top margin matches header height */
} }

View file

@ -17,7 +17,7 @@
<ul> <ul>
<li> <li>
<a href="#home">Home</a> <a href="#">Home</a>
</li> </li>
<li> <li>
<a href="#showcase">Showcase</a> <a href="#showcase">Showcase</a>
@ -36,7 +36,7 @@
<main> <main>
<section id="home"> <section id="home">
<div class="home-container"> <div class="home-container">
<p>Software Developer</p>
</div> </div>
</section> </section>
<section id="showcase"> <section id="showcase">
@ -58,10 +58,10 @@
<footer> <footer>
<div class="links"> <div class="links">
<a href="#"><i class='fab fa-discord'></i></a> <a href="https://discord.gg/APgmsfA9Ae"><i class='fab fa-discord'></i></a>
<a href="#"><i class="fa-brands fa-github"></i></a> <a href="https://github.com/pschwarzer20"><i class="fa-brands fa-github"></i></a>
<a href="#"><i class="fa-brands fa-git-alt"></i></a> <a href="https://git.tarion.org/"><i class="fa-brands fa-git-alt"></i></a>
<a href="#"><i class="fa-brands fa-steam"></i></a> <a href="https://steamcommunity.com/profiles/76561198119267753/"><i class="fa-brands fa-steam"></i></a>
</div> </div>
<p>&copy 2025 Tarion. All rights reserved.</p> <p>&copy 2025 Tarion. All rights reserved.</p>
</footer> </footer>

View file

@ -22,4 +22,15 @@ document.addEventListener("DOMContentLoaded", () => {
darkModeButton.addEventListener("click", () => { darkModeButton.addEventListener("click", () => {
toggleDarkMode(true); toggleDarkMode(true);
}) })
// Add/remove scrolled style to header
window.addEventListener("scroll", () => {
const header = document.querySelector("header");
if (window.scrollY === 0){
header.classList.remove("scrolled");
} else {
header.classList.add("scrolled");
}
})
}) })