diff --git a/client/index.html b/client/index.html
index 97a54a9..faabd98 100644
--- a/client/index.html
+++ b/client/index.html
@@ -1,47 +1,57 @@
-
-
-
-
-
-
-
When?
-
Saturday 16th of May 2026
-
-
-
Agenda
-
- - 14:30 - Guests arrive
- - 15:00 - Ceremony
- - 15:30 - Reception
- - 18:30 - Dinner
-
+
+
+
-
-
-
Where?
-
-
- Het Broeker Huis
- Leeteinde 16
- 1151AK Broek in Waterland
-
-
-
-
-
Open Map
+
+
Collin and Lucy's Wedding
+
+
+
+
\ No newline at end of file
diff --git a/client/index.js b/client/index.js
index 7d4307a..5c4ad4a 100644
--- a/client/index.js
+++ b/client/index.js
@@ -8,10 +8,27 @@ function hasRsvped() {
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);
};