Compare commits

..

No commits in common. "f089d62e63b249710e9ffa34f3eb8aac0842d38c" and "c62983d97738a66c484c2c8288d09cbd993481d6" have entirely different histories.

3 changed files with 40 additions and 53 deletions

View File

@ -22,7 +22,7 @@ if (theme !== null) {
} }
theme_switcher.addEventListener("click", () => { theme_switcher.addEventListener("click", () => {
if (theme_switcher.getAttribute("title").indexOf("off") !== -1) { if (theme_switcher.textContent.indexOf("off") !== -1) {
changeToDarkTheme(); changeToDarkTheme();
} else { } else {
changeToLightTheme(); changeToLightTheme();
@ -30,7 +30,7 @@ theme_switcher.addEventListener("click", () => {
}); });
function changeToDarkTheme() { function changeToDarkTheme() {
theme_switcher.setAttribute("title", "turn the light on"); theme_switcher.textContent = "turn the light on";
document.documentElement.style.setProperty("--border", "var(--dark-border)"); document.documentElement.style.setProperty("--border", "var(--dark-border)");
document.documentElement.style.setProperty("--text", "var(--dark-text)"); document.documentElement.style.setProperty("--text", "var(--dark-text)");
document.documentElement.style.setProperty("--bg", "var(--dark-bg)"); document.documentElement.style.setProperty("--bg", "var(--dark-bg)");
@ -41,7 +41,7 @@ function changeToDarkTheme() {
} }
function changeToLightTheme() { function changeToLightTheme() {
theme_switcher.setAttribute("title", "turn the light off"); theme_switcher.textContent = "turn the light off";
document.documentElement.style.setProperty("--border", "var(--light-border)"); document.documentElement.style.setProperty("--border", "var(--light-border)");
document.documentElement.style.setProperty("--text", "var(--light-text)"); document.documentElement.style.setProperty("--text", "var(--light-text)");
document.documentElement.style.setProperty("--bg", "var(--light-bg)"); document.documentElement.style.setProperty("--bg", "var(--light-bg)");
@ -84,10 +84,12 @@ window.addEventListener("resize", () => {
} }
}); });
main.addEventListener("click", () => { main.addEventListener("click", (event) => {
if (sections_button.getAttribute("opened") === "true") { if (sections_button.getAttribute("opened") === "true") {
closeMenu(); closeMenu();
} }
}); });
// DEBUG;
console.log(window.innerWidth);
console.log(window.innerHeight);

View File

@ -40,6 +40,7 @@ h2 {
font-size: 2rem; font-size: 2rem;
} }
p { p {
font-size: 1.5rem; font-size: 1.5rem;
} }

View File

@ -5,7 +5,9 @@
--dark-text: #ffffff; --dark-text: #ffffff;
--dark-bg: #181715; --dark-bg: #181715;
--dark-border: #ffffff; --dark-border: #ffffff;
--hightlight: #72dec2; --hightlight: #72dec2;
--border: var(--light-border); --border: var(--light-border);
--text: var(--light-text); --text: var(--light-text);
--bg: var(--light-bg); --bg: var(--light-bg);
@ -86,24 +88,10 @@ a:focus {
} }
#logo { #logo {
font-size: 2.5rem; font-size: 3rem;
font-weight: bold; font-weight: bold;
font-variant: small-caps;
} }
#theme-switcher {
border: 3px solid var(--border);
width: 1.5rem;
height: 1.5rem;
border-radius: 3rem;
margin-left: auto;
background: linear-gradient(90deg, var(--border) 0%, var(--border) 50%, var(--bg) 51%, var(--bg) 100%);
}
#theme-switcher:hover {
border-color: var(--hightlight);
background: linear-gradient(90deg, var(--hightlight) 0%, var(--hightlight) 50%, var(--bg) 51%, var(--bg) 100%);
}
.account, .account,
.sections, .sections,
#sections-menu { #sections-menu {
@ -118,10 +106,37 @@ a:focus {
pointer-events: none; pointer-events: none;
} }
@media screen and (max-height: 860px),
screen and (max-width: 1500px) {
#mesh {
display: none;
}
}
@media screen and (max-width: 1160px) {
.sections {
display: none;
}
#sections-button {
display: block !important;
}
}
.links { .links {
display: flex; display: flex;
} }
@media screen and (max-width: 540px) {
#logo {
font-size: 2.2rem;
}
.links {
display: none;
}
}
#sections-button { #sections-button {
display: none; display: none;
} }
@ -141,6 +156,8 @@ a:focus {
display: none; display: none;
} }
.copyleft a, .copyleft a,
.sections a { .sections a {
margin: 0 1rem 0 0; margin: 0 1rem 0 0;
@ -164,37 +181,4 @@ button {
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
margin: 0 2rem 0 0; margin: 0 2rem 0 0;
cursor: pointer;
}
@media screen and (max-height: 860px),
screen and (max-width: 1500px) {
#mesh {
display: none;
}
}
@media screen and (max-width: 1160px) {
.sections {
display: none;
}
#sections-button {
display: block !important;
}
}
@media screen and (max-width: 540px) {
#logo {
font-size: 2.2rem;
}
.links {
display: none;
}
header,
footer {
padding: 0 1rem;
}
} }