[SCSS, some dart] Theme rework, dark dropped, nord replaces dark
The old dark mode is dropped and replaced with nord. Light and black themes were also rebased on the Nord theme. Code blocks now appear the same way my terminal windows appear in my Linux configuration, emulating a side titlebar.
This commit is contained in:
@@ -3,7 +3,7 @@ import 'dart:html' show window, querySelector;
|
||||
final localStorage = window.localStorage;
|
||||
|
||||
Future<void> setTheme([String? theme]) async {
|
||||
theme ??= localStorage['theem'] ??
|
||||
theme ??= localStorage['theme'] ??
|
||||
(window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
? 'dark'
|
||||
: 'light');
|
||||
@@ -14,7 +14,7 @@ Future<void> setTheme([String? theme]) async {
|
||||
}
|
||||
|
||||
void enableThemeChanger() {
|
||||
final themes = <String>['light', 'dark', 'nord', 'black'];
|
||||
final themes = <String>['light', 'dark', 'black'];
|
||||
themes.forEach((theme) =>
|
||||
querySelector('#${theme}Btn')!.onClick.listen((_) => setTheme(theme)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user