themeswitcher made to be strictly js only; css cleanups according to that; theme made a bit more airy
This commit is contained in:
parent
9d42d24812
commit
370858a795
4 changed files with 44 additions and 21 deletions
|
@ -62,3 +62,17 @@ body > footer a:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-feed aside a,
|
||||||
|
.h-feed article a,
|
||||||
|
body > nav > ul > li a {
|
||||||
|
border-bottom: 1px solid #3173b4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comments .u-url:hover,
|
||||||
|
.footnotes a:hover,
|
||||||
|
.h-feed aside a:hover,
|
||||||
|
.h-feed article a:hover,
|
||||||
|
body > nav > ul > li a:hover {
|
||||||
|
border-bottom: 1px solid #014384;
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
* {
|
* {
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
color: #222;
|
color: #222;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-family: "Courier", monospace;
|
font-family: "Courier New", monospace;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
|
@ -20,11 +20,14 @@ body > footer {
|
||||||
padding: 0.6em 0;
|
padding: 0.6em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body > main,
|
|
||||||
body > nav,
|
body > nav,
|
||||||
|
body > main,
|
||||||
|
body > main > article,
|
||||||
|
body > main > aside,
|
||||||
|
body > main > section,
|
||||||
body > header > section,
|
body > header > section,
|
||||||
body > footer > section {
|
body > footer > section {
|
||||||
max-width: 88ch;
|
max-width: 56em;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
|
@ -64,6 +67,7 @@ svg {
|
||||||
|
|
||||||
body > svg {
|
body > svg {
|
||||||
display: none;
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -281,18 +285,6 @@ article > header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h-feed aside a,
|
|
||||||
.h-feed article a,
|
|
||||||
body > nav > ul > li a {
|
|
||||||
border-bottom: 1px solid rgba(255, 153, 0, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.h-feed aside a:hover,
|
|
||||||
.h-feed article a:hover,
|
|
||||||
body > nav > ul > li a:hover {
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
main ul {
|
main ul {
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
|
@ -319,6 +311,7 @@ li p {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
max-width: 96%;
|
max-width: 96%;
|
||||||
|
border-bottom: 1px solid rgba(255, 153, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote-back {
|
.footnote-back {
|
||||||
|
@ -338,6 +331,21 @@ body > nav > ul > li {
|
||||||
margin: 0 0.6em;
|
margin: 0 0.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-feed aside a,
|
||||||
|
.h-feed article a,
|
||||||
|
body > nav > ul > li a {
|
||||||
|
border-bottom: 1px solid rgba(255, 153, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.comments .u-url:hover,
|
||||||
|
.footnotes a:hover,
|
||||||
|
.h-feed aside a:hover,
|
||||||
|
.h-feed article a:hover,
|
||||||
|
body > nav > ul > li a:hover {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media all and (min-width: 58em) {
|
@media all and (min-width: 58em) {
|
||||||
body > header > section {
|
body > header > section {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
var DEFAULT_THEME = 'dark';
|
var DEFAULT_THEME = 'dark';
|
||||||
var ALT_THEME = 'light';
|
var ALT_THEME = 'light';
|
||||||
var STORAGE_KEY = 'theme';
|
var STORAGE_KEY = 'theme';
|
||||||
|
var theme_container = document.getElementById("header-forms");
|
||||||
|
var theme_insbefore = document.getElementById("search");
|
||||||
var colorscheme = [];
|
var colorscheme = [];
|
||||||
var mql = window.matchMedia('(prefers-color-scheme: ' + ALT_THEME + ')');
|
var mql = window.matchMedia('(prefers-color-scheme: ' + ALT_THEME + ')');
|
||||||
|
|
||||||
|
@ -58,7 +60,7 @@ function doTheme() {
|
||||||
var themeform = document.createElement('form');
|
var themeform = document.createElement('form');
|
||||||
themeform.className = "theme";
|
themeform.className = "theme";
|
||||||
themeform.innerHTML='<svg width="16" height="16"><use xlink:href="#icon-contrast"></use></svg>';
|
themeform.innerHTML='<svg width="16" height="16"><use xlink:href="#icon-contrast"></use></svg>';
|
||||||
document.getElementById("header-forms").insertBefore(themeform, document.getElementById("search"));
|
theme_container.insertBefore(themeform, theme_insbefore);
|
||||||
var schemes = ["dark", "light"];
|
var schemes = ["dark", "light"];
|
||||||
for (var i = 0; i < schemes.length; i++) {
|
for (var i = 0; i < schemes.length; i++) {
|
||||||
var span = document.createElement('span');
|
var span = document.createElement('span');
|
||||||
|
|
Loading…
Reference in a new issue