mirror of
https://github.com/halo-dev/theme-earth.git
synced 2025-10-14 14:30:50 +00:00
21 lines
441 B
TypeScript
21 lines
441 B
TypeScript
import "./styles/tailwind.css";
|
|
import "./styles/main.css";
|
|
import "@purge-icons/generated";
|
|
|
|
import Alpine from "alpinejs";
|
|
|
|
window.Alpine = Alpine;
|
|
|
|
Alpine.start();
|
|
|
|
const onScroll = () => {
|
|
const headerMenu = document.getElementById("header-menu");
|
|
if (window.scrollY > 0) {
|
|
headerMenu?.classList.add("menu-sticky");
|
|
} else {
|
|
headerMenu?.classList.remove("menu-sticky");
|
|
}
|
|
};
|
|
|
|
window.addEventListener("scroll", onScroll);
|