From bccbdb83ee80b6a3137eb67c163eb073a1cb39a7 Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 17 Nov 2026 18:28:59 +0100 Subject: [PATCH 1/5] feat: optimize images, accessibility, dark mode and legal pages - WebP images with blurred placeholders, smaller icons - self-hosted font and GSAP, jQuery removed - dark mode set before first paint, no fade on load - keyboard-friendly links and buttons, focus styles, alt texts - hardware skills, convention badge project - Impressum and Datenschutz with obfuscated contact data --- .gitattributes | 2 - .gitignore | 4 + assets/css/darkmode.css | 59 ++- assets/css/legal.css | 38 ++ assets/css/noscript.css | 4 + assets/css/style.css | 128 ++++- assets/documents/cv.pdf | Bin 78769 -> 223689 bytes assets/fonts/poppins-300.woff2 | Bin 0 -> 7844 bytes assets/fonts/poppins-400.woff2 | Bin 0 -> 7900 bytes assets/fonts/poppins-500.woff2 | Bin 0 -> 7740 bytes assets/fonts/poppins-600.woff2 | Bin 0 -> 7992 bytes assets/images/about-pic.webp | Bin 0 -> 31852 bytes assets/images/arrow-dark.png | Bin 40758 -> 2693 bytes assets/images/arrow.png | Bin 15528 -> 3405 bytes assets/images/checkmark-dark.png | Bin 44725 -> 3138 bytes assets/images/checkmark.png | Bin 18217 -> 3623 bytes assets/images/darkmode-toggle.svg | 344 +++++++++++++ assets/images/education-dark.png | Bin 17940 -> 3344 bytes assets/images/education.png | Bin 8621 -> 3807 bytes assets/images/email-dark.png | Bin 46207 -> 3301 bytes assets/images/email.png | Bin 18688 -> 3573 bytes assets/images/experience-dark.png | Bin 18632 -> 4441 bytes assets/images/experience.png | Bin 9917 -> 4823 bytes assets/images/favicon.svg | 4 + assets/images/github-dark.png | Bin 25310 -> 4377 bytes assets/images/github.png | Bin 8640 -> 4236 bytes assets/images/linkedin-dark.png | Bin 23820 -> 4106 bytes assets/images/linkedin.png | Bin 12857 -> 3813 bytes assets/images/pic1.png | Bin 182532 -> 718273 bytes assets/images/pic1.webp | Bin 0 -> 30106 bytes assets/images/project-2.webp | Bin 0 -> 9886 bytes assets/images/project-3.webp | Bin 0 -> 29622 bytes assets/images/project-pcb.webp | Bin 0 -> 78484 bytes assets/js/darkmode.js | 151 +++--- assets/js/legal.js | 18 + assets/js/script.js | 74 ++- assets/js/theme-init.js | 16 + assets/js/umami.js | 1 + assets/vendor/gsap.min.js | 11 + datenschutz.html | 124 +++++ impressum.html | 54 +++ index.html | 770 +++++++++--------------------- test.html | 47 -- 43 files changed, 1161 insertions(+), 688 deletions(-) delete mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 assets/css/legal.css create mode 100644 assets/css/noscript.css create mode 100644 assets/fonts/poppins-300.woff2 create mode 100644 assets/fonts/poppins-400.woff2 create mode 100644 assets/fonts/poppins-500.woff2 create mode 100644 assets/fonts/poppins-600.woff2 create mode 100644 assets/images/about-pic.webp create mode 100644 assets/images/darkmode-toggle.svg create mode 100644 assets/images/favicon.svg create mode 100644 assets/images/pic1.webp create mode 100644 assets/images/project-2.webp create mode 100644 assets/images/project-3.webp create mode 100644 assets/images/project-pcb.webp create mode 100644 assets/js/legal.js create mode 100644 assets/js/theme-init.js create mode 100644 assets/js/umami.js create mode 100644 assets/vendor/gsap.min.js create mode 100644 datenschutz.html create mode 100644 impressum.html delete mode 100644 test.html diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..acbfe65 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +.env +# full-size source photos, only the optimized versions are published +assets/images/originals/ diff --git a/assets/css/darkmode.css b/assets/css/darkmode.css index b6e44a6..6de5d75 100644 --- a/assets/css/darkmode.css +++ b/assets/css/darkmode.css @@ -19,6 +19,9 @@ svg { border-radius: 100px; background: #9cd6ef; border: 3px solid #65c0e7; + display: block; + padding: 0; + box-sizing: content-box; } .dayNight { @@ -32,9 +35,6 @@ svg { left: 0; } -#night { - pointer-events: none; -} #background { width: 100%; @@ -52,34 +52,49 @@ a { transition: all 1s; } -.btn-color-2.dark:hover { +/* Dark theme: one class on , set before the first paint by theme-init.js */ + +.theme-dark { + color-scheme: light dark; +} + +.theme-dark #background { + background: #0d1f2b; +} + +.theme-dark #day, +#night { + background: #224f6d; + border-color: #cad4d8; +} + +.theme-dark .btn-color-2:hover { background-color: rgb(192, 192, 192); color: black; border: 0; } -.btn-color-2.dark { +.theme-dark .btn-color-2 { color: #e9e9e9; border: solid 1px #e9e9e9 !important; } -.btn-color-1.dark:hover { +.theme-dark .btn-color-1:hover { background-color: white; color: black; } -p.dark { +.theme-dark p { color: rgb(204, 204, 204); } -.details-container.dark { +.theme-dark .details-container { background-color: rgb(53, 53, 53); } -h2.dark { +.theme-dark h2 { color: white; } -/* Default styles for images */ -img.icon.dark { +.theme-dark img.icon { filter: invert(1); } @@ -87,11 +102,25 @@ img.icon { transition: all 1s; } -.menu-links.dark { +.theme-dark .menu-links { color: white; background-color: rgb(53, 53, 53); } -.hamburger-icon.dark span { -background-color: white; -} \ No newline at end of file +.theme-dark .hamburger-icon span { + background-color: white; +} + +.theme-dark a { + color: white; +} + +.theme-dark .legal-links a { + color: rgb(170, 170, 170); +} + +/* No fade animations while the page is loading */ +.no-transition, +.no-transition * { + transition: none !important; +} diff --git a/assets/css/legal.css b/assets/css/legal.css new file mode 100644 index 0000000..72bdeae --- /dev/null +++ b/assets/css/legal.css @@ -0,0 +1,38 @@ +/* Impressum / Datenschutz */ + +.legal { + max-width: 48rem; + margin: 0 auto; + padding: 2rem 1rem 4rem; +} + +.legal .back-link { + display: inline-block; + margin-bottom: 2rem; +} + +.legal h1 { + font-size: 2.5rem; + margin-bottom: 1.5rem; +} + +.legal h2 { + font-size: 1.25rem; + margin: 2rem 0 0.5rem; +} + +.legal p, +.legal li { + line-height: 1.6; + margin-bottom: 0.75rem; +} + +.legal ul { + padding-left: 1.5rem; +} + +.legal a { + color: inherit; + text-decoration: underline; + text-underline-offset: 3px; +} diff --git a/assets/css/noscript.css b/assets/css/noscript.css new file mode 100644 index 0000000..e853143 --- /dev/null +++ b/assets/css/noscript.css @@ -0,0 +1,4 @@ +/* Without JavaScript the full images are shown via