From 29017e84ba3eff449915d687e20a19219884db8a Mon Sep 17 00:00:00 2001 From: ssbg04 Date: Sun, 13 Sep 2026 17:16:56 +0800 Subject: [PATCH] feat(nav): smooth page transitions, icon-free navigation, cross-page ultra-fast persistence, and optimized glassmorphism --- TODO.md | 4 +- src/components/About.tsx | 4 +- src/components/Background.tsx | 5 + src/components/Certifications.tsx | 6 +- src/components/ContactForm.tsx | 10 +- src/components/ControlsDropdown.tsx | 60 ++++---- src/components/Navbar.tsx | 141 ++++++++++++------ src/components/PhotoGallery.tsx | 2 +- src/components/PortfolioAssistantFAB.tsx | 6 +- src/layouts/Layout.astro | 149 +++++++++++++------ src/pages/about.astro | 2 +- src/pages/certifications.astro | 2 +- src/pages/contact.astro | 4 +- src/pages/gallery.astro | 4 +- src/pages/index.astro | 2 +- src/pages/projects.astro | 6 +- src/pages/projects/[slug].astro | 6 +- src/styles/global.css | 174 ++++++++++++++++++----- 18 files changed, 410 insertions(+), 177 deletions(-) diff --git a/TODO.md b/TODO.md index f0139f1..63f641b 100644 --- a/TODO.md +++ b/TODO.md @@ -68,5 +68,5 @@ Project Dedicated page - fix the gallery page modal view the description is not readable - in the certificates if the picture is portrait and it has many information the picture is not visible, make the modal scrollable and responsive --> -- fix that on mobile view in all of the pages in navigation it has huge space at top, keep the home page layout -- fix that in landscape or desktop view that the active color indicator jumps to home to where you click a tab, and fix that the navigation bar zooming out in landscape view \ No newline at end of file + \ No newline at end of file diff --git a/src/components/About.tsx b/src/components/About.tsx index dd99f5c..e8e4575 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -107,11 +107,11 @@ export default function About({ }; return ( -
+
{/* Section Header */} - +

diff --git a/src/components/Background.tsx b/src/components/Background.tsx index 363c1fd..0890d84 100644 --- a/src/components/Background.tsx +++ b/src/components/Background.tsx @@ -283,6 +283,8 @@ export default function Background() { }; checkTier(); window.addEventListener('tier-change', checkTier); + document.addEventListener('astro:after-swap', checkTier); + document.addEventListener('astro:page-load', checkTier); if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { setReducedMotion(true); @@ -290,6 +292,8 @@ export default function Background() { return () => { window.removeEventListener('tier-change', checkTier); + document.removeEventListener('astro:after-swap', checkTier); + document.removeEventListener('astro:page-load', checkTier); }; }, []); @@ -809,6 +813,7 @@ export default function Background() { animationFrameId = requestAnimationFrame(renderLoop); if (!isVisible) return; + if (document.documentElement.dataset.tier === 'low' || localStorage.getItem('liteMode') === 'true') return; const tSec = now * 0.001; diff --git a/src/components/Certifications.tsx b/src/components/Certifications.tsx index 756da2b..5bd1030 100644 --- a/src/components/Certifications.tsx +++ b/src/components/Certifications.tsx @@ -316,11 +316,11 @@ export default function Certifications({ certifications, extraCerts = [], sectio const hasBothTypes = documentCerts.length > 0 && skillBadges.length > 0; return ( -
+
{/* Section Header */} - +

@@ -332,7 +332,7 @@ export default function Certifications({ certifications, extraCerts = [], sectio {/* ─── Category Filter Tabs (Shown when both document certificates and skill badges exist) ─── */} {hasBothTypes && ( - +