mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-03 05:28:13 +00:00
chore: updating color scheme with dark mode
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
@@ -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" />
|
||||||
<b>
|
<div>
|
||||||
Genera<span class="text--accent">TOR</span> <sup class="text--grayed">v{{ version }}</sup>
|
<b>
|
||||||
</b>
|
Genera<span class="text--accent">TOR</span>
|
||||||
|
<sup class="text--grayed">v{{ version }}</sup>
|
||||||
|
</b>
|
||||||
|
|
||||||
|
<b class="brand-author"> 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
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user