(function () {
const banner = document.getElementById("llc-alert-banner");
const closeBtn = document.getElementById("llc-alert-close");
if (!banner || !closeBtn) return;
// If dismissed before, hide banner
if (localStorage.getItem("llcAlertDismissed") === "true") {
banner.style.display = "none";
return;
}
// Push the page down so content isn't hidden under the banner
function applyOffset() {
const bannerHeight = banner.offsetHeight;
// Add extra spacing to the very top of the page content
document.body.style.paddingTop = bannerHeight + "px";
}
// Wait a moment for finish rendering the header
window.addEventListener("load", function () {
applyOffset();
});
window.addEventListener("resize", applyOffset);
// Close banner
closeBtn.addEventListener("click", function () {
banner.style.display = "none";
localStorage.setItem("llcAlertDismissed", "true");
document.body.style.paddingTop = "";
});
})();