fix: Default to light theme for all first-time visitors
First-time visitors now always see light theme (paper aesthetic) regardless of their system dark mode preference. Users can still switch to dark or auto mode, and their preference is saved to localStorage for future visits. This maintains the professional CV paper appearance as the default experience while giving users full control over their preference.
This commit is contained in:
@@ -53,8 +53,8 @@ function initColorTheme() {
|
||||
localStorage.setItem('color-theme-mode', existingTheme);
|
||||
setColorTheme(existingTheme);
|
||||
} else {
|
||||
// Fallback: Get saved preference or default to 'auto'
|
||||
const savedTheme = localStorage.getItem('color-theme-mode') || 'auto';
|
||||
// Fallback: Get saved preference or default to 'light' (paper aesthetic)
|
||||
const savedTheme = localStorage.getItem('color-theme-mode') || 'light';
|
||||
setColorTheme(savedTheme);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ function setupColorThemeButton() {
|
||||
if (button) {
|
||||
button.addEventListener('click', () => {
|
||||
// Get current theme
|
||||
const currentTheme = localStorage.getItem('color-theme-mode') || 'auto';
|
||||
const currentTheme = localStorage.getItem('color-theme-mode') || 'light';
|
||||
|
||||
// Cycle: auto → light → dark → auto
|
||||
if (currentTheme === 'auto') {
|
||||
|
||||
Reference in New Issue
Block a user