feat: migrate Hugo Bootstrap theme to latest Hugo with Tailwind CSS and refactor codebase

* replace Bootstrap-based styling with Tailwind CSS
* update theme compatibility for latest Hugo version
* refactor templates and partials
* fix outdated code and broken components
* improve project structure and maintainability
* optimize styling and frontend build setup
This commit is contained in:
Al Murad Uzzaman
2026-05-10 13:38:01 +06:00
parent eac3f49bc5
commit f8b297eaad
233 changed files with 5272 additions and 9256 deletions

43
assets/js/main.js Executable file
View File

@@ -0,0 +1,43 @@
// main script
(function () {
"use strict";
// Header shrink on scroll
(function () {
var header = document.getElementById("site-header");
if (!header) return;
// only enable shrink behavior when navbar_fixed param is true
var navbarFixed = header.dataset && header.dataset.navbarFixed === "true";
if (!navbarFixed) return;
var lastKnownScrollY = 0;
var ticking = false;
var threshold = 20;
function onScroll() {
lastKnownScrollY = window.scrollY || window.pageYOffset;
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
if (lastKnownScrollY > threshold) {
header.classList.add("py-2", "lg:py-3", "shadow-lg");
header.classList.remove("py-6", "lg:py-6");
} else {
header.classList.remove("py-2", "lg:py-3", "shadow-lg");
header.classList.add("py-6", "lg:py-6");
}
ticking = false;
}
window.addEventListener("scroll", onScroll, { passive: true });
// run on init
update();
})();
})();