Fix styles on dark mode

main
Araozu 2024-05-01 06:50:59 -05:00
parent 84dfae9a8c
commit 0cd241c539
3 changed files with 6 additions and 1 deletions

View File

@ -2,12 +2,16 @@
:root { :root {
--c-bg: #101010; --c-bg: #101010;
--c-on-bg: #dedede; --c-on-bg: #dedede;
--c-bg-2: #18181b;
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
:root { :root {
--c-bg: #f5f5f5; --c-bg: #f5f5f5;
--c-on-bg: #101010; --c-on-bg: #101010;
--c-bg-2: white;
} }
} }

View File

@ -34,7 +34,7 @@ import Sidebar from "../components/Sidebar.astro";
<div class="2xl:grid 2xl:grid-cols-2 2xl:gap-2"> <div class="2xl:grid 2xl:grid-cols-2 2xl:gap-2">
<div <div
x-data="{open: true}" x-data="{open: true}"
class="shadow-lg p-2 bg-white rounded-md max-w-[50rem] border border-slate-600" class="shadow-lg p-2 bg-c-bg-2 rounded-md max-w-[50rem] border border-slate-600 dark:border-transparent"
> >
<h2 <h2
class="text-2xl font-bold py-2 pl-2 cursor-pointer hover:underline sticky top-0 border-b border-b-slate-600" class="text-2xl font-bold py-2 pl-2 cursor-pointer hover:underline sticky top-0 border-b border-b-slate-600"

View File

@ -6,6 +6,7 @@ export default {
colors: { colors: {
'c-bg': 'var(--c-bg)', 'c-bg': 'var(--c-bg)',
'c-on-bg': 'var(--c-on-bg)', 'c-on-bg': 'var(--c-on-bg)',
'c-bg-2': 'var(--c-bg-2)',
}, },
}, },
}, },