mirror of
https://github.com/GenShibe/website.git
synced 2025-02-12 14:24:50 +00:00
test
This commit is contained in:
parent
7320a088b6
commit
f22a6b68a0
1 changed files with 17 additions and 12 deletions
29
index.html
29
index.html
|
@ -6,7 +6,7 @@
|
|||
<meta
|
||||
property="og:description"
|
||||
content="A little bit of information about me :3"
|
||||
/>
|
||||
/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://genshibe.github.io" />
|
||||
<title>Gen's Website</title>
|
||||
|
@ -27,6 +27,7 @@
|
|||
<li>Student 🧑‍🎓</li>
|
||||
<li>Canadian 🇨🇦</li>
|
||||
<li>Hong Konger 🇭🇰</li>
|
||||
<li>Horrible coder :p</li>
|
||||
<li>
|
||||
Maintainer at
|
||||
<a
|
||||
|
@ -65,17 +66,21 @@
|
|||
<script>
|
||||
document.querySelector(".last-updated").innerHTML =
|
||||
document.lastModified;
|
||||
</script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const selector = document.querySelector(".theme-selector");
|
||||
selector.value = localStorage.getItem("theme") || window.matchMedia('(prefers-color-scheme: dark)').matches ? "frappe" : "latte";
|
||||
document.documentElement.setAttribute("theme", selector.value);
|
||||
selector.addEventListener("change", function () {
|
||||
localStorage.setItem("theme", this.value);
|
||||
document.documentElement.setAttribute("theme", this.value);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const selector = document.querySelector(".theme-selector");
|
||||
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);
|
||||
document.documentElement.setAttribute("theme", this.value);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue