From 30a7c537a60a282dbcfe6d14844249592f8c45a4 Mon Sep 17 00:00:00 2001 From: collin Date: Wed, 20 May 2026 20:56:19 +0200 Subject: [PATCH] Removing RSVP possibility and changing text on main page --- client/index.html | 14 ++------------ client/index.js | 32 -------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/client/index.html b/client/index.html index faabd98..c3e8adf 100644 --- a/client/index.html +++ b/client/index.html @@ -8,20 +8,10 @@

Collin and Lucy's Wedding

-

When?

Saturday 16th of May 2026

- -

-
- +

Thanks for coming! Photos coming soon


Agenda

@@ -54,4 +44,4 @@ - \ No newline at end of file + diff --git a/client/index.js b/client/index.js index 5c4ad4a..1785432 100644 --- a/client/index.js +++ b/client/index.js @@ -1,34 +1,2 @@ -const COOKIE_NAME = "hasRsvped"; - -function hasRsvped() { - const cookies = Object.fromEntries( - document.cookie.split(";").map((x) => x.trim().split("=")) - ); - - return cookies[COOKIE_NAME] === "true"; -} - -function padTime(t) { - return `${t}`.padStart(2, '0'); -} - -function updateCountdown() { - const countdownDate = new Date("2026-05-16T14:30:00.000+02:00"); - const now = new Date(); - const msRemaining = countdownDate.getTime() - now.getTime(); - const daysRemaining = Math.floor(msRemaining / (1000 * 60 * 60 * 24)); - const hoursRemaining = Math.floor(msRemaining / (1000 * 60 * 60)) % 24; - const minutesRemaining = Math.floor(msRemaining / (1000 * 60)) % 60; - const secondsRemaining = Math.floor(msRemaining / 1000) % 60; - const countdownNode = document.getElementById("countdown"); - countdownNode.innerText = `${daysRemaining} days ${padTime(hoursRemaining)}:${padTime(minutesRemaining)}:${padTime(secondsRemaining)}`; -} - window.onload = function () { - if (!hasRsvped()) { - const rsvpButton = document.querySelector(".rsvpButton"); - rsvpButton.classList.remove("hidden"); - } - updateCountdown(); - window.setInterval(updateCountdown, 500); };