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