summaryrefslogtreecommitdiff
path: root/assets/css
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-09-07 18:10:54 +0200
committerBotond Hende <nettingman@gmail.com>2024-09-07 18:10:54 +0200
commitb982508df0c4514544c1c5b0fff2573147d34e67 (patch)
tree94ae75aa01ee96d09bcbbf6797d8846db3fdff70 /assets/css
parentdecab05a85ea33eeffe75b6275678463277576b6 (diff)
light theme support
Diffstat (limited to 'assets/css')
-rw-r--r--assets/css/blog.css35
-rw-r--r--assets/css/font.css9
2 files changed, 33 insertions, 11 deletions
diff --git a/assets/css/blog.css b/assets/css/blog.css
index 8928235..028e4b9 100644
--- a/assets/css/blog.css
+++ b/assets/css/blog.css
@@ -12,14 +12,27 @@
--term-white: #b5aba8;
}
-@font-face {
- font-family: "jetbrains-mono";
- src: url("/assets/font/JetBrainsMono-Regular.woff2");
+[used-theme="light"] {
+ --term-fg: #515151;
+ --term-bg: #f3f3f3;
+ --term-black: #515151;
+ --term-red: #ff001e;
+ --term-green: #5eaa0c;
+ --term-yellow: #f29b00;
+ --term-blue: #0098ca;
+ --term-magenta: #d52ad2;
+ --term-cyan: #00dad5;
+ --term-white: #f3f3f3;
+}
+
+a[class*="theme-selector"] {
+ color: var(--term-green);
}
-html {
- font-family: "jetbrains-mono", serif;
- font-variant-ligatures: none;
+html:not([used-theme]) .theme-selector-dark,
+html[used-theme="dark"] .theme-selector-dark,
+html[used-theme="light"] .theme-selector-light {
+ display: none;
}
header, .icon-text {
@@ -39,7 +52,7 @@ header, .icon-text {
header {
margin-top: 0rem;
- margin-bottom 1rem;
+ margin-bottom: 1rem;
}
header div {
@@ -61,7 +74,7 @@ header span {
hr {
width: 90%;
- color: var(--term-black);
+ color: var(--term-bg);
}
.nobr,
@@ -105,7 +118,7 @@ hr {
.code-block,
.code-block-wrap {
border-style: solid;
- border-color: var(--term-white);
+ border-color: var(--term-fg);
border-width: 0.1rem;
padding: 0.7rem;
}
@@ -171,7 +184,7 @@ img
max-width: 100%;
max-height: 100%;
border-style: solid;
- border-color: var(--term-black);
+ border-color: var(--term-bg);
border-width: 0.1rem;
width: 100%;
}
@@ -215,7 +228,7 @@ a.posts-listing-link:hover :is(h2, h3)
@media (min-width: 768px) {
main {
border-width: 0.15rem;
- border-color: var(--term-black);
+ border-color: var(--term-bg);
border-style: none solid none solid;
}
}
diff --git a/assets/css/font.css b/assets/css/font.css
new file mode 100644
index 0000000..cda8b7a
--- /dev/null
+++ b/assets/css/font.css
@@ -0,0 +1,9 @@
+@font-face {
+ font-family: "jetbrains-mono";
+ src: url("/assets/font/JetBrainsMono-Regular.woff2");
+}
+
+html {
+ font-family: "jetbrains-mono", serif;
+ font-variant-ligatures: none;
+} \ No newline at end of file