Add .htaccess for URL rewriting, implement giveaway countdown timer in script.js, and update navigation links to clean paths in index.html. Create new pages for About, Giveaway, and service details with corresponding styles and scripts.

This commit is contained in:
blake committed 2026-10-22 16:12:42 -05:00
1 parent 3f3de24508
commit 4f7ce83630
14 files changed
+1218 -377

No files matched your search

+47
View File
@@ -177,3 +177,50 @@ galleries.forEach((gallery) => {
}px)`;
});
});
// Giveaway closes at the end of November 1, 2026 (Central Time).
const GIVEAWAY_CLOSE = new Date("2026-11-02T06:00:00Z");
function updateGiveawayTimers() {
const timers = document.querySelectorAll("[data-giveaway-timer]");
if (!timers.length) return;
const remaining = GIVEAWAY_CLOSE.getTime() - Date.now();
const totalSeconds = Math.max(0, Math.floor(remaining / 1000));
const days = Math.floor(totalSeconds / 86400);
const hours = Math.floor((totalSeconds % 86400) / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = totalSeconds % 60;
const closed = remaining <= 0;
timers.forEach((timer) => {
const units = timer.querySelector(
".giveaway-timer-units, .giveaway-countdown-units",
);
const closedMessage = timer.querySelector(".giveaway-timer-closed");
if (closed) {
timer.classList.add("is-closed");
if (units) units.hidden = true;
if (closedMessage) closedMessage.hidden = false;
timer.setAttribute("aria-label", "Giveaway closed");
return;
}
const daysEl = timer.querySelector("[data-days]");
const hoursEl = timer.querySelector("[data-hours]");
const minutesEl = timer.querySelector("[data-minutes]");
const secondsEl = timer.querySelector("[data-seconds]");
if (daysEl) daysEl.textContent = String(days);
if (hoursEl) hoursEl.textContent = String(hours).padStart(2, "0");
if (minutesEl) minutesEl.textContent = String(minutes).padStart(2, "0");
if (secondsEl) secondsEl.textContent = String(seconds).padStart(2, "0");
timer.setAttribute(
"aria-label",
`${days} days, ${hours} hours, ${minutes} minutes, and ${seconds} seconds remaining`,
);
});
}
updateGiveawayTimers();
setInterval(updateGiveawayTimers, 1000);