From 3828c1b746f5e4083c5b14256d96fb7e33ba8baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Krau=C3=9Fer?= Date: Fri, 8 May 2026 04:17:44 +0200 Subject: [PATCH 1/3] mobile bar slides --- styles/mobile_bar_style.css | 3 ++- styles/projects_style.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/styles/mobile_bar_style.css b/styles/mobile_bar_style.css index 69c5c14..e890b04 100644 --- a/styles/mobile_bar_style.css +++ b/styles/mobile_bar_style.css @@ -11,10 +11,11 @@ border-right: 1px solid var(--border); gap: 10px; background: var(--bg); + transition: left 0.3s; } #navbar-mobile.inactive { - display: none; + left: calc(var(--nav-mobile-w) * (-1)) } @media (min-width: 1001px) { diff --git a/styles/projects_style.css b/styles/projects_style.css index 2f2b734..71fabfe 100644 --- a/styles/projects_style.css +++ b/styles/projects_style.css @@ -7,7 +7,7 @@ @media (max-width: 1000px) { .main-content { margin-left: 0; - --margin-main-content: 10px; + --margin-main-content: 20px; --margin-top: 30px; } } From f50d76e0331ce7e0a88f280f3a8201d1edeff4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Krau=C3=9Fer?= Date: Fri, 8 May 2026 09:12:39 +0200 Subject: [PATCH 2/3] dopdown added eventlistener --- scripts/main_page.js | 8 ++++++++ styles/main_style.css | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/main_page.js b/scripts/main_page.js index 28ada7a..77397c7 100644 --- a/scripts/main_page.js +++ b/scripts/main_page.js @@ -66,6 +66,14 @@ async function loadData() { const sidebar_top = document.getElementById("sidebar-top-content"); const navbar_mobile = document.getElementById("navbar-mobile"); + const button_mobile2 = document.getElementById("button_mobile"); + + document.addEventListener("click", (e) => { + if (!e.target.closest("navbar-mobile") && button_mobile2.classList.contains("inactive")) { + navbar_mobile.classList.add("inactive"); + } + }); + const navbar_mobile_links = document.getElementById("navbar-mobile-links"); const button_navbar_mobile = document.createElement("button"); const button_mobile = document.getElementById("button-mobile"); diff --git a/styles/main_style.css b/styles/main_style.css index 7c328b3..941d37c 100644 --- a/styles/main_style.css +++ b/styles/main_style.css @@ -8,7 +8,7 @@ --serif: Georgia, serif; --sans: system-ui, sans-serif; --nav-w: 230px; - --nav-mobile-w: 100px; + --nav-mobile-w: 200px; --font-size: 1rem; } From 2b337a848a6c02a057a573941a32428e68ef8c62 Mon Sep 17 00:00:00 2001 From: marvinkrausser Date: Fri, 8 May 2026 10:00:52 +0200 Subject: [PATCH 3/3] fixed mobile bar close event --- scripts/main_page.js | 5 +++-- styles/mobile_bar_style.css | 3 +++ styles/sidebar_style.css | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/main_page.js b/scripts/main_page.js index 77397c7..39b0c85 100644 --- a/scripts/main_page.js +++ b/scripts/main_page.js @@ -66,11 +66,12 @@ async function loadData() { const sidebar_top = document.getElementById("sidebar-top-content"); const navbar_mobile = document.getElementById("navbar-mobile"); - const button_mobile2 = document.getElementById("button_mobile"); + const button_mobile2 = document.getElementById("button-mobile"); document.addEventListener("click", (e) => { - if (!e.target.closest("navbar-mobile") && button_mobile2.classList.contains("inactive")) { + if (!e.target.closest("#navbar-mobile") && !e.target.closest("#button-mobile") && !navbar_mobile.classList.contains("inactive")) { navbar_mobile.classList.add("inactive"); + button_mobile2.classList.remove("inactive"); } }); diff --git a/styles/mobile_bar_style.css b/styles/mobile_bar_style.css index e890b04..137b30a 100644 --- a/styles/mobile_bar_style.css +++ b/styles/mobile_bar_style.css @@ -12,6 +12,9 @@ gap: 10px; background: var(--bg); transition: left 0.3s; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; } #navbar-mobile.inactive { diff --git a/styles/sidebar_style.css b/styles/sidebar_style.css index 7533646..f3ad919 100644 --- a/styles/sidebar_style.css +++ b/styles/sidebar_style.css @@ -72,6 +72,9 @@ position: relative; font-weight: normal; margin: 5px 0px 5px 0px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; } .nav-link { @@ -194,6 +197,9 @@ input:checked+.slider:before { align-items: center; border: none; background: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; } .lang-dropdown.show-border {