changed breakpoints, gap in content block, theme slider bug fixed

This commit is contained in:
2026-05-13 19:37:09 +02:00
parent 35feea1d4d
commit 438f944dc1
5 changed files with 35 additions and 16 deletions
+10 -3
View File
@@ -244,16 +244,23 @@ async function loadData() {
loadData(); loadData();
function setupLangDropdown(buttonId, menuId, dropdownId, themeToggle) { function setupLangDropdown(buttonId, menuId, dropdownId, themeToggle, themeToggleOthers) {
const toggle = document.getElementById(themeToggle); const toggle = document.getElementById(themeToggle);
const toggleElements = themeToggleOthers.map(id => document.getElementById(id));
toggle.addEventListener("change", () => { toggle.addEventListener("change", () => {
document.documentElement.classList.toggle("dark", toggle.checked); document.documentElement.classList.toggle("dark", toggle.checked);
if (toggle.checked) { if (toggle.checked) {
setCookie("theme", "dark", 60 * 60 * 24 * 7); setCookie("theme", "dark", 60 * 60 * 24 * 7);
toggleElements.forEach(element => {
element.checked = true;
});
} }
else { else {
setCookie("theme", "light", 60 * 60 * 24 * 7); setCookie("theme", "light", 60 * 60 * 24 * 7);
toggleElements.forEach(element => {
element.checked = false;
});
} }
}); });
@@ -307,8 +314,8 @@ function setupLangDropdown(buttonId, menuId, dropdownId, themeToggle) {
} }
}); });
} }
setupLangDropdown("lang-button", "lang-menu", "lang-dropdown", "themeToggle"); setupLangDropdown("lang-button", "lang-menu", "lang-dropdown", "themeToggle", ["themeToggle2"]);
setupLangDropdown("lang-button2", "lang-menu2", "lang-dropdown2", "themeToggle2"); setupLangDropdown("lang-button2", "lang-menu2", "lang-dropdown2", "themeToggle2", ["themeToggle"]);
function create_navbar_entry(navbar, navbar_mobile_links, title, id, j) { function create_navbar_entry(navbar, navbar_mobile_links, title, id, j) {
const navbar_item = document.createElement("li"); const navbar_item = document.createElement("li");
+1 -1
View File
@@ -8,7 +8,7 @@
--serif: Georgia, serif; --serif: Georgia, serif;
--sans: system-ui, sans-serif; --sans: system-ui, sans-serif;
--nav-w: 230px; --nav-w: 230px;
--nav-mobile-w: 60vw; --nav-mobile-w: min(60vw, 400px);
--font-size: 1rem; --font-size: 1rem;
} }
+11 -2
View File
@@ -30,10 +30,18 @@
left: calc(var(--nav-mobile-w) * (-1)) left: calc(var(--nav-mobile-w) * (-1))
} }
@media (min-width: 1001px) { .button-mobile.no-navbar {
display: inline-block;
}
@media (min-width: 1001px) and (min-height: 701px) {
#navbar-mobile { #navbar-mobile {
display: none; display: none;
} }
.button-mobile.no-navbar {
display: none;
}
} }
#navbar-mobile-links { #navbar-mobile-links {
@@ -147,7 +155,8 @@
} }
.mobile-config .switch { .mobile-config .switch {
margin-left: 40px;; margin-left: 40px;
;
} }
.mobile-config .lang-dropdown { .mobile-config .lang-dropdown {
+4 -1
View File
@@ -10,7 +10,7 @@
} }
} }
@media (max-width: 1000px) { @media (max-width: 1000px) or (max-height: 700px) {
.main-content { .main-content {
margin-left: 0; margin-left: 0;
--margin-main-content: 20px; --margin-main-content: 20px;
@@ -42,6 +42,7 @@
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
overflow: hidden; overflow: hidden;
margin-top: -1px;
} }
.section-header { .section-header {
@@ -80,12 +81,14 @@
margin-right: var(--margin-main-content); margin-right: var(--margin-main-content);
border-left: 1px solid var(--border); border-left: 1px solid var(--border);
justify-content: left; justify-content: left;
margin-left: -0.5px;
} }
.block-image.left { .block-image.left {
margin-left: var(--margin-main-content); margin-left: var(--margin-main-content);
border-right: 1px solid var(--border); border-right: 1px solid var(--border);
justify-content: right; justify-content: right;
margin-right: -0.5px;
} }
.block-image img { .block-image img {
+1 -1
View File
@@ -14,7 +14,7 @@
--padding: 30px; --padding: 30px;
} }
@media (max-width: 1000px) { @media (max-width: 1000px) or (max-height: 700px) {
.sidebar { .sidebar {
display: none; display: none;
} }