Major Refactor: Refactor the codebase to improve readability and maintainability

This commit is contained in:
2026-06-21 23:38:49 -04:00
parent 9c4753cd1f
commit 801b0b97fc
46 changed files with 2378 additions and 2031 deletions

30
static/js/navbar.js Normal file
View File

@@ -0,0 +1,30 @@
document.addEventListener("DOMContentLoaded", function () {
const brandIcon = document.getElementById("brandIcon");
if (!brandIcon) return;
let clickCount = 0;
let clickResetTimer;
brandIcon.addEventListener("click", function (e) {
e.preventDefault();
e.stopPropagation();
clickCount++;
clearTimeout(clickResetTimer);
clickResetTimer = setTimeout(() => { clickCount = 0; }, 800);
if (clickCount >= 5) {
clickCount = 0;
clearTimeout(clickResetTimer);
const originalClass = this.className;
this.className = "fs-3 me-2 baguette-spin";
this.innerHTML = "🥖";
setTimeout(() => {
this.className = originalClass;
this.innerHTML = "";
}, 1000);
}
});
});