From c00fe6b06c8287f309f6df0ef9160427c1ad846a Mon Sep 17 00:00:00 2001 From: denshooter Date: Mon, 2 Mar 2026 14:49:36 +0100 Subject: [PATCH] perf: optimize Lighthouse scores to 100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Performance: - Lazy-load ShaderGradientBackground via dynamic import (reduces initial JS ~250KB) - Disable ShaderGradient animations (animate=off) to reduce CPU/GPU load - Remove opacity:0 animations from Hero LCP elements for instant paint - Add browserslist targeting modern browsers (eliminates ~13KB polyfills) Accessibility: - Fix color contrast: text-stone-400 → text-stone-600 dark:text-stone-400 on light backgrounds - Fix text-liquid-mint → text-emerald-700/600 for readable text/accent dots - Fix quote text contrast on dark status box (text-stone-700 → text-stone-300) - Fix Online badge contrast (emerald-600 → emerald-700) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- app/components/About.tsx | 14 +-- app/components/ActivityFeed.tsx | 2 +- app/components/ClientProviders.tsx | 6 ++ app/components/Contact.tsx | 22 ++-- app/components/Footer.tsx | 12 +-- app/components/Hero.tsx | 17 ++- app/components/Projects.tsx | 2 +- app/components/ShaderGradientBackground.tsx | 112 ++++++++++++++++++++ app/layout.tsx | 2 +- package.json | 6 ++ 10 files changed, 157 insertions(+), 38 deletions(-) create mode 100644 app/components/ShaderGradientBackground.tsx diff --git a/app/components/About.tsx b/app/components/About.tsx index 3a959cd..a8ba25d 100644 --- a/app/components/About.tsx +++ b/app/components/About.tsx @@ -86,7 +86,7 @@ const About = () => { >

- {t("title")}. + {t("title")}.

{isLoading ? ( @@ -103,7 +103,7 @@ const About = () => {
-

{t("funFactTitle")}

+

{t("funFactTitle")}

{isLoading ? :

{t("funFactBody")}

}
@@ -167,7 +167,7 @@ const About = () => { ) : ( techStack.map((cat) => (
-

{cat.name}

+

{cat.name}

{cat.items?.map((item: TechStackItem) => ( @@ -263,16 +263,16 @@ const About = () => { onClick={() => setSelectedSnippet(s)} className="w-full text-left p-3 bg-stone-50 dark:bg-stone-800 rounded-xl border border-stone-100 dark:border-stone-700 hover:border-liquid-purple transition-all group/s" > -

{s.category}

+

{s.category}

{s.title}

)) ) : ( -

No snippets yet.

+

No snippets yet.

)}
- + Enter the Lab @@ -371,7 +371,7 @@ const About = () => {
diff --git a/app/components/ActivityFeed.tsx b/app/components/ActivityFeed.tsx index e6ecdd3..b120581 100644 --- a/app/components/ActivityFeed.tsx +++ b/app/components/ActivityFeed.tsx @@ -134,7 +134,7 @@ export default function ActivityFeed({ transition={{ duration: 0.5 }} className="space-y-4" > -

+

“{allQuotes[quoteIndex].content}”

diff --git a/app/components/ClientProviders.tsx b/app/components/ClientProviders.tsx index 06efe5a..93af8e9 100644 --- a/app/components/ClientProviders.tsx +++ b/app/components/ClientProviders.tsx @@ -14,6 +14,11 @@ const BackgroundBlobs = dynamic(() => import("@/components/BackgroundBlobs").cat loading: () => null, }); +const ShaderGradientBackground = dynamic( + () => import("./ShaderGradientBackground"), + { ssr: false, loading: () => null } +); + export default function ClientProviders({ children, }: { @@ -100,6 +105,7 @@ function GatedProviders({ {mounted && } + {mounted && }

{children}
diff --git a/app/components/Contact.tsx b/app/components/Contact.tsx index 0831bd6..a854927 100644 --- a/app/components/Contact.tsx +++ b/app/components/Contact.tsx @@ -169,7 +169,7 @@ const Contact = () => { >

- {t("title")}. + {t("title")}.

{cmsDoc ? ( @@ -192,10 +192,10 @@ const Contact = () => {
-

Connect

+

Connect

- Online + Online
@@ -203,7 +203,7 @@ const Contact = () => { {/* Email */}
- Email + Email contact@dk0.dev
@@ -216,7 +216,7 @@ const Contact = () => { {/* GitHub */}
- Code + Code GitHub
@@ -229,7 +229,7 @@ const Contact = () => { {/* LinkedIn */}
- Professional + Professional LinkedIn
@@ -240,7 +240,7 @@ const Contact = () => {
-

Location

+

Location

{tInfo("locationValue")} @@ -264,7 +264,7 @@ const Contact = () => {
-
-
-
-