feat: integrate vite & update site
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
function onKonamiCode(callback: () => void): void {
|
||||
let input = "";
|
||||
const konami =
|
||||
"arrowuparrowuparrowdownarrowdownarrowleftarrowrightarrowleftarrowrightba";
|
||||
document.addEventListener("keydown", (e: KeyboardEvent) => {
|
||||
input = (input + e.key.toLowerCase()).slice(-konami.length);
|
||||
if (input === konami) callback();
|
||||
});
|
||||
}
|
||||
|
||||
onKonamiCode(() => {
|
||||
document.body.classList.toggle("bg-black");
|
||||
document.body.classList.toggle("bg-white");
|
||||
const header = document.getElementById("header");
|
||||
header?.classList.toggle("text-white");
|
||||
header?.classList.toggle("text-black");
|
||||
});
|
||||
Reference in New Issue
Block a user