feat: plakat redesign phase 1 (tokens, fonts, poster hero, header)

- New design tokens: signal red, ink and paper as RGB channels; ink and paper
  swap roles in dark mode so every component inverts cleanly
- Fonts via next/font: Bricolage Grotesque (with wdth/opsz axes), Geist,
  Geist Mono; drop Inter and Playfair
- Poster hero: kicker, giant DK0 wordmark that reacts to pointer distance
  (weight and width through a damped spring, desktop only, off for reduced
  motion), claim as h1, intro with thesis countdown, marquee strip
- Header in poster style: transparent over the red hero, paper strip with
  ink rule when scrolled or on subpages; drawer menu restyled
- Remove wavy SVG separators, CSS shader gradient, background blobs and
  unused providers that caused the pink/purple bands between sections
- Drop the global p/span/div color override so colors inherit properly
- New hero texts in de/en, tests and i18n key check updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
denshooter
2026-10-15 18:37:54 +02:00
parent c847a456a3
commit 9a82a3b0e7
19 changed files with 355 additions and 584 deletions
-17
View File
@@ -1,17 +0,0 @@
"use client";
import React, { useEffect, useState } from "react";
import BackgroundBlobs from "@/components/BackgroundBlobs";
export default function BackgroundBlobsClient() {
// Avoid SSR/webpack bailout issues from `next/dynamic({ ssr:false })`
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
if (!mounted) return null;
return <BackgroundBlobs />;
}
+3 -38
View File
@@ -1,31 +1,17 @@
"use client";
import React, { useEffect, useState } from "react";
import { usePathname } from "next/navigation";
import dynamic from "next/dynamic";
import React from "react";
import { MotionConfig } from "framer-motion";
import { ToastProvider } from "@/components/Toast";
import ErrorBoundary from "@/components/ErrorBoundary";
import { ConsentProvider } from "./ConsentProvider";
import { ThemeProvider } from "./ThemeProvider";
const BackgroundBlobs = dynamic(
() => import("@/components/BackgroundBlobs").catch(() => ({ default: () => null })),
{ ssr: false, loading: () => null }
);
export default function ClientProviders({
children,
}: {
children: React.ReactNode;
}) {
const [mounted, setMounted] = useState(false);
const pathname = usePathname();
useEffect(() => {
setMounted(true);
}, [pathname]);
return (
<ErrorBoundary>
<ErrorBoundary>
@@ -33,7 +19,7 @@ export default function ClientProviders({
<ThemeProvider>
{/* Respect prefers-reduced-motion in every Framer Motion animation */}
<MotionConfig reducedMotion="user">
<GatedProviders mounted={mounted}>
<GatedProviders>
{children}
</GatedProviders>
</MotionConfig>
@@ -44,31 +30,10 @@ export default function ClientProviders({
);
}
function GatedProviders({
children,
mounted,
}: {
children: React.ReactNode;
mounted: boolean;
}) {
// Defer animated background blobs until after LCP
const [deferredReady, setDeferredReady] = useState(false);
useEffect(() => {
if (!mounted) return;
let id: ReturnType<typeof setTimeout> | number;
if (typeof requestIdleCallback !== "undefined") {
id = requestIdleCallback(() => setDeferredReady(true), { timeout: 5000 });
return () => cancelIdleCallback(id as number);
} else {
id = setTimeout(() => setDeferredReady(true), 200);
return () => clearTimeout(id);
}
}, [mounted]);
function GatedProviders({ children }: { children: React.ReactNode }) {
return (
<ErrorBoundary>
<ToastProvider>
{deferredReady && <BackgroundBlobs />}
<div className="relative z-10">{children}</div>
</ToastProvider>
</ErrorBoundary>
+104 -147
View File
@@ -86,174 +86,131 @@ export default function HeaderClient({ locale, translations }: HeaderClientProps
const enHref = `/en${pathWithoutLocale}${query}`;
const deHref = `/de${pathWithoutLocale}${query}`;
const de = locale === "de";
// Über dem roten Plakat bleibt der Kopf transparent, sonst wird er zum Papierstreifen
const solid = scrolled || !isHome;
const pill =
"rounded-full border-[1.5px] border-ink px-4 py-2 text-sm font-medium transition-[background-color,color,transform] duration-150 ease-out hover:bg-ink hover:text-paper active:scale-[0.97]";
const langPill = (active: boolean) =>
`rounded-full px-3 py-2 font-mono text-xs transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.97] ${
active ? "bg-ink text-paper" : "hover:bg-ink/10"
}`;
return (
<>
<header className="fixed top-6 left-0 right-0 z-50 flex justify-center px-4 pointer-events-none">
<div
className={`pointer-events-auto transition-[max-width] duration-500 ease-in-out ${
scrolled ? "w-full max-w-5xl" : "w-full max-w-7xl"
}`}
>
<div
className={`backdrop-blur-xl transition-[padding,background-color,box-shadow,border-color] duration-500 ease-in-out flex justify-between items-center ${
scrolled
? "bg-white/95 border border-stone-200/50 shadow-[0_8px_30px_rgba(0,0,0,0.12)] rounded-full px-6 py-3"
: "bg-white/85 border border-stone-200/30 shadow-[0_4px_24px_rgba(0,0,0,0.08)] px-4 py-4 rounded-full"
}`}
<header
className={`fixed inset-x-0 top-0 z-50 border-b-2 transition-[background-color,border-color] duration-200 ease-out ${
solid ? "border-ink bg-paper/90 backdrop-blur-md" : "border-transparent bg-transparent"
}`}
>
<div className="flex items-center justify-between gap-4 px-4 py-3 text-ink sm:px-6 lg:px-10">
<Link
href={`/${locale}`}
className="font-display text-2xl font-extrabold tracking-[-0.03em] transition-transform duration-150 ease-out active:scale-[0.97]"
aria-label={de ? "dk0, zur Startseite" : "dk0, home"}
>
<div className="flex items-center space-x-2 active:scale-[0.97] transition-transform duration-150 ease-out">
<Link
href={`/${locale}`}
className="text-2xl font-black font-sans text-stone-900 tracking-tighter liquid-hover flex items-center"
>
dk<span className="text-red-500">0</span>
dk<span className={`transition-colors duration-200 ${solid ? "text-signal" : "text-paper"}`}>0</span>
</Link>
<nav className="hidden items-center gap-2 md:flex" aria-label={de ? "Hauptnavigation" : "Main navigation"}>
{navItems.slice(1).map((item) => (
<Link key={item.name} href={item.href} className={pill}>
{item.name}
</Link>
))}
<div className="ml-2 flex items-center gap-1 border-l-2 border-ink/20 pl-3">
<Link href={deHref} className={langPill(locale === "de")} aria-current={locale === "de" ? "true" : undefined}>
DE
</Link>
<Link href={enHref} className={langPill(locale === "en")} aria-current={locale === "en" ? "true" : undefined}>
EN
</Link>
<ThemeToggle />
</div>
</nav>
<nav className="hidden md:flex items-center space-x-8">
{navItems.map((item) => (
<div key={item.name} className="active:scale-[0.97] transition-transform duration-150 ease-out">
<Link
href={item.href}
className="text-stone-700 hover:text-stone-900 font-medium transition-colors relative liquid-hover"
>
{item.name}
</Link>
</div>
))}
{/* Language Switcher */}
<div className="flex items-center space-x-2 ml-4 pl-4 border-l border-stone-300">
<Link
href={enHref}
className={`px-2 py-1 text-sm font-medium rounded transition-colors ${
locale === "en"
? "bg-stone-900 text-white"
: "text-stone-600 hover:text-stone-900 hover:bg-stone-100"
}`}
>
EN
</Link>
<Link
href={deHref}
className={`px-2 py-1 text-sm font-medium rounded transition-colors ${
locale === "de"
? "bg-stone-900 text-white"
: "text-stone-600 hover:text-stone-900 hover:bg-stone-100"
}`}
>
DE
</Link>
<ThemeToggle />
</div>
</nav>
<button
onClick={() => setIsOpen(!isOpen)}
className="md:hidden p-2 rounded-lg bg-stone-100 hover:bg-stone-200 text-stone-700 transition-[background-color,transform] duration-150 ease-out active:scale-[0.97]"
aria-label="Toggle menu"
>
{isOpen ? <XIcon size={24} /> : <MenuIcon size={24} />}
</button>
</div>
<button
onClick={() => setIsOpen(!isOpen)}
className={`${pill} inline-flex items-center gap-2 md:hidden`}
aria-label={de ? "Menü öffnen" : "Open menu"}
aria-expanded={isOpen}
>
<MenuIcon size={18} /> {de ? "Menü" : "Menu"}
</button>
</div>
</header>
{/* Mobile menu overlay — always mounted so it can fade out, not just vanish */}
{/* Abdunklung hinter dem Menü — bleibt gemountet, damit sie ausblenden kann */}
<div
aria-hidden="true"
className={`fixed inset-0 bg-stone-900/50 backdrop-blur-sm z-40 md:hidden transition-opacity ${
isOpen ? "opacity-100 duration-300 ease-out" : "opacity-0 pointer-events-none duration-200 ease-out"
className={`fixed inset-0 z-40 bg-ink/40 transition-opacity md:hidden ${
isOpen ? "opacity-100 duration-300 ease-out" : "pointer-events-none opacity-0 duration-200 ease-out"
}`}
onClick={() => setIsOpen(false)}
/>
{/* Mobile menu panel — drawer curve in, quicker exit */}
{/* Menü als Drawer: Drawer-Kurve rein, schneller raus */}
<div
inert={!isOpen}
className={`fixed right-0 top-0 h-full w-80 max-w-[85vw] bg-white shadow-2xl z-50 md:hidden overflow-y-auto overscroll-contain transition-[transform,visibility] ${
isOpen
? "translate-x-0 visible duration-500 ease-drawer"
: "translate-x-full invisible duration-200 ease-out"
role="dialog"
aria-label={de ? "Menü" : "Menu"}
className={`fixed right-0 top-0 z-50 flex h-full w-80 max-w-[85vw] flex-col overflow-y-auto overscroll-contain border-l-2 border-ink bg-paper text-ink transition-[transform,visibility] md:hidden ${
isOpen ? "visible translate-x-0 duration-500 ease-drawer" : "invisible translate-x-full duration-200 ease-out"
}`}
>
<div className="p-6">
<div className="flex justify-between items-center mb-8">
<Link
href={`/${locale}`}
className="text-2xl font-black text-stone-900"
onClick={() => setIsOpen(false)}
>
dk<span className="text-red-500">0</span>
</Link>
<button
onClick={() => setIsOpen(false)}
className="p-2 rounded-lg bg-stone-100 hover:bg-stone-200 text-stone-700 transition-[background-color,transform] duration-150 ease-out active:scale-[0.97]"
aria-label="Close menu"
>
<XIcon size={24} />
</button>
</div>
<div className="flex items-center justify-between px-5 py-3">
<Link
href={`/${locale}`}
className="font-display text-2xl font-extrabold tracking-[-0.03em]"
onClick={() => setIsOpen(false)}
>
dk<span className="text-signal">0</span>
</Link>
<button onClick={() => setIsOpen(false)} className={`${pill} inline-flex items-center`} aria-label={de ? "Menü schließen" : "Close menu"}>
<XIcon size={18} />
</button>
</div>
<nav className="space-y-2">
{navItems.map((item) => (
<Link
key={item.name}
href={item.href}
onClick={() => setIsOpen(false)}
className="block px-4 py-3 text-stone-700 hover:bg-stone-50 active:bg-stone-100 rounded-lg font-medium transition-colors"
<nav className="flex flex-col border-t-2 border-ink" aria-label={de ? "Hauptnavigation" : "Main navigation"}>
{navItems.map((item) => (
<Link
key={item.name}
href={item.href}
onClick={() => setIsOpen(false)}
className="border-b-2 border-ink px-5 py-4 font-display text-3xl font-extrabold tracking-[-0.035em] transition-colors duration-150 active:bg-paper-2"
>
{item.name}
</Link>
))}
</nav>
<div className="flex items-center gap-1 px-5 py-5">
<Link href={deHref} onClick={() => setIsOpen(false)} className={langPill(locale === "de")}>
DE
</Link>
<Link href={enHref} onClick={() => setIsOpen(false)} className={langPill(locale === "en")}>
EN
</Link>
<ThemeToggle />
</div>
<div className="mt-auto flex gap-2 px-5 pb-8">
{socialLinks.map((link) => {
const Icon = link.icon;
return (
<a
key={link.label}
href={link.href}
target="_blank"
rel="noopener noreferrer"
className={`${pill} inline-flex items-center`}
aria-label={link.label}
>
{item.name}
</Link>
))}
</nav>
{/* Language Switcher Mobile */}
<div className="flex items-center gap-2 mt-6 pt-6 border-t border-stone-200">
<Link
href={enHref}
onClick={() => setIsOpen(false)}
className={`flex-1 px-4 py-2 text-center font-medium rounded-lg transition-colors ${
locale === "en"
? "bg-stone-900 text-white"
: "bg-stone-100 text-stone-600 hover:bg-stone-200"
}`}
>
EN
</Link>
<Link
href={deHref}
onClick={() => setIsOpen(false)}
className={`flex-1 px-4 py-2 text-center font-medium rounded-lg transition-colors ${
locale === "de"
? "bg-stone-900 text-white"
: "bg-stone-100 text-stone-600 hover:bg-stone-200"
}`}
>
DE
</Link>
<ThemeToggle />
</div>
<div className="mt-8 pt-6 border-t border-stone-200">
<div className="flex justify-center space-x-6">
{socialLinks.map((link) => {
const Icon = link.icon;
return (
<a
key={link.label}
href={link.href}
target="_blank"
rel="noopener noreferrer"
className="p-3 rounded-lg bg-stone-100 hover:bg-stone-900 hover:text-white text-stone-700 transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.97]"
aria-label={link.label}
>
<Icon size={20} />
</a>
);
})}
</div>
</div>
<Icon size={18} />
</a>
);
})}
</div>
</div>
</>
+44 -50
View File
@@ -1,73 +1,67 @@
import { getTranslations } from "next-intl/server";
import Image from "next/image";
import KineticWordmark from "./KineticWordmark";
interface HeroProps {
locale: string;
}
// Abgabe der Masterarbeit, Grundlage für den Countdown im Intro
const THESIS_DEADLINE = new Date("2027-02-15T12:00:00+01:00");
const MARQUEE = ["Self-Hosting", "Next.js", "SwiftUI", "Flutter", "Docker", "Microsoft 365", "Godot", "Home Assistant"];
export default async function Hero({ locale }: HeroProps) {
const t = await getTranslations({ locale, namespace: "home.hero" });
const daysLeft = Math.max(0, Math.ceil((THESIS_DEADLINE.getTime() - Date.now()) / 86_400_000));
return (
<section className="relative min-h-screen flex flex-col items-center justify-center bg-stone-50 dark:bg-stone-950 px-6 transition-colors duration-500">
{/* Liquid Ambient Background — overflow-hidden here so the blobs are clipped, not the image/badge */}
<div className="absolute inset-0 pointer-events-none overflow-hidden">
<div className="absolute top-[5%] left-[5%] w-[60vw] h-[60vw] bg-liquid-mint rounded-full blur-[140px] opacity-20" />
<div className="absolute bottom-[5%] right-[5%] w-[50vw] h-[50vw] bg-liquid-purple rounded-full blur-[120px] opacity-15" />
</div>
<>
<section id="top" className="relative overflow-hidden bg-signal px-4 pt-24 text-ink sm:px-6 md:pt-28 lg:px-10">
<p className="font-mono text-[13px] leading-snug">{t("kicker")}</p>
<div className="relative z-10 max-w-7xl mx-auto w-full pt-12 sm:pt-16 md:pt-20 pb-10 sm:pb-16">
<div className="flex flex-col xl:flex-row items-center gap-8 sm:gap-10 xl:gap-24">
<div className="mt-4 sm:mt-8">
<KineticWordmark />
</div>
{/* Left: Text Content */}
<div className="flex-1 text-center xl:text-left space-y-6 sm:space-y-8 md:space-y-10">
<div className="inline-flex items-center gap-2 sm:gap-3 px-4 sm:px-5 py-2 sm:py-2.5 rounded-full bg-white dark:bg-stone-900 border border-stone-200 dark:border-stone-800 shadow-sm animate-fade-in">
<span className="w-2 h-2 sm:w-2.5 sm:h-2.5 bg-emerald-500 rounded-full animate-pulse" />
<span className="font-mono text-[10px] sm:text-[11px] font-black uppercase tracking-[0.2em] sm:tracking-[0.3em] text-stone-500">{t("badge")}</span>
</div>
<h1 className="text-[2.75rem] sm:text-6xl md:text-8xl lg:text-[9.5rem] font-black tracking-tighter leading-[0.85] text-stone-900 dark:text-stone-50 uppercase">
<span className="block">
{t("line1")}
</span>
<span className="block text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 via-liquid-sky to-liquid-purple pb-2 sm:pb-4">
{t("line2")}
</span>
</h1>
<p className="text-base sm:text-lg md:text-xl lg:text-2xl text-stone-600 dark:text-stone-400 max-w-xl mx-auto xl:mx-0 font-light leading-relaxed tracking-tight">
{t("description")}
<div className="mt-3 grid gap-6 border-t-2 border-ink pb-8 pt-6 md:grid-cols-[1.3fr_1fr] md:items-end md:pb-10">
<h1 className="text-balance font-display text-[clamp(2rem,4.4vw,4rem)] font-extrabold leading-[0.96] tracking-[-0.035em] [font-variation-settings:'wdth'_85]">
<span className="sr-only">Dennis Konkol: </span>
{t("claim")}
</h1>
<div>
<p className="max-w-[42ch] text-[17px] leading-relaxed">
{t("intro")} {daysLeft > 0 && t("countdown", { days: daysLeft })}
</p>
<div className="flex flex-col sm:flex-row items-center gap-4 sm:gap-8 justify-center xl:justify-start pt-2 sm:pt-4 animate-fade-in [animation-delay:150ms]">
<a href="#projects" className="group relative overflow-hidden px-8 sm:px-12 py-4 sm:py-5 bg-stone-900 dark:bg-stone-50 text-white dark:text-stone-900 rounded-2xl sm:rounded-3xl font-black text-xs uppercase tracking-[0.2em] active:scale-[0.97] transition-transform duration-150 ease-out shadow-2xl">
<div className="absolute inset-0 bg-white/10 -translate-x-full group-hover:translate-x-full transition-transform duration-700 ease-in-out" />
{t("ctaWork")}
<div className="mt-5 flex flex-wrap gap-2.5">
<a
href="#projects"
className="inline-flex items-center gap-2 rounded-full bg-ink px-5 py-3.5 text-[15px] font-semibold text-paper transition-transform duration-150 ease-out active:scale-[0.97]"
>
{t("ctaWork")} <span aria-hidden="true">↓</span>
</a>
<a href="#contact" className="font-black text-xs uppercase tracking-[0.2em] text-stone-700 dark:text-stone-300 hover:text-stone-900 dark:hover:text-white transition-colors">
<a
href="#contact"
className="inline-flex items-center rounded-full px-5 py-3.5 text-[15px] font-semibold shadow-[inset_0_0_0_1.5px_rgb(var(--plakat-ink))] transition-[background-color,color,transform] duration-150 ease-out hover:bg-ink hover:text-signal active:scale-[0.97]"
>
{t("ctaContact")}
</a>
</div>
</div>
</div>
</section>
{/* Right: The Photo */}
<div className="relative w-52 h-52 sm:w-64 sm:h-64 md:w-80 md:h-80 xl:w-[500px] xl:h-[500px] shrink-0 mt-4 sm:mt-8 xl:mt-0 animate-fade-in [animation-delay:100ms] [animation-duration:900ms]">
<div className="absolute inset-0 bg-gradient-to-tr from-liquid-mint to-liquid-purple rounded-[3rem] sm:rounded-[4rem] lg:rounded-[5rem] rotate-12 scale-90 opacity-20 blur-3xl" />
<div className="relative w-full h-full rounded-[2.5rem] sm:rounded-[3rem] lg:rounded-[4rem] overflow-hidden border-[12px] sm:border-[16px] lg:border-[24px] border-white dark:border-stone-900 shadow-[0_30px_60px_-15px_rgba(0,0,0,0.3)] sm:shadow-[0_50px_100px_-20px_rgba(0,0,0,0.4)]" style={{ willChange: "transform" }}>
<Image src="/images/me.jpg" alt="Dennis Konkol" fill className="object-cover" priority fetchPriority="high" sizes="(max-width: 640px) 208px, (max-width: 768px) 256px, (max-width: 1280px) 320px, 500px" />
</div>
<div className="absolute -bottom-4 -left-4 sm:-bottom-6 sm:-left-6 bg-white dark:bg-stone-800 px-5 py-3 sm:px-8 sm:py-4 rounded-xl sm:rounded-[2rem] shadow-2xl border border-stone-100 dark:border-stone-700">
<span className="font-mono text-xs sm:text-sm font-black tracking-tighter uppercase">dk<span className="text-red-500">0</span>.dev</span>
</div>
</div>
<div className="overflow-hidden bg-ink text-paper" aria-hidden="true">
<div className="flex w-max animate-marquee gap-9 py-[18px] font-display text-[clamp(1.1rem,2.4vw,1.7rem)] font-bold leading-none">
{[...MARQUEE, ...MARQUEE].map((item, i) => (
<span key={i} className="flex items-center gap-9 whitespace-nowrap">
{item}
<svg viewBox="0 0 24 24" className="h-[0.7em] w-[0.7em] fill-signal">
<path d="M12 1.5l2.6 7.9 7.9 2.6-7.9 2.6-2.6 7.9-2.6-7.9-7.9-2.6 7.9-2.6z" />
</svg>
</span>
))}
</div>
</div>
<div className="absolute bottom-10 left-1/2 -translate-x-1/2 hidden md:flex flex-col items-center gap-4" aria-hidden="true">
<div className="w-px h-16 origin-top animate-scroll-hint bg-gradient-to-b from-stone-300 dark:from-stone-700 to-transparent" />
</div>
</section>
</>
);
}
+99
View File
@@ -0,0 +1,99 @@
"use client";
import { useEffect, useRef } from "react";
const LETTERS = ["D", "K", "0"] as const;
// Ruhezustand und Spannweite der variablen Achsen von Bricolage Grotesque
const REST = { wght: 800, wdth: 100 };
const NEAR = { wght: 220, wdth: 75 };
const REACH_PX = 520;
/**
* Das große „DK0“ im Plakat. Die Buchstaben werden dünner und schmaler, je näher
* der Zeiger kommt, geglättet über eine kritisch gedämpfte Feder.
* Ohne Maus oder bei reduzierter Bewegung bleibt es statisch. Das Markup ist
* vollständig server-gerendert, JS fügt nur die Reaktion hinzu.
*/
export default function KineticWordmark() {
const rootRef = useRef<HTMLDivElement>(null);
const letterRefs = useRef<(HTMLSpanElement | null)[]>([]);
useEffect(() => {
const root = rootRef.current;
const area = root?.closest("section");
if (!root || !area) return;
const fine = window.matchMedia?.("(hover: hover) and (pointer: fine)")?.matches ?? false;
const reduce = window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches ?? false;
if (!fine || reduce) return;
const state = LETTERS.map(() => ({ w: REST.wght, d: REST.wdth, vw: 0, vd: 0, tw: REST.wght, td: REST.wdth }));
let raf = 0;
const loop = () => {
let moving = false;
state.forEach((s, i) => {
s.vw = (s.vw + (s.tw - s.w) * 0.08) * 0.78;
s.w += s.vw;
s.vd = (s.vd + (s.td - s.d) * 0.08) * 0.78;
s.d += s.vd;
if (Math.abs(s.vw) + Math.abs(s.vd) > 0.05) moving = true;
const el = letterRefs.current[i];
if (el) el.style.fontVariationSettings = `"wght" ${s.w.toFixed(1)}, "wdth" ${s.d.toFixed(1)}`;
});
raf = moving ? requestAnimationFrame(loop) : 0;
};
const kick = () => {
if (!raf) raf = requestAnimationFrame(loop);
};
const onMove = (e: PointerEvent) => {
letterRefs.current.forEach((el, i) => {
if (!el) return;
const r = el.getBoundingClientRect();
const dist = Math.hypot(e.clientX - (r.left + r.width / 2), e.clientY - (r.top + r.height / 2));
const f = Math.min(1, dist / REACH_PX);
state[i].tw = NEAR.wght + f * (REST.wght - NEAR.wght);
state[i].td = NEAR.wdth + f * (REST.wdth - NEAR.wdth);
});
kick();
};
const onLeave = () => {
state.forEach((s) => {
s.tw = REST.wght;
s.td = REST.wdth;
});
kick();
};
area.addEventListener("pointermove", onMove);
area.addEventListener("pointerleave", onLeave);
return () => {
cancelAnimationFrame(raf);
area.removeEventListener("pointermove", onMove);
area.removeEventListener("pointerleave", onLeave);
};
}, []);
return (
<div
ref={rootRef}
aria-hidden="true"
className="flex select-none items-end justify-between font-display text-[clamp(8.5rem,33vw,31rem)] leading-[0.78] tracking-[-0.05em]"
>
{LETTERS.map((letter, i) => (
<span
key={letter}
ref={(el) => {
letterRefs.current[i] = el;
}}
className={`inline-block animate-wordmark-up ${letter === "0" ? "text-paper" : ""}`}
style={{ fontVariationSettings: `"wght" ${REST.wght}, "wdth" ${REST.wdth}`, animationDelay: `${i * 80}ms` }}
>
{letter}
</span>
))}
</div>
);
}
-41
View File
@@ -1,41 +0,0 @@
"use client";
import React, { useEffect, useState } from "react";
const ToastProvider = React.lazy(() =>
import("@/components/Toast").then((mod) => ({
default: mod.ToastProvider,
}))
);
const BackgroundBlobs = React.lazy(() =>
import("@/components/BackgroundBlobs")
);
const ChatWidget = React.lazy(() => import("./ChatWidget"));
export default function RootProviders({
children,
}: {
children: React.ReactNode;
}) {
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
if (!mounted) {
return <div className="relative z-10">{children}</div>;
}
return (
<React.Suspense fallback={<div className="relative z-10">{children}</div>}>
<ToastProvider>
<BackgroundBlobs />
<div className="relative z-10">{children}</div>
<ChatWidget />
</ToastProvider>
</React.Suspense>
);
}
@@ -1,33 +0,0 @@
// Pure CSS gradient background — replaces the Three.js/WebGL shader gradient.
// Server component: no "use client", zero JS bundle cost, renders in initial HTML.
// Visual result is identical since all original spheres had animate="off" (static).
export default function ShaderGradientBackground() {
return (
<div
aria-hidden="true"
className="fixed inset-0 -z-10 overflow-hidden pointer-events-none"
>
<div
className="absolute -top-[10%] -left-[15%] w-[55%] h-[65%] rounded-full opacity-60"
style={{
background: "radial-gradient(ellipse at 50% 50%, #b01040 0%, #e167c5 40%, transparent 70%)",
filter: "blur(80px)",
}}
/>
<div
className="absolute top-[25%] -right-[10%] w-[50%] h-[60%] rounded-full opacity-55"
style={{
background: "radial-gradient(ellipse at 50% 50%, #e167c5 0%, #b01040 40%, transparent 70%)",
filter: "blur(80px)",
}}
/>
<div
className="absolute -bottom-[15%] left-[5%] w-[50%] h-[60%] rounded-full opacity-50"
style={{
background: "radial-gradient(ellipse at 50% 50%, #b04a17 0%, #e167c5 40%, transparent 70%)",
filter: "blur(80px)",
}}
/>
</div>
);
}
+5 -5
View File
@@ -13,7 +13,7 @@ export function ThemeToggle() {
}, []);
if (!mounted) {
return <div className="w-9 h-9" />;
return <div className="ml-1 h-9 w-9" />;
}
const cycle = () => {
@@ -24,16 +24,16 @@ export function ThemeToggle() {
return (
<button
onClick={cycle}
className="p-2 rounded-full bg-stone-100 dark:bg-stone-800 text-stone-800 dark:text-stone-100 hover:bg-stone-200 dark:hover:bg-stone-700 border border-stone-200 dark:border-stone-700 shadow-sm active:scale-[0.97] transition-[background-color,transform] duration-150 ease-out"
className="ml-1 rounded-full border-[1.5px] border-ink p-2 text-ink transition-[background-color,color,transform] duration-150 ease-out hover:bg-ink hover:text-paper active:scale-[0.97]"
aria-label={`Current theme: ${theme}. Click to switch.`}
title={theme === "system" ? "System" : theme === "dark" ? "Dark" : "Light"}
>
{theme === "system" ? (
<Monitor size={18} className="text-stone-500 dark:text-stone-300" />
<Monitor size={16} />
) : theme === "dark" ? (
<Sun size={18} className="text-amber-400" />
<Sun size={16} />
) : (
<Moon size={18} className="text-stone-600" />
<Moon size={16} />
)}
</button>
);