Darkmode implemented
There is now a darkmode button
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
// Color Palette (Reference Style)
|
||||
$color-bg: #f0f2f5;
|
||||
$color-bg-dark: #121212;
|
||||
$color-container: #ffffff;
|
||||
$color-container-dark: #333333;
|
||||
$color-bg: var(--color-bg);
|
||||
$color-bg-dark: var(--color-bg-dark);
|
||||
$color-container: var(--color-container);
|
||||
$color-container-dark: var(--color-container-dark);
|
||||
$color-sidebar: #0f172a;
|
||||
$color-primary: #2b79c2;
|
||||
$color-primary-hover: #1d5fa0;
|
||||
$color-accent: #2b79c2;
|
||||
$color-muted: #6b7280;
|
||||
$color-text: #111827;
|
||||
$color-text-dark: #e2e2e2;
|
||||
$color-text: var(--color-text);
|
||||
$color-text-dark: var(--color-text-dark);
|
||||
|
||||
// Status Colors
|
||||
$color-status-todo: #ffcccc;
|
||||
|
||||
75
frontend/src/styles/components/_dark_mode.scss
Normal file
75
frontend/src/styles/components/_dark_mode.scss
Normal file
@@ -0,0 +1,75 @@
|
||||
:root {
|
||||
--color-bg: #f0f2f5;
|
||||
--color-bg-dark: #121212;
|
||||
--color-container: #ffffff;
|
||||
--color-container-dark: #333333;
|
||||
--color-text: #111827;
|
||||
--color-text-dark: #e2e2e2;
|
||||
}
|
||||
|
||||
// Automatically respect standard media query if no override is set
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-bg: #121212;
|
||||
--color-container: #333333;
|
||||
--color-text: #e2e2e2;
|
||||
}
|
||||
}
|
||||
|
||||
// Force Light Mode overrides
|
||||
body.theme-light {
|
||||
--color-bg: #f0f2f5;
|
||||
--color-bg-dark: #f0f2f5;
|
||||
--color-container: #ffffff;
|
||||
--color-container-dark: #ffffff;
|
||||
--color-text: #111827;
|
||||
--color-text-dark: #111827;
|
||||
}
|
||||
|
||||
// Force Dark Mode overrides
|
||||
body.theme-dark {
|
||||
--color-bg: #121212;
|
||||
--color-bg-dark: #121212;
|
||||
--color-container: #333333;
|
||||
--color-container-dark: #333333;
|
||||
--color-text: #e2e2e2;
|
||||
--color-text-dark: #e2e2e2;
|
||||
}
|
||||
|
||||
// Fixed positioning ensures NO other component's layout is ever altered
|
||||
.dark-mode-toggle {
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
z-index: 9999;
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid rgba(128, 128, 128, 0.2);
|
||||
background-color: var(--color-container);
|
||||
color: var(--color-text);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
|
||||
svg {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
stroke: var(--color-text);
|
||||
transition: stroke 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
||||
background-color: var(--color-bg);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
@use "components/diagnostics";
|
||||
@use "components/pages";
|
||||
@use "components/setup";
|
||||
@use "components/dark_mode";
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
|
||||
Reference in New Issue
Block a user