New Icon/Logo

This commit is contained in:
Zimeng Xiong
2025-11-22 09:45:20 -08:00
parent 0c843eb37d
commit 05d472189c
11 changed files with 806 additions and 247 deletions
+7
View File
@@ -18,6 +18,13 @@ export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ childre
useEffect(() => {
console.log('Theme changed to:', theme);
localStorage.setItem('theme', theme);
// Update favicon
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
if (link) {
link.href = theme === 'dark' ? '/favicon-dark.svg' : '/favicon-light.svg';
}
if (theme === 'dark') {
document.documentElement.classList.add('dark');
console.log('Added dark class, classList:', document.documentElement.classList.toString());