chore: updating color scheme with dark mode

This commit is contained in:
2026-01-23 17:40:33 +01:00
parent b373cbcba1
commit 039c52a8b7
4 changed files with 18 additions and 18 deletions
+1
View File
@@ -65,6 +65,7 @@ export default defineComponent({
} }
this.store.orderDarkMode = this.getOrderSetting('dark-mode') === 'true'; this.store.orderDarkMode = this.getOrderSetting('dark-mode') === 'true';
document.documentElement.setAttribute('data-theme', this.store.orderDarkMode ? 'dark' : 'light');
}, },
handleQueries() { handleQueries() {
+12 -1
View File
@@ -2,9 +2,14 @@
<nav class="app-navbar"> <nav class="app-navbar">
<div class="navbar-brand"> <div class="navbar-brand">
<img src="/favicon.ico" alt="generator logo" width="30" /> <img src="/favicon.ico" alt="generator logo" width="30" />
<div>
<b> <b>
Genera<span class="text--accent">TOR</span> <sup class="text--grayed">v{{ version }}</sup> Genera<span class="text--accent">TOR</span>
<sup class="text--grayed">v{{ version }}</sup>
</b> </b>
<b class="brand-author">&nbsp;by Spythere</b>
</div>
</div> </div>
<div class="navbar-actions"> <div class="navbar-actions">
@@ -31,6 +36,7 @@ const store = useStore();
function switchDarkMode() { function switchDarkMode() {
store.orderDarkMode = !store.orderDarkMode; store.orderDarkMode = !store.orderDarkMode;
window.localStorage.setItem('dark-mode', `${store.orderDarkMode}`); window.localStorage.setItem('dark-mode', `${store.orderDarkMode}`);
document.documentElement.setAttribute('data-theme', store.orderDarkMode ? 'dark' : 'light');
} }
function switchLang() { function switchLang() {
@@ -60,6 +66,11 @@ function switchLang() {
} }
} }
.brand-author {
font-size: 0.8em;
color: #aaa;
}
.navbar-actions { .navbar-actions {
display: flex; display: flex;
align-items: center; align-items: center;
+2 -15
View File
@@ -1,21 +1,8 @@
@use 'fonts'; @use 'fonts';
@use 'colors'; @use 'colors';
// Global scrollbar style [data-theme='dark'] {
::-webkit-scrollbar { color-scheme: dark;
width: 15px;
}
::-webkit-scrollbar-track {
background: #333;
}
::-webkit-scrollbar-thumb {
background: #888;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
} }
body, body,
+1
View File
@@ -110,6 +110,7 @@ const panelComponent = computed(() => {
.panel-container { .panel-container {
display: grid; display: grid;
grid-template-rows: auto auto 1fr; grid-template-rows: auto auto 1fr;
color-scheme: dark;
padding: 2px; padding: 2px;
max-width: 800px; max-width: 800px;