2020-01-03 16:22:11 +03:00
|
|
|
/*!
|
|
|
|
* The main dark mode styles
|
|
|
|
* v2.0
|
|
|
|
* https://github.com/cotes2020/jekyll-theme-chirpy
|
|
|
|
* © 2018-2019 Cotes Chung
|
|
|
|
* MIT Licensed
|
|
|
|
*/
|
|
|
|
|
2020-02-10 00:46:29 +03:00
|
|
|
@mixin dark-scheme {
|
2020-02-09 17:23:39 +03:00
|
|
|
/* framework */
|
|
|
|
--main-wrapper-bg: rgb(27, 27, 30);
|
|
|
|
--topbar-wrapper-bg: rgb(39, 40, 43);
|
|
|
|
--search-wrapper-bg: rgb(34, 34, 39);
|
|
|
|
--search-icon: rgb(100, 102, 105);
|
|
|
|
--input-focus-border: rgb(112, 114, 115);
|
|
|
|
--footer-bg: rgb(31, 30, 30);
|
|
|
|
--footer-border: rgb(44, 45, 45);
|
|
|
|
--mask-bg: rgb(68, 69, 70);
|
|
|
|
|
|
|
|
/* sidebar */
|
|
|
|
--nav-cursor: rgb(183, 182, 182);
|
|
|
|
--sidebar-bg: radial-gradient(circle, #242424 0%, #1d1f27 100%);
|
|
|
|
|
|
|
|
/* common color */
|
|
|
|
--text-color: rgb(175, 176, 177);
|
|
|
|
--text-muted-color: rgb(107, 116, 124);
|
2020-02-10 00:46:29 +03:00
|
|
|
--link-color: rgb(138, 180, 248);
|
|
|
|
--link-underline-color: rgb(99, 131, 182);
|
2020-02-09 17:23:39 +03:00
|
|
|
--main-border: rgb(63, 65, 68);
|
|
|
|
--button-bg: rgb(39, 40, 33);
|
|
|
|
--blockquote-border: rgb(66, 66, 66);
|
|
|
|
--blockquote-text: rgb(117, 117, 117);
|
|
|
|
|
|
|
|
--card-bg: rgb(39, 40, 33);
|
|
|
|
--card-header-bg: rgb(51, 50, 50);
|
|
|
|
--relate-post-title: rgb(164, 175, 181);
|
|
|
|
|
|
|
|
/* Home page */
|
|
|
|
--btn-active-bg: #1c345e;
|
|
|
|
--btn-active-border-color: #8ab4f8;
|
|
|
|
|
|
|
|
/* posts */
|
|
|
|
--toc-highlight: rgb(116, 178, 243);
|
|
|
|
--tag-bg: rgb(41, 40, 40);
|
|
|
|
--tag-hover: rgb(43, 56, 62);
|
|
|
|
--tb-odd-bg: rgba(52, 53, 42, 0.52); /* odd rows of the posts' table */
|
|
|
|
--tb-even-bg: rgb(31, 31, 34); /* even rows of the posts' table */
|
2020-02-13 17:55:15 +03:00
|
|
|
--footnote-target-bg: rgb(63, 81, 181);
|
2020-02-09 17:23:39 +03:00
|
|
|
|
2020-02-11 19:24:47 +03:00
|
|
|
hr {
|
|
|
|
border-color: var(--main-border);
|
|
|
|
}
|
|
|
|
|
2020-02-11 19:04:59 +03:00
|
|
|
/* posts' toc */
|
|
|
|
nav[data-toggle=toc] .nav-link.active,
|
|
|
|
nav[data-toggle=toc] .nav-link.active:focus,
|
|
|
|
nav[data-toggle=toc] .nav-link.active:hover,
|
|
|
|
nav[data-toggle=toc] .nav>li>a:focus,
|
|
|
|
nav[data-toggle=toc] .nav>li>a:hover {
|
|
|
|
/* Override BS */
|
|
|
|
color: var(--toc-highlight)!important;
|
|
|
|
border-left-color: var(--toc-highlight)!important;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* categories */
|
|
|
|
.categories.card,
|
|
|
|
.list-group-item {
|
|
|
|
background-color: var(--card-bg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.categories .card-header {
|
|
|
|
background-color: var(--card-header-bg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.categories .list-group-item {
|
|
|
|
border-left: none;
|
|
|
|
border-right: none;
|
|
|
|
padding-left: 2rem;
|
|
|
|
border-color: var(--main-border);
|
|
|
|
}
|
|
|
|
|
|
|
|
.categories .list-group-item:last-child {
|
|
|
|
border-bottom-color: var(--card-bg);
|
|
|
|
}
|
|
|
|
|
2020-02-09 17:23:39 +03:00
|
|
|
/* tags */
|
|
|
|
--tag-border: rgb(59, 79, 88);
|
|
|
|
--tag-shadow: rgb(32, 33, 33);
|
|
|
|
|
|
|
|
/* categories */
|
|
|
|
--categories-hover-bg: rgb(73, 75, 76);
|
|
|
|
|
|
|
|
/* archives */
|
|
|
|
--timeline-node-bg: rgb(150, 152, 156);
|
2020-02-11 19:04:59 +03:00
|
|
|
|
|
|
|
#archives li:nth-child(odd) {
|
|
|
|
background-image: linear-gradient(to left,
|
|
|
|
rgb(26, 26, 30), rgb(39, 39, 45), rgb(39, 39, 45), rgb(39, 39, 45), rgb(26, 26, 30));
|
|
|
|
}
|
|
|
|
|
2020-02-09 17:23:39 +03:00
|
|
|
}
|
|
|
|
|
2020-02-09 20:11:58 +03:00
|
|
|
/* Light scheme prefered (= dark scheme not prefered)
|
2020-02-10 00:46:29 +03:00
|
|
|
* -> dark scheme triggered with <html class="dark-mode">
|
2020-02-09 20:11:58 +03:00
|
|
|
*/
|
2020-02-10 00:46:29 +03:00
|
|
|
html.dark-mode {
|
|
|
|
@include dark-scheme;
|
2020-02-09 17:23:39 +03:00
|
|
|
}
|
|
|
|
|
2020-02-10 00:46:29 +03:00
|
|
|
|
2020-02-09 20:11:58 +03:00
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
/* Dark scheme prefered
|
2020-02-11 19:04:59 +03:00
|
|
|
* -> light scheme triggered with <html class="light-mode">
|
2020-02-09 20:11:58 +03:00
|
|
|
*/
|
2020-02-10 00:46:29 +03:00
|
|
|
html:not(.light-mode) {
|
|
|
|
@include dark-scheme;
|
2020-02-09 20:11:58 +03:00
|
|
|
}
|
2020-02-09 17:23:39 +03:00
|
|
|
}
|