added spooky mode (aka dark mode)

This commit is contained in:
Benjamin Jones 2020-07-29 15:02:51 +02:00
parent fbad7589cc
commit 18723a9942
5 changed files with 45 additions and 9 deletions

View File

@ -43,6 +43,10 @@ header.page-header {
margin: $size-128 0; margin: $size-128 0;
// background-color: $bg; // background-color: $bg;
display: inline-block; display: inline-block;
@include touch {
margin: $size-128 0 $size-64 0;
}
} }
} }
@ -55,6 +59,12 @@ header.page-header {
&:visited { &:visited {
font-style: normal; font-style: normal;
} }
@include darkMode {
h1 {
color: $white;
}
}
} }
&.hidden { &.hidden {

View File

@ -1,16 +1,37 @@
body { body {
background-color: $bg; background-color: $bg;
background-image: url('../img/bg/bg-2.png'); background-image: url('../img/bg/bg-2.png');
transition: background-color 0.5s ease-in-out;
background-position: 3px 5px;
background-repeat-x: no-repeat; background-repeat-x: no-repeat;
background-repeat-y: repeat; background-repeat-y: repeat;
background-size: cover; background-size: cover;
background-attachment: fixed; background-attachment: fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-size: 100%;
@include touch { @include touch {
background-attachment: scroll; background-attachment: scroll;
} }
@include darkMode {
background-color: $black;
&::after {
content: '';
background-image: url('../img/bg/bg-el-light.png');
opacity: 1;
background-position: 0 0;
background-repeat-x: no-repeat;
background-repeat-y: repeat;
background-size: 100%;
background-attachment: fixed;
height: 100vh;
width: 100vw;
position: fixed;
pointer-events: none;
}
}
} }
.page-content { .page-content {
@ -32,15 +53,6 @@ footer.page-footer {
flex-shrink: 0; flex-shrink: 0;
} }
.rf-logo path {
fill: transparent;
stroke-width: 1;
@include touch {
stroke-width: 1.5;
}
}
.textbox { .textbox {
@include textbox; @include textbox;
} }

View File

@ -58,4 +58,12 @@ h2 {
a { a {
color: $text; color: $text;
} }
@include darkMode {
color: $white;
a {
color: $white;
}
}
} }

View File

@ -50,3 +50,9 @@
@content; @content;
} }
} }
@mixin darkMode() {
@media (prefers-color-scheme: dark) {
@content;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 KiB