Add a dark mode, fixes #7
This commit is contained in:
parent
cca7f55760
commit
9a0e2e523a
7 changed files with 54 additions and 10 deletions
|
@ -10,6 +10,11 @@ body {
|
|||
font-weight: lighter;
|
||||
}
|
||||
|
||||
body.nightmode {
|
||||
background: #111;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: lighter;
|
||||
font-size: 1.4em;
|
||||
|
@ -24,6 +29,10 @@ h1 {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.nightmode #date {
|
||||
border-bottom-color: #333;
|
||||
}
|
||||
|
||||
.starred:after {
|
||||
content: "*";
|
||||
}
|
||||
|
@ -35,6 +44,10 @@ header p {
|
|||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.nightmode header p {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
|
|
|
@ -47,3 +47,8 @@ function setFont(font, size) {
|
|||
document.body.style.fontFamily = font;
|
||||
document.body.style.fontSize = size + "pt";
|
||||
}
|
||||
|
||||
function setNightmode(nightmode) {
|
||||
if(nightmode) document.body.className = "nightmode";
|
||||
else document.body.className = "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue