Skip to content

Build your personal knowledge base with Trilium Notes

style(website): general dark theme

Elian Doran4afceeca798c
diff --git a/apps/website2/src/components/Header.css b/apps/website2/src/components/Header.css
index fe1b8fecc0..980b2b4afd 100644
--- a/apps/website2/src/components/Header.css
+++ b/apps/website2/src/components/Header.css
@@ -2,7 +2,7 @@ header {
padding: 1em;
position: sticky;
top: 0;
- background: rgba(255, 255, 255, 0.75);
+ background: var(--header-background-color);
box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(20px);
z-index: 1000;
diff --git a/apps/website2/src/style.css b/apps/website2/src/style.css
index e55c0c3c3b..0acee2a00a 100644
--- a/apps/website2/src/style.css
+++ b/apps/website2/src/style.css
@@ -1,10 +1,18 @@
:root {
- --card-bg: #fff;
+ --background-color: #fff;
+ --foreground-color: black;
+ --header-background-color: rgba(255, 255, 255, 0.75);
--brand-1: #e47b19;
--brand-2: #4fa52b;
--brand-3: #e33f3b;
- --bg-dark: #0a0e14;
- --text-on-dark: #ffffff;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --foreground-color: #fff;
+ --background-color: #0a0e14;
+ --header-background-color: rgba(0, 0, 0, 0.75);
+ }
}
html,
@@ -16,8 +24,8 @@ body {
body {
font-family: sans-serif;
- background: white;
- color: black;
+ background: var(--background-color);
+ color: var(--foreground-color);
}
a {