diff --git a/.htaccess b/.htaccess index 9b75112..e3649ab 100644 --- a/.htaccess +++ b/.htaccess @@ -5,6 +5,13 @@ DirectorySlash Off RewriteEngine On + # Giveaway stays up through the end of November 1, 2026 (Central), + # which is 2026-11-02 06:00:00 UTC. After that, /giveaway sends visitors home. + # This redirect is temporary so the page can be reused: update this timestamp + # together with GIVEAWAY_CLOSE in giveaway-gate.js. + RewriteCond %{TIME} >=20261102060000 + RewriteRule ^giveaway(?:/index\.html)?/?$ / [R=302,L] + # Old /html/... addresses RewriteRule ^html/services/([^/]+)/?(?:index\.html)?$ /services/$1 [R=301,L] RewriteRule ^html/(about|giveaway)/?(?:index\.html)?$ /$1 [R=301,L] diff --git a/css/style.css b/css/style.css index 747f81a..c8d2006 100644 --- a/css/style.css +++ b/css/style.css @@ -151,6 +151,13 @@ address { text-underline-offset: 0.25rem; } +html.giveaway-closed .giveaway-banner:link, +html.giveaway-closed .giveaway-banner:visited, +html.giveaway-closed .giveaway-section, +html.giveaway-closed .giveaway-form-section { + display: none; +} + .giveaway-timer-units { display: flex; gap: 1.2rem; diff --git a/giveaway-gate.js b/giveaway-gate.js new file mode 100644 index 0000000..10decec --- /dev/null +++ b/giveaway-gate.js @@ -0,0 +1,16 @@ +// Runs before the page paints. Closes the giveaway at the end of +// November 1, 2026 (Central), which is 2026-11-02 06:00:00 UTC. +// To run the page again, update this instant and the matching +// timestamp in .htaccess. +(function () { + var closeAt = "2026-11-02T06:00:00Z"; + window.GIVEAWAY_CLOSE = closeAt; + + if (Date.now() < Date.parse(closeAt)) return; + + document.documentElement.classList.add("giveaway-closed"); + + if (/\/giveaway(?:\/index\.html)?\/?$/.test(location.pathname)) { + location.replace("/"); + } +})(); diff --git a/giveaway/index.html b/giveaway/index.html index 72f6c96..f5bef25 100644 --- a/giveaway/index.html +++ b/giveaway/index.html @@ -23,6 +23,7 @@ + diff --git a/index.html b/index.html index fbcb3a6..e1665c6 100644 --- a/index.html +++ b/index.html @@ -23,6 +23,7 @@ + @@ -44,7 +45,6 @@