- Replace next-themes (38 KiB) with a tiny custom ThemeProvider (~< 1 KiB)
using localStorage + classList.toggle for theme management
- Add FOUC-prevention inline script in layout.tsx to apply saved theme
before React hydrates
- Remove framer-motion from Header.tsx: nav entry now uses CSS slideDown
keyframe, mobile menu uses CSS opacity/translate transitions
- Remove framer-motion from ThemeToggle.tsx: use Tailwind hover/active scale
- Remove framer-motion from legal-notice and privacy-policy pages
- Update useTheme import in ThemeToggle to use custom ThemeProvider
- Add slideDown keyframe to tailwind.config.ts
- Update tests to mock custom ThemeProvider instead of next-themes
Result: framer-motion moves from "First Load JS shared by all" to lazy
chunks; next-themes chunk eliminated entirely; -38 KiB from initial bundle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TipTap (ProseMirror) was causing:
- chunks 1007 (85 KiB) and 3207 (58 KiB) in the initial bundle
- Array.prototype.at/flat/flatMap, Object.fromEntries/hasOwn polyfills
(ProseMirror bundles core-js for these — the 12 KiB legacy JS flag)
- 2+ seconds of main thread blocking on mobile
Fix: move HTML conversion to the server (API route) and pass the
resulting HTML string to the client, eliminating the need to import
richTextToSafeHtml (and transitively TipTap) in any client component.
Changes:
- app/api/content/page/route.ts: call richTextToSafeHtml server-side,
add html: string to response alongside existing content
- app/components/RichTextClient.tsx: accept html string, remove all
TipTap imports — TipTap/ProseMirror now has zero client bundle cost
- app/components/About.tsx, Contact.tsx: use cmsHtml from API
- app/legal-notice/page.tsx, privacy-policy/page.tsx: same
- app/components/ClientWrappers.tsx: change static imports of About,
Projects, Contact, Footer to next/dynamic so their JS is in
separate lazy-loaded chunks, not in the initial bundle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Automated CMS content seeding, integrated interactive AI Chat into Bento grid, implemented intelligent idle quote logic, and unified editorial styling across all sub-pages.
Replace "@vercel/analytics" with "@tryghost/content-api" and add
"node-fetch" to dependencies. Remove "@vercel/speed-insights" to
streamline the package. Update robots.txt to dis access to
"/legal-notice" and "/privacy-policy". Change <p> tags to <div> in
the Privacy Policy for better structure. Update the last modified
date in the Legal Notice. Add a new API route for fetching images
with error handling for missing URL parameters.
* fix: update Umami script source to use HTTPS
Change the Umami script source from HTTP to HTTPS to enhance
security and ensure that the script is loaded securely. This
improves the overall integrity of the application by preventing
mixed content issues.
* feat: add legal notice page and update footer component
Creates a new legal notice page with necessary content and links.
Updates the Footer_Back component for improved formatting and
consistency. These changes ensure compliance with legal
requirements and enhance user experience.