mirror of
https://github.com/GenShibe/website.git
synced 2025-02-12 15:04:49 +00:00
test
This commit is contained in:
parent
7320a088b6
commit
f22a6b68a0
1 changed files with 17 additions and 12 deletions
|
@ -27,6 +27,7 @@
|
|||
<li>Student 🧑‍🎓</li>
|
||||
<li>Canadian 🇨🇦</li>
|
||||
<li>Hong Konger 🇭🇰</li>
|
||||
<li>Horrible coder :p</li>
|
||||
<li>
|
||||
Maintainer at
|
||||
<a
|
||||
|
@ -69,7 +70,11 @@
|
|||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const selector = document.querySelector(".theme-selector");
|
||||
selector.value = localStorage.getItem("theme") || window.matchMedia('(prefers-color-scheme: dark)').matches ? "frappe" : "latte";
|
||||
selector.value =
|
||||
localStorage.getItem("theme") ||
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? "mocha"
|
||||
: "latte";
|
||||
document.documentElement.setAttribute("theme", selector.value);
|
||||
selector.addEventListener("change", function () {
|
||||
localStorage.setItem("theme", this.value);
|
||||
|
|
Loading…
Add table
Reference in a new issue