整理静态资源结构

This commit is contained in:
lwt
2026-05-08 23:21:38 +08:00
parent 105ec0e6d1
commit 79a641d59d
10 changed files with 207 additions and 215 deletions
+15
View File
@@ -0,0 +1,15 @@
const year = document.querySelector("#year");
const header = document.querySelector("[data-header]");
if (year) {
year.textContent = new Date().getFullYear();
}
if (header) {
const updateHeader = () => {
header.classList.toggle("is-scrolled", window.scrollY > 8);
};
updateHeader();
window.addEventListener("scroll", updateHeader, { passive: true });
}