Compare commits
2 commits
10b5ce30a3
...
aa9153e50d
Author | SHA1 | Date | |
---|---|---|---|
aa9153e50d | |||
dba1380966 |
2 changed files with 10 additions and 14 deletions
|
@ -9,18 +9,18 @@ html {
|
|||
--font-family: comic-mono Consolas sans-serif;
|
||||
--syntax-tab-size: 2;
|
||||
|
||||
--background-color: var(--xkcd-very-dark-brown);
|
||||
--text-color: var(--xkcd-light-grey);
|
||||
--text-color-link: var(--xkcd-steel-blue);
|
||||
--accent-color: var(--xkcd-bronze);
|
||||
--background-color: var(--xkcd-eggshell);
|
||||
--text-color: var(--xkcd-dark-grey);
|
||||
--text-color-link: var(--xkcd-teal);
|
||||
--accent-color: var(--xkcd-red-orange);
|
||||
}
|
||||
|
||||
@media(prefers-color-scheme: light) {
|
||||
@media(prefers-color-scheme: dark) {
|
||||
html {
|
||||
--background-color: var(--xkcd-eggshell);
|
||||
--text-color: var(--xkcd-dark-grey);
|
||||
--text-color-link: var(--xkcd-teal);
|
||||
--accent-color: var(--xkcd-red-orange);
|
||||
--background-color: var(--xkcd-very-dark-brown);
|
||||
--text-color: var(--xkcd-light-grey);
|
||||
--text-color-link: var(--xkcd-steel-blue);
|
||||
--accent-color: var(--xkcd-bronze);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,11 +22,7 @@ function themeClear() {
|
|||
themeRefresh();
|
||||
}
|
||||
|
||||
function themeRefresh(newValue) {
|
||||
if (newValue !== undefined) {
|
||||
localStorage.setItem('theme', newValue);
|
||||
}
|
||||
|
||||
function themeRefresh() {
|
||||
const theme = localStorage.getItem('theme')
|
||||
const el = document.getElementsByTagName('html')[0];
|
||||
if (theme == 'light') {
|
||||
|
|
Loading…
Add table
Reference in a new issue