feat: dark mode
This commit is contained in:
parent
9b826fde5f
commit
0f7465677c
@ -52,10 +52,10 @@ layout: default
|
|||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://unpkg.com/highlight.js@9.18.1/styles/night-owl.css"
|
href="https://unpkg.com/highlight.js@9.18.1/styles/night-owl.css"
|
||||||
/>
|
/>
|
||||||
<script src="https://unpkg.com/highlight.js@9.18.1/lib/highlight.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
|
||||||
<script src="https://unpkg.com/highlight.js@9.18.1/lib/languages/go.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/go.min.js"></script>
|
||||||
<script src="https://unpkg.com/highlight.js@9.18.1/lib/languages/scss.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/scss.min.js"></script>
|
||||||
<script src="https://unpkg.com/highlight.js@9.18.1/lib/languages/lua.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/languages/lua.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
hljs.initHighlightingOnLoad()
|
hljs.initHighlightingOnLoad()
|
||||||
</script>
|
</script>
|
@ -14,15 +14,15 @@
|
|||||||
.article-list__item__excerpt {
|
.article-list__item__excerpt {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #989898;
|
color: var(--tone);
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.article-list__item__button {
|
a.article-list__item__button {
|
||||||
border: 1px solid #989898;
|
border: 1px solid var(--tone);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: #989898;
|
color: var(--tone);
|
||||||
font-family: "Open Sans", sans-serif;
|
font-family: "Open Sans", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -31,8 +31,8 @@ a.article-list__item__button {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #989898;
|
background-color: var(--tone);
|
||||||
color: #fff;
|
color: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: $break-small) {
|
@media screen and (max-width: $break-small) {
|
||||||
@ -42,8 +42,8 @@ a.article-list__item__button {
|
|||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #fff;
|
background-color: var(--background);
|
||||||
color: #989898;
|
color: var(--tone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,12 +83,12 @@ a.article-list__item__button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article__pubdate {
|
.article__pubdate {
|
||||||
color: #989898;
|
color: var(--tone);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border: 1px solid #989898;
|
border: 1px solid var(--tone);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 5px 20px;
|
padding: 5px 20px;
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ a.article-list__item__button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 5px solid red;
|
border-left: 5px solid var(--accent);
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -207,8 +207,8 @@ a.article-list__item__button {
|
|||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: block;
|
display: block;
|
||||||
background: black;
|
background: var(--text);
|
||||||
color: white;
|
color: var(--background);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,24 @@
|
|||||||
$break-small: 500px;
|
$break-small: 500px;
|
||||||
$break-large: 840px;
|
$break-large: 840px;
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background: #fff;
|
||||||
|
--text: #000;
|
||||||
|
--accent: #4f33e8;
|
||||||
|
--highlight: #f6f6f6;
|
||||||
|
--tone: #989898;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--background: #261e3a;
|
||||||
|
--text: #e2dfea;
|
||||||
|
--accent: #7033e8;
|
||||||
|
--highlight: #140d25;
|
||||||
|
--tone: #989898;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 900px;
|
width: 900px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -17,6 +35,8 @@ body {
|
|||||||
-webkit-font-feature-settings: "kern", "palt", "pwid";
|
-webkit-font-feature-settings: "kern", "palt", "pwid";
|
||||||
-moz-font-feature-settings: "kern", "palt", "pwid";
|
-moz-font-feature-settings: "kern", "palt", "pwid";
|
||||||
-moz-font-feature-settings: "kern=1", "palt", "pwid";
|
-moz-font-feature-settings: "kern=1", "palt", "pwid";
|
||||||
|
background: var(--background);
|
||||||
|
color: var(--text);
|
||||||
|
|
||||||
@media screen and (max-width: $break-large) {
|
@media screen and (max-width: $break-large) {
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -34,6 +54,7 @@ body {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
// font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
// font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||||
// font-size: 14px;
|
// font-size: 14px;
|
||||||
|
background: #0e0127 !important;
|
||||||
padding: 12px 18px !important;
|
padding: 12px 18px !important;
|
||||||
line-height: 1.6em !important;
|
line-height: 1.6em !important;
|
||||||
}
|
}
|
||||||
@ -42,7 +63,7 @@ code {
|
|||||||
}
|
}
|
||||||
p code {
|
p code {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
background: #f6f6f6;
|
background: var(--highlight);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@ -50,7 +71,7 @@ a:hover,
|
|||||||
a:active,
|
a:active,
|
||||||
a:link,
|
a:link,
|
||||||
a:visited {
|
a:visited {
|
||||||
color: black;
|
color: var(--text);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
h1,
|
h1,
|
||||||
@ -66,7 +87,7 @@ hr {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background-color: #dbdbdb;
|
background-color: var(--highlight);
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 40px 0;
|
margin: 40px 0;
|
||||||
}
|
}
|
||||||
@ -86,6 +107,9 @@ hr {
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
margin: 10px 0 10px;
|
margin: 10px 0 10px;
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user