add dark mode
This commit is contained in:
parent
2de8f368b5
commit
dc02a8df97
3 changed files with 71 additions and 51 deletions
54
sass/_content.scss
Normal file
54
sass/_content.scss
Normal file
|
@ -0,0 +1,54 @@
|
|||
body {
|
||||
max-width: 850px;
|
||||
margin: auto;
|
||||
min-height: 100%;
|
||||
padding-bottom: 20px;
|
||||
font-family: $sansfont;
|
||||
|
||||
background-color: $background-color;
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: auto 12px;
|
||||
|
||||
#header {
|
||||
border-bottom: 2px solid $link-color;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
#title {
|
||||
font-size: 2em;
|
||||
color: $text-color;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: $link-color;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&.permalink {
|
||||
color: lighten($link-color, 25%);
|
||||
font-size: 0.65em;
|
||||
}
|
||||
}
|
||||
|
||||
#content {
|
||||
line-height: 1.25em;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 5px;
|
||||
overflow-x: auto;
|
||||
font-family: $monofont;
|
||||
}
|
|
@ -1,56 +1,20 @@
|
|||
@import "syntax.scss";
|
||||
@import "syntax";
|
||||
|
||||
$sansfont: "Helvetica", "Arial", "Liberation Sans", sans-serif;
|
||||
$monofont: "Roboto Mono", "Roboto Mono for Powerline", "Inconsolata", "Consolas", monospace;
|
||||
|
||||
html {
|
||||
background-color: lightskyblue;
|
||||
// colors
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
$background-color: #EADFD4;
|
||||
$text-color: #15202B;
|
||||
$link-color: royalblue;
|
||||
@import "content";
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 850px;
|
||||
margin: auto;
|
||||
background-color: white;
|
||||
min-height: 100%;
|
||||
padding-bottom: 20px;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
#header {
|
||||
border-bottom: 4px solid lightskyblue;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
#title {
|
||||
font-size: 2em;
|
||||
color: black;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: royalblue;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&.permalink {
|
||||
color: lighten(royalblue, 25%);
|
||||
font-size: 0.65em;
|
||||
}
|
||||
}
|
||||
|
||||
#content {
|
||||
line-height: 1.25em;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 5px;
|
||||
overflow-x: auto;
|
||||
font-family: $monofont;
|
||||
@media (prefers-color-scheme: dark) {
|
||||
$background-color: #15202B;
|
||||
$text-color: #EADFD4;
|
||||
$link-color: lightskyblue;
|
||||
@import "content";
|
||||
}
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/main.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue