From 68ce9f3efdafae4002550291ba26b4d996b068d6 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 13 Mar 2025 16:09:34 +0100 Subject: [PATCH 1/7] style: update background color for .black class --- src/styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/theme.css b/src/styles/theme.css index 7558ce5..d7de001 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -1,4 +1,4 @@ -.black { background: #0A0A0A; } +.black { background: #3e3e3e; } .red { background: #170c0c; } .gold { background: #121107; } From 5dc8215ca64a45371158a905b2796caa97744403 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 13 Mar 2025 16:13:00 +0100 Subject: [PATCH 2/7] style(theme): update background color for .black class --- src/styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/theme.css b/src/styles/theme.css index d7de001..7558ce5 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -1,4 +1,4 @@ -.black { background: #3e3e3e; } +.black { background: #0A0A0A; } .red { background: #170c0c; } .gold { background: #121107; } From a7b400d2a81a233fb366d3abcb13ec13077eae3c Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 13 Mar 2025 20:39:14 +0100 Subject: [PATCH 3/7] feat: add portfolio, blog, and contact features --- src/components/sections/BlogPreview.astro | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/components/sections/BlogPreview.astro b/src/components/sections/BlogPreview.astro index 11434d5..56ad339 100644 --- a/src/components/sections/BlogPreview.astro +++ b/src/components/sections/BlogPreview.astro @@ -39,6 +39,7 @@ const blogPosts = [

Thoughts, insights, and tutorials on software development and tech. +<<<<<<< HEAD Coming Soon

@@ -75,6 +76,18 @@ const blogPosts = [ {blogPosts.map((post) => (
+
+ + + +
{post.date} +<<<<<<< HEAD
+ >>>>>> 69efdf7 (feat: add portfolio, blog, and contact features) viewBox="0 0 24 24" fill="none" stroke="currentColor" @@ -104,6 +127,7 @@ const blogPosts = [
+<<<<<<< HEAD ))} @@ -127,6 +151,11 @@ const blogPosts = [ +======= +
+ ))} + +>>>>>>> 69efdf7 (feat: add portfolio, blog, and contact features) \ No newline at end of file From 4f719353af918d53d8f647856775330f5900d50f Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 13 Mar 2025 20:46:03 +0100 Subject: [PATCH 4/7] feat(blog): add "Coming Soon" message and buttons --- src/components/sections/BlogPreview.astro | 28 ++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/sections/BlogPreview.astro b/src/components/sections/BlogPreview.astro index 56ad339..1df7354 100644 --- a/src/components/sections/BlogPreview.astro +++ b/src/components/sections/BlogPreview.astro @@ -79,10 +79,36 @@ const blogPosts = [ =======

+ -
+
+
+
+ Blog Coming Soon! +

The blog feature is currently in development.

+
+
+ {blogPosts.map((post) => ( Date: Thu, 13 Mar 2025 20:53:36 +0100 Subject: [PATCH 5/7] feat(service-worker): add auth asset handling and caching logic --- public/service-worker.js | 73 +++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/public/service-worker.js b/public/service-worker.js index 5006803..5983414 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -2,8 +2,11 @@ const CACHE_NAME = 'jleibl-portfolio-v1'; const PRECACHE_ASSETS = [ '/', - '/index.html', - '/manifest.json', + '/index.html' +]; + +const AUTH_ASSETS = [ + '/manifest.json' ]; const STYLE_ASSETS = [ @@ -17,6 +20,7 @@ const IMAGE_ASSETS = [ const ALL_ASSETS = [ ...PRECACHE_ASSETS, + ...AUTH_ASSETS, ...STYLE_ASSETS, ...IMAGE_ASSETS ]; @@ -50,22 +54,28 @@ self.addEventListener('activate', event => { }); function shouldCache(url) { - if (url.origin === self.location.origin) { - if (url.pathname.endsWith('.html') || - url.pathname.endsWith('.css') || - url.pathname.endsWith('.js') || - url.pathname.endsWith('.jpg') || - url.pathname.endsWith('.jpeg') || - url.pathname.endsWith('.png') || - url.pathname.endsWith('.svg') || - url.pathname.endsWith('.webp') || - url.pathname.endsWith('.woff') || - url.pathname.endsWith('.woff2') || - url.pathname.endsWith('.json')) { + const urlObj = new URL(url); + + if (urlObj.hostname.includes('cloudflareaccess.com')) { + return false; + } + + if (urlObj.origin === self.location.origin) { + if (urlObj.pathname.endsWith('.html') || + urlObj.pathname.endsWith('.css') || + urlObj.pathname.endsWith('.js') || + urlObj.pathname.endsWith('.jpg') || + urlObj.pathname.endsWith('.jpeg') || + urlObj.pathname.endsWith('.png') || + urlObj.pathname.endsWith('.svg') || + urlObj.pathname.endsWith('.webp') || + urlObj.pathname.endsWith('.woff') || + urlObj.pathname.endsWith('.woff2') || + urlObj.pathname.endsWith('.json')) { return true; } - if (url.pathname === '/') { + if (urlObj.pathname === '/') { return true; } } @@ -73,8 +83,34 @@ function shouldCache(url) { return false; } +function isAuthProtectedAsset(url) { + const urlPath = new URL(url).pathname; + return AUTH_ASSETS.some(asset => asset === urlPath); +} + self.addEventListener('fetch', event => { - if (event.request.mode === 'navigate' || shouldCache(new URL(event.request.url))) { + if (isAuthProtectedAsset(event.request.url)) { + event.respondWith( + fetch(event.request) + .then(response => { + if (response.status === 200) { + const responseToCache = response.clone(); + caches.open(CACHE_NAME) + .then(cache => { + cache.put(event.request, responseToCache); + }); + } + return response; + }) + .catch(error => { + console.log('Fetch failed for auth protected asset:', error); + return caches.match(event.request); + }) + ); + return; + } + + if (event.request.mode === 'navigate' || shouldCache(event.request.url)) { event.respondWith( caches.match(event.request) .then(response => { @@ -86,6 +122,11 @@ self.addEventListener('fetch', event => { return fetch(fetchRequest) .then(response => { + if (response.url.includes('cloudflareaccess.com')) { + console.log('Request redirected to authentication page:', response.url); + return response; + } + if (!response || response.status !== 200 || response.type !== 'basic') { return response; } From 1f2304144c036a382439d679601c754a490bf351 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 13 Mar 2025 20:57:29 +0100 Subject: [PATCH 6/7] feat: redesign mobile menu with improved structure and styles --- src/components/layout/MobileMenu.astro | 309 ++++++++++++++++--------- 1 file changed, 201 insertions(+), 108 deletions(-) diff --git a/src/components/layout/MobileMenu.astro b/src/components/layout/MobileMenu.astro index 5f11140..922432b 100644 --- a/src/components/layout/MobileMenu.astro +++ b/src/components/layout/MobileMenu.astro @@ -9,67 +9,61 @@ const navItems = [ ]; --- -
+
-