Private
Public Access
1
0

feat: add dark/light mode toggle to navigation, enhance sidebar styles, and update layout colors

- Implemented a button for toggling between dark and light modes in the navigation component.
- Adjusted sidebar width and improved active link indicators with shadows for better visibility.
- Updated layout colors for a more vibrant and cohesive theme, focusing on a "Pure Neutral Black + Neon" aesthetic.
- Refined ambient gradient accents for improved content readability across devices.
- Enhanced console layout for better responsiveness and user experience.
This commit is contained in:
2026-04-22 01:43:38 -04:00
parent 68043f0416
commit 6440a24390
22 changed files with 1244 additions and 59 deletions

View File

@@ -41,7 +41,8 @@ class ForceTheme extends Extension
$key = $this->config('local_storage_key') ?: '_x_darkMode';
$modeJs = e($mode);
$keyJs = e($key);
$script = "<script>(function(){try{var m='" . $modeJs . "';var k='" . $keyJs . "';var def='_x_darkMode';var v=(m==='dark')?'true':'false';localStorage.setItem(k, v);if(k!==def){localStorage.setItem(def, v);} }catch(e){}})();</script>";
// Only set the default when the user has not yet made a choice; respect any existing selection so toggles persist.
$script = "<script>(function(){try{var m='" . $modeJs . "';var k='" . $keyJs . "';var def='_x_darkMode';var v=(m==='dark')?'true':'false';if(localStorage.getItem(def)===null){localStorage.setItem(def, v);}if(k!==def&&localStorage.getItem(k)===null){localStorage.setItem(k, v);} }catch(e){}})();</script>";
return ['view' => new HtmlString($script)];
});
}