Dark Mode (#168)

* Implement toggle button

* Dark mode mixins

* Dark mode color design

* Disable dark mode for prints

* Initial dark mode design

* Fix light mode mixin

* Disable dark mode on print style

* Move dark mode color scheme below the default style to allow referencing

* Fix dropdown

* Fix device-based dark mode

* Dark mode index page design

* Responsive auxiliary nav with dark mode toggle

* Remove box shadow when on smaller displays

* Prevent default on toggle click

* Move attribution/licensing to README.md

* Fix header padding on index page

* Background color transition animation

* Remove margin on index when on mobile displays

* Remove neon border when on mobile

* Fix post-header margin on mobile

* Lighten card headers in dark mode
This commit is contained in:
Dex
2025-06-08 19:26:27 -07:00
committed by GitHub
parent 0936e3718c
commit 26aba42e2f
17 changed files with 372 additions and 37 deletions

View File

@@ -1,11 +1,25 @@
.front-page {
@include dark-mode {
background-color: #000;
}
header.active {
@include dark-mode {
background-color: $gray-900;
}
}
.top-fold {
min-height: 100vh;
background-color: $header-bg-mid;
background-image: linear-gradient(135deg, $header-bg-1, $header-bg-2);
padding-top: $header-full-height;
padding-top: 150px;
@include dark-mode {
background-color: inherit;
background-image: none;
}
@media (max-width: 400px) {
padding-top: 100px;
@@ -33,6 +47,13 @@
text-shadow: 0px 1px 3px rgba(black, 0.9);
color: $gray-100;
@include dark-mode {
background: darken($trans-blue-darkest, 10%);
border: 1px solid #0087bb;
box-shadow: 0 0 5px 2px rgba($trans-blue, .5);
color: $body-color-dark;
}
max-width: 500px;
width: 50vw;
font-family: $font-secondary;
@@ -60,6 +81,17 @@
box-shadow: inset 0px 1px 5px rgba(#000, 0.2), 0px 1px 5px rgba(#000, 0.9);
text-shadow: 0px 1px 3px rgba(#fff, 0.6);
@include dark-mode {
background-color: $content-bg-dark;
box-shadow: 0 0 1pc 6px $primary;
color: $body-color-dark;
text-shadow: none;
@media (max-width: 800px) {
box-shadow: none;
}
}
max-width: 850px;
margin-left: 0.5em;
}
@@ -83,6 +115,13 @@
}
}
@media (max-width: 500px) {
.copy {
margin-left: 0;
margin-right: 0;
}
}
}
.pager {