From c57ec210d9eb61648074e396181f407f3ce0a4c6 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:12:09 +0800 Subject: [PATCH] Add or remove hidden class from top bar --- src/_includes/main/hero.njk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_includes/main/hero.njk b/src/_includes/main/hero.njk index 1a9e421b..f1d4b185 100644 --- a/src/_includes/main/hero.njk +++ b/src/_includes/main/hero.njk @@ -1,5 +1,5 @@
-
+
Banner of Leilukin's Hub
@@ -40,14 +40,14 @@ const headerImgEl = document.querySelector(".hero__img"); if (todayEvent != "No event") { + headerTopBarEl.classList.remove('hidden'); + if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { headerTopBarEl.innerHTML = getBlurbHtml(todayEvent); } else { headerImgEl.classList.add(getBanner(todayEvent)); headerTopBarEl.innerHTML = getBlurbHtml(todayEvent); } - } else { - headerTopBarEl.style.display = 'none'; } function getTodayEvent() {