Add auto dark theme

This commit is contained in:
Shea Polansky 2020-03-22 13:09:31 -07:00
parent fa8ad522cc
commit 661d436540
4 changed files with 210 additions and 2 deletions

View file

@ -0,0 +1,89 @@
#contentBody img {
box-shadow: 0px 3px 15px rgba(255,255,255,0.2);
}
#contentBody hr {
border-bottom: 1px solid #201d1a;
}
#contentBody hr {
background-color: #1e1b17;
}
#contentBody blockquote {
color: #958c82;
border-left: 0.25em solid #201d1a;
}
#contentBody kbd {
color: #bbb2a9;
background-color: #050403;
border: solid 1px #39342e;
border-bottom-color: #6a625a;
box-shadow: inset 0 -1px 0 #6a625a;
}
#contentBody h1 .octicon-link,
#contentBody h2 .octicon-link,
#contentBody h3 .octicon-link,
#contentBody h4 .octicon-link,
#contentBody h5 .octicon-link,
#contentBody h6 .octicon-link {
color: #e4e0dc;
}
#contentBody h1 {
border-bottom: 1px solid #363636;
}
#contentBody h2 {
border-bottom: 1px solid #363636;
}
#contentBody h6 {
font-size: 0.85em;
color: #958c82;
}
#contentBody table th,
#contentBody table td {
padding: 6px 13px;
border: 1px solid #363636;
background-color: #090909;
}
#contentBody img {
background-color: #090909;
}
#contentBody code {
background-color: #090909;
}
#contentBody .highlight pre,
#contentBody pre {
background-color: #090909;
}
#contentBody .full-commit .btn-outline:not(:disabled):hover {
color: #005cc5;
border-color: #005cc5;
}
#contentBody kbd {
color: #bbb2a9;
background-color: #050403;
border: solid 1px #2e2a25;
border-bottom-color: #39342e;
box-shadow: inset 0 -1px 0 #c6cbd1;
}
#contentBody :checked+.radio-label {
border-color: #0366d6;
}
#contentBody hr {
border-bottom-color: #111;
}

48
assets/css/style-dark.css Normal file
View file

@ -0,0 +1,48 @@
/* General */
body {
background-color: #101010;
color: #8f8f8f;
}
a:link {
color: #8f8f8f;
}
a:visited {
color: #8f8f8f;
}
a:hover {
color: #8f8f8f;
}
a:active {
color: #8f8f8f;
}
#searchBox #searchBoxInput {
color: #8f8f8f;
background-color:#363636;
border: solid 1px #363636;
}
#searchBox #searchBoxInput::placeholder {
color: #363636;
}
#searchResults {
background-color:#363636;
border: solid 1px #363636;
}
#searchResults mark {
background-color: #222020;
}
#tags li a {
background-color: #222020;
}
#contentsList hr.separator {
border: solid 1px #363636;
}

View file

@ -0,0 +1,65 @@
/* Background */ .chroma { color: #d0d0d0; background-color: #202020 }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 }
/* Keyword */ .chroma .k { color: #6ab825; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold }
/* KeywordNamespace */ .chroma .kn { color: #6ab825; font-weight: bold }
/* KeywordPseudo */ .chroma .kp { color: #6ab825 }
/* KeywordReserved */ .chroma .kr { color: #6ab825; font-weight: bold }
/* KeywordType */ .chroma .kt { color: #6ab825; font-weight: bold }
/* NameAttribute */ .chroma .na { color: #bbbbbb }
/* NameBuiltin */ .chroma .nb { color: #24909d }
/* NameClass */ .chroma .nc { color: #447fcf; text-decoration: underline }
/* NameConstant */ .chroma .no { color: #40ffff }
/* NameDecorator */ .chroma .nd { color: #ffa500 }
/* NameException */ .chroma .ne { color: #bbbbbb }
/* NameFunction */ .chroma .nf { color: #447fcf }
/* NameNamespace */ .chroma .nn { color: #447fcf; text-decoration: underline }
/* NameTag */ .chroma .nt { color: #6ab825; font-weight: bold }
/* NameVariable */ .chroma .nv { color: #40ffff }
/* LiteralString */ .chroma .s { color: #ed9d13 }
/* LiteralStringAffix */ .chroma .sa { color: #ed9d13 }
/* LiteralStringBacktick */ .chroma .sb { color: #ed9d13 }
/* LiteralStringChar */ .chroma .sc { color: #ed9d13 }
/* LiteralStringDelimiter */ .chroma .dl { color: #ed9d13 }
/* LiteralStringDoc */ .chroma .sd { color: #ed9d13 }
/* LiteralStringDouble */ .chroma .s2 { color: #ed9d13 }
/* LiteralStringEscape */ .chroma .se { color: #ed9d13 }
/* LiteralStringHeredoc */ .chroma .sh { color: #ed9d13 }
/* LiteralStringInterpol */ .chroma .si { color: #ed9d13 }
/* LiteralStringOther */ .chroma .sx { color: #ffa500 }
/* LiteralStringRegex */ .chroma .sr { color: #ed9d13 }
/* LiteralStringSingle */ .chroma .s1 { color: #ed9d13 }
/* LiteralStringSymbol */ .chroma .ss { color: #ed9d13 }
/* LiteralNumber */ .chroma .m { color: #3677a9 }
/* LiteralNumberBin */ .chroma .mb { color: #3677a9 }
/* LiteralNumberFloat */ .chroma .mf { color: #3677a9 }
/* LiteralNumberHex */ .chroma .mh { color: #3677a9 }
/* LiteralNumberInteger */ .chroma .mi { color: #3677a9 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #3677a9 }
/* LiteralNumberOct */ .chroma .mo { color: #3677a9 }
/* OperatorWord */ .chroma .ow { color: #6ab825; font-weight: bold }
/* Comment */ .chroma .c { color: #999999; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #999999; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #999999; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #999999; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #e50808; background-color: #520000; font-weight: bold }
/* CommentPreproc */ .chroma .cp { color: #cd2828; font-weight: bold }
/* CommentPreprocFile */ .chroma .cpf { color: #cd2828; font-weight: bold }
/* GenericDeleted */ .chroma .gd { color: #d22323 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericError */ .chroma .gr { color: #d22323 }
/* GenericHeading */ .chroma .gh { color: #ffffff; font-weight: bold }
/* GenericInserted */ .chroma .gi { color: #589819 }
/* GenericOutput */ .chroma .go { color: #cccccc }
/* GenericPrompt */ .chroma .gp { color: #aaaaaa }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #ffffff; text-decoration: underline }
/* GenericTraceback */ .chroma .gt { color: #d22323 }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #666666 }

View file

@ -16,8 +16,14 @@
{{ $style := resources.Get "css/style.css" }}
{{ $markdown := resources.Get "css/markdown.css" }}
{{ $syntaxHighlight := resources.Get "css/syntax-highlight.css" }}
{{ $css := slice $style $markdown $syntaxHighlight | resources.Concat "style.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $css.Permalink }}">
{{ $syntaxHighlightDark := resources.Get "css/syntax-highlight-dark.css" }}
{{ $css := slice $style $markdown $syntaxHighlight $syntaxHighlightDark | resources.Concat "style.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}">
{{ $styleDark := resources.Get "css/style-dark.css" }}
{{ $markdownDark := resources.Get "css/markdown-dark.css" }}
{{ $syntaxHighlightDark := resources.Get "css/syntax-highlight-dark.css" }}
{{ $cssDark := slice $styleDark $markdownDark $syntaxHighlightDark | resources.Concat "style-dark.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $cssDark.Permalink }}" media="(prefers-color-scheme: dark)" integrity="{{ $cssDark.Data.Integrity }}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<!-- custom css -->