Disable theme toggle

This commit is contained in:
Dave Gallant
2024-04-06 22:48:13 -04:00
parent 1aeb6d20b6
commit 391d164ae9
3 changed files with 3 additions and 59 deletions

View File

@@ -6,18 +6,7 @@
<script> <script>
// load comments // load comments
var getTheme = localStorage && localStorage.getItem("theme"); let theme = "dark-blue";
getTheme =
getTheme == null
? window.matchMedia &&
window.matchMedia("(prefers-color-scheme: light)").matches
? "light"
: "dark"
: getTheme;
getTheme = getTheme == null ? "dark" : getTheme;
let theme = getTheme === "dark" ? "gruvbox-dark" : "github-light";
let script = document.createElement("script"); let script = document.createElement("script");
script.src = "https://utteranc.es/client.js"; script.src = "https://utteranc.es/client.js";
script.setAttribute("repo", '{{ print $username "/" $repository }}'); script.setAttribute("repo", '{{ print $username "/" $repository }}');

View File

@@ -6,43 +6,6 @@
{{ $backgroundColor = "bg0_h" }} {{ $backgroundColor = "bg0_h" }}
{{ end }} {{ end }}
:root[data-theme="light"] {
--bg: var(--{{ $backgroundColor }});
--bg0: #fbf1c7;
--bg0_h: #f9f5d7;
--bg0_s: #f2e5bc;
--bg1: #ebdbb2;
--bg2: #d5c4a1;
--bg3: #bdae93;
--bg4: #a89984;
--fg: var(--fg1);
--fg0: #282828;
--fg1: #3c3836;
--fg2: #504945;
--fg3: #665c54;
--fg4: #7c6f64;
--gray1: var(--fg4);
--gray2: #928374;
--red1: #cc241d;
--red2: #9d0006;
--green1: #98971a;
--green2: #797403;
--yellow1: #d79921;
--yellow2: #b57614;
--blue1: #458588;
--blue2: #076678;
--purple1: #b16286;
--purple2: #8f3f71;
--aqua1: #689d6a;
--aqua2: #427b58;
--orange1: #d65d0e;
--orange2: #af3a03;
& .light--hidden {
display: none;
}
}
:root[data-theme="dark"] { :root[data-theme="dark"] {
--bg: var(--{{ $backgroundColor }}); --bg: var(--{{ $backgroundColor }});
--bg0: #1a1b26; --bg0: #1a1b26;
@@ -51,10 +14,10 @@
--bg1: #181922; --bg1: #181922;
--bg2: #32344a; --bg2: #32344a;
--bg3: #665c54; --bg3: #665c54;
--bg4: #7c6f64; --bg4: #32344a;
--fg: var(--fg1); --fg: var(--fg1);
--fg0: #ad8ee6; --fg0: #ad8ee6;
--fg1: #a9b1d6; --fg1: #acb0d0;
--fg2: #7da6ff; --fg2: #7da6ff;
--fg3: #9ece6a; --fg3: #9ece6a;
--fg4: #32344a; --fg4: #32344a;

View File

@@ -51,12 +51,4 @@
</ul> </ul>
</div> </div>
</nav> </nav>
<button class="theme__toggle light--hidden" aria-label="Toggle light mode">
{{ partial "icons/tabler-icon.html" "sun" }}
</button>
<button class="theme__toggle dark--hidden" aria-label="Toggle dark mode">
{{ partial "icons/tabler-icon.html" "moon" }}
</button>
</header> </header>