experimental darkmode support

This commit is contained in:
dongdigua 2024-11-18 17:51:32 +08:00
parent 5bcea970e2
commit 292687fa57
2 changed files with 22 additions and 1 deletions

21
css/dark.css Normal file
View File

@ -0,0 +1,21 @@
/* minimal darkmode
this sucks. but I don't want to edit main.css shit */
@media (prefers-color-scheme: dark) {
* {
background-color: #1e1e2e !important;
color: #cdd6f4 !important;
}
h2, h3, h4 {
color: #b4befe !important;
}
img {
filter: grayscale(50%);
}
a {
color: #89b4fa !important;
}
pre, pre span, code {
color: #a6e3a1 !important;
}
}

View File

@ -44,7 +44,7 @@
:publishing-function org-html-publish-to-html :publishing-function org-html-publish-to-html
:preserve-breaks t :preserve-breaks t
:html-head "<link rel='stylesheet' href='css/main.css' /><link rel='stylesheet' href='css/org.small.css' />" :html-head "<link rel='stylesheet' href='css/main.css' /><link rel='stylesheet' href='css/org.small.css' /><link rel='stylesheet' href='css/dark.css' />"
;; :html-head-include-default-style nil ;; :html-head-include-default-style nil
:html-link-home "https://dongdigua.github.io" :html-link-home "https://dongdigua.github.io"
:html-link-up "./../posts" :html-link-up "./../posts"