Skip to content

Commit

Permalink
Partially defuse dark theme
Browse files Browse the repository at this point in the history
Production build is broken and switching logic is bit flawed (JavaScript)
  • Loading branch information
mikroskeem committed Jan 8, 2025
1 parent 83eaea4 commit 16c4262
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 87 deletions.
17 changes: 3 additions & 14 deletions assets/scss/tale/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* {
@include transition($color-transition);
//@include transition($color-transition);
}

.container {
Expand All @@ -21,17 +21,6 @@ footer,
width: 80%;
}

#darkModeToggle {
float: right;
position: sticky;
top: 2rem;
margin-right: 2rem;
margin-top: 2rem;
font-size: 2rem;

cursor: pointer;
}

.nav {
box-shadow: 0 2px 2px -2px var(--shadow-color);
overflow: auto;
Expand All @@ -43,7 +32,7 @@ footer,
}

&-title {
@include transition($color-transition, opacity .2s ease-out);
//@include transition($color-transition, opacity .2s ease-out);
color: var(--default-color);
display: inline-block;
margin: 0;
Expand All @@ -63,7 +52,7 @@ footer,
}

li {
@include transition($color-transition, opacity .2s ease-out);
//@include transition($color-transition, opacity .2s ease-out);
color: var(--default-color);
display: inline-block;
opacity: .6;
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/tale/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $color-transition:

// Make the default be dark mode. That way, the more complicated case is the
// default and thus bugs are discovered earlier.
:root.light {
:root:not(.dark) {
--default-color: #555;
--background-color: #fff;
--default-shade: #353535;
Expand All @@ -27,7 +27,7 @@ $color-transition:
--code-filter: ;
}

:root:not(.light) {
:root.dark {
--default-color: #888;
--background-color: #000;
--default-shade: #989898;
Expand Down
1 change: 0 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{{ partial "head.html" . }}
<body>
{{ partial "header.html" . }}
{{ partial "darkmode.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
</body>
Expand Down
3 changes: 0 additions & 3 deletions layouts/partials/darkmode.html

This file was deleted.

2 changes: 0 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@

<!-- RSS -->
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />

<script src="{{ "js/darkmode.js" | relURL }}"></script>
</head>
65 changes: 0 additions & 65 deletions static/js/darkmode.js

This file was deleted.

0 comments on commit 16c4262

Please sign in to comment.