From fed3c6c6f25bfd5c3906581c074fb9b76c13e312 Mon Sep 17 00:00:00 2001 From: Yllen Fernandez <59622068+yllenfer@users.noreply.github.com> Date: Tue, 8 Jul 2025 23:45:36 +0200 Subject: [PATCH] feat: implement comprehensive dark mode support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Features: - Add dark mode toggle button with sun/moon icons - Implement theme persistence using next-themes - Add smooth transitions between light and dark themes 🎨 UI Improvements: - Update all hardcoded colors to use theme-aware Tailwind classes - Fix font visibility in dark mode across all components - Add dark:invert class to all SVG icons for proper contrast - Update loading animations and skeleton states for dark mode 🔧 Components Updated: - TopMenu: Added theme toggle and updated button colors - CustomSpinner: Fixed loading animation visibility - Resume components: Updated all text and background colors - Form components: Updated input and button styling - Footer: Updated links and icon colors 🖼️ Icons Fixed: - Logo, GitHub, footer icons with dark:invert - Sparkle icons in upload and generate buttons - Site live and upload PDF icons 📱 Features: - System theme preference detection - Theme persistence across sessions - Print-friendly resume (stays white for printing) - No theme flash on page load --- app/(private)/upload/client.tsx | 18 ++++---- app/[username]/loading.tsx | 20 ++++----- app/[username]/page.tsx | 4 +- app/layout.tsx | 12 +++++- app/page.tsx | 14 +++---- components/CustomSpinner.tsx | 20 ++++----- components/Footer.tsx | 16 +++---- components/PopupSiteLive.tsx | 8 ++-- components/PreviewActionbar.tsx | 4 +- components/TopMenu.tsx | 12 +++--- components/resume/Education.tsx | 4 +- components/resume/FullResume.tsx | 2 +- components/resume/Header.tsx | 8 ++-- components/resume/Summary.tsx | 2 +- components/resume/WorkExperience.tsx | 12 +++--- components/resume/editing/AddButton.tsx | 2 +- components/resume/editing/EditResume.tsx | 8 ++-- components/resume/editing/EducationField.tsx | 2 +- components/resume/editing/SkillField.tsx | 4 +- .../resume/editing/WorkExperienceField.tsx | 2 +- components/ui/dropzone.tsx | 8 ++-- components/ui/theme-toggle.tsx | 42 +++++++++++++++++++ 22 files changed, 138 insertions(+), 86 deletions(-) create mode 100644 components/ui/theme-toggle.tsx diff --git a/app/(private)/upload/client.tsx b/app/(private)/upload/client.tsx index 2761726..c00b6de 100644 --- a/app/(private)/upload/client.tsx +++ b/app/(private)/upload/client.tsx @@ -2,7 +2,7 @@ import { Button } from '@/components/ui/button'; import { Dropzone } from '@/components/ui/dropzone'; -import { Linkedin, X } from 'lucide-react'; +import { FileText, X } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { toast } from 'sonner'; import { @@ -74,10 +74,10 @@ export default function UploadPageClient() { {fileState.status !== 'empty' && ( - + )} @@ -86,20 +86,20 @@ export default function UploadPageClient() { maxFiles={1} icon={ fileState.status !== 'empty' ? ( - + ) : ( - + ) } title={ - + {fileState.status !== 'empty' ? fileState.file.name : 'Upload PDF'} } description={ - + {fileState.status !== 'empty' ? `${(fileState.file.size / 1024 / 1024).toFixed(2)} MB` : 'Resume or LinkedIn'} @@ -138,7 +138,7 @@ export default function UploadPageClient() { router.push('/pdf')} > @@ -152,7 +152,7 @@ export default function UploadPageClient() { Generate Website > diff --git a/app/[username]/loading.tsx b/app/[username]/loading.tsx index 91b47d0..e9500f7 100644 --- a/app/[username]/loading.tsx +++ b/app/[username]/loading.tsx @@ -1,27 +1,27 @@ export default function LoadingUsernamePage() { return ( - - - + + + - - - + + + - + - - + + diff --git a/app/[username]/page.tsx b/app/[username]/page.tsx index ef76693..cdae94a 100644 --- a/app/[username]/page.tsx +++ b/app/[username]/page.tsx @@ -85,10 +85,10 @@ export default async function ProfilePage({ Made by{' '} - + Self.so diff --git a/app/layout.tsx b/app/layout.tsx index b5ea15d..be52fb7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,7 @@ import { ClerkProvider } from '@clerk/nextjs'; import './globals.css'; import { Toaster } from '@/components/ui/sonner'; import { ReactQueryClientProvider } from '@/components/ReactQueryClientProvider'; +import { ThemeProvider } from '@/components/theme-provider'; import { Metadata } from 'next'; import PlausibleProvider from 'next-plausible'; @@ -39,8 +40,15 @@ export default function RootLayout({ {/* rest of your scripts go under */} - {children} - + + {children} + +