Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion src/pages/firstdate/home/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import Layout from "@/layouts/firstdate/WithNavbar.astro";
<ButtonFd
variant="fill"
color="white"
href="/firstdate/events/cufest/"
id="festival-button"
class="w-full"
>
Festival
Expand Down Expand Up @@ -122,3 +122,26 @@ import Layout from "@/layouts/firstdate/WithNavbar.astro";
</div>
</div>
</Layout>

<script>
document.addEventListener("DOMContentLoaded", function () {
const festivalButton = document.getElementById("festival-button");

if (festivalButton) {
festivalButton.addEventListener("click", function (e) {
e.preventDefault();

// Target date: July 18, 2025 at 19:00 (7:00 PM)
const targetDate = new Date("2025-07-18T19:00:00+07:00");
const currentDate = new Date();

// Check if current time is on or after the target date
if (currentDate >= targetDate) {
window.location.href = "/fest/home";
} else {
window.location.href = "/firstdate/events/cufest";
}
});
}
});
</script>
Loading