mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-02 22:45:33 -04:00
dark mode 😎 (#112)
* prepare dark mode stuffs * themed all global colors * store preference in local storage * toggle styling * lightbulb position * minify bundled script with uglify-js instead of hugo * detect whether user has an OS-wide dark mode preference and use that by default * two different colors for each homepage link * inline bulb SVGs into stylesheet * fingerprint and cache styles for a year * fix lightbulb positioning with weird magic numbers, will come back to that * themed syntax highlighting * use terser instead of uglify-js (b/c of ES6)
This commit is contained in:
@@ -43,21 +43,16 @@ main#home {
|
||||
margin-bottom: 0.5em;
|
||||
margin-left: 1em;
|
||||
padding: 4px;
|
||||
border: 1px solid $color-light;
|
||||
border-radius: 50%;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
|
||||
@include themed() {
|
||||
border: 1px solid t(color-light);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
// Loop through $colors-home (see abstracts/_variables)
|
||||
@each $id, $color in $colors-home {
|
||||
&##{$id} {
|
||||
color: $color;
|
||||
background-image: underline-hack($color);
|
||||
}
|
||||
}
|
||||
|
||||
&#blog {
|
||||
font-size: 0.9em;
|
||||
margin-bottom: 0;
|
||||
@@ -83,11 +78,22 @@ main#home {
|
||||
}
|
||||
|
||||
&#shh {
|
||||
color: $color-medium-light;
|
||||
@include themed() {
|
||||
color: t(color-medium-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loop through $colors-home (see abstracts/_variables)
|
||||
@each $id, $colors in $colors-home {
|
||||
@each $theme, $color in $colors {
|
||||
body.#{$theme} main#home a##{$id} {
|
||||
color: $color;
|
||||
background-image: underline-hack($color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Responsive
|
||||
@mixin responsive--home() {
|
||||
|
||||
Reference in New Issue
Block a user