summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorverdant <i@glowisle.me>2026-05-10 18:21:52 +0800
committerverdant <i@glowisle.me>2026-05-10 18:21:52 +0800
commit82c242d25cee340e7675d693708bff448aba1aa4 (patch)
tree66b86729d8fa21b9982f0a5ef0d7645b26fdd252
parentb5104eef51826ccfd6c4120d744e2524593299dc (diff)
downloadblog-82c242d25cee340e7675d693708bff448aba1aa4.tar.gz
blog-82c242d25cee340e7675d693708bff448aba1aa4.zip
style: add dark mode switcher
-rw-r--r--static/style.css14
1 files changed, 13 insertions, 1 deletions
diff --git a/static/style.css b/static/style.css
index a673a13..6a90c3c 100644
--- a/static/style.css
+++ b/static/style.css
@@ -4,6 +4,13 @@
--font-size-primary: 1.08rem;
--font-size-secondary: 1.05rem;
+ --font-size-h1: calc(var(--font-size-primary) * 1.953125); /* ≈2.11rem ≈33.8px */
+ --font-size-h2: calc(var(--font-size-primary) * 1.5625); /* ≈1.69rem ≈27.0px */
+ --font-size-h3: calc(var(--font-size-primary) * 1.25); /* ≈1.35rem ≈21.6px */
+ --font-size-h4: calc(var(--font-size-primary) * 1.0); /* ≈1.08rem ≈17.3px */
+ --font-size-h5: calc(var(--font-size-primary) * 0.875); /* ≈0.945rem ≈15.1px */
+ --font-size-h6: calc(var(--font-size-primary) * 0.75);
+
--body-bg-color: #fbf8f2;
--bold-text-color: #1e1e1e;
--body-text-color: #3d3a35;
@@ -37,7 +44,12 @@
--svg-size: 0.85em;
}
-
+h1 { font-size: var(--font-size-h1); font-weight: 700; line-height: 1.2; margin: 0.67em 0; }
+h2 { font-size: var(--font-size-h2); font-weight: 600; line-height: 1.25; margin: 0.83em 0; }
+h3 { font-size: var(--font-size-h3); font-weight: 600; line-height: 1.3; margin: 1em 0; }
+h4 { font-size: var(--font-size-h4); font-weight: 600; line-height: 1.4; margin: 1.33em 0; }
+h5 { font-size: var(--font-size-h5); font-weight: 500; line-height: 1.5; margin: 1.67em 0; text-transform: uppercase; }
+h6 { font-size: var(--font-size-h6); font-weight: 500; line-height: 1.5; margin: 2em 0; color: #666; }
p {
font-size: var(--font-size-primary);