From 2c6f3cc4fd65a0e178d75cb76c656f6e9e2ad951 Mon Sep 17 00:00:00 2001
From: scottmakestech <83726258+scottmakestech@users.noreply.github.com>
Date: Thu, 12 Nov 2026 22:04:07 -0600
Subject: [PATCH] December 2026 donate banners
---
README.md | 15 ++++++
hugo.toml | 25 +++++++++
layouts/_default/baseof.html | 7 ---
layouts/blog/baseof.html | 7 ---
layouts/index.html | 8 ---
layouts/initiative/baseof.html | 7 ---
layouts/partials/header.html | 1 +
layouts/partials/site-banner.html | 21 ++++++++
static/site-banner/site-banner.css | 85 ++++++++++++++++++++++++++++++
static/site-banner/site-banner.js | 85 ++++++++++++++++++++++++++++++
static/site-banner/theme.css | 7 +++
11 files changed, 239 insertions(+), 29 deletions(-)
create mode 100644 layouts/partials/site-banner.html
create mode 100644 static/site-banner/site-banner.css
create mode 100644 static/site-banner/site-banner.js
create mode 100644 static/site-banner/theme.css
diff --git a/README.md b/README.md
index 465f8882..631e9c52 100644
--- a/README.md
+++ b/README.md
@@ -11,3 +11,18 @@ browser. Note that the -F flag will show items to be published in the future
(like blog posts with dates in the future).
To view the 404 page when running locally, use /404.html.
+
+## Site banner
+
+`layouts/partials/site-banner.html` shows a dismissible banner below the navigation on English pages. All of its settings go in the site config under `[params]`:
+
+```toml
+site_banner_enabled = true
+site_banner_text = "Message"
+site_banner_href = "https://example.org/" # optional link
+site_banner_label = "Button text" # optional; without it the message is the link
+```
+
+For messages with dates, add `[[params.site_banner_schedule]]` entries with `start`, `end` and `text`, plus optional `href`, `label` and `id`. Times are ISO 8601 with an offset; an entry without `href` or `label` uses the ones above. While a scheduled message is active, it replaces the simple banner. Colors are in `static/site-banner/theme.css`. Closing the banner is remembered in the browser's `localStorage` (no cookies).
+
+On Netlify previews and local builds, `?banner-time=` (for example `?banner-time=2026-12-01T18:00:00Z`) or `?banner=` previews the schedule. The live site ignores both.
diff --git a/hugo.toml b/hugo.toml
index 4cfc68cb..119537ea 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -54,3 +54,28 @@ description = "ISRG's Prossimo is moving critical software to memory safe code."
# Hugo 0.162+ refuses HTML content files by default. Several pages on this site
# (about, contact, sponsor, and the initiative pages) are hand-written HTML.
allowContent = ['^text/markdown$', '^text/html$']
+
+# Site banner messages with dates; see "Site banner" in README.md.
+[[params.site_banner_schedule]]
+id = "giving-tuesday"
+start = "2026-12-01T00:00:00-06:00"
+end = "2026-12-02T00:00:00-06:00"
+text = "It’s Giving Tuesday! As a nonprofit, we rely on our generous community of donors."
+label = "Donate Today"
+href = "https://www.abetterinternet.org/donate/"
+
+[[params.site_banner_schedule]]
+id = "monthly"
+start = "2026-12-02T00:00:00-06:00"
+end = "2026-12-26T00:00:00-06:00"
+text = "As we look toward 2027, consider a gift that keeps on giving. Internet security!"
+label = "Donate monthly"
+href = "https://www.abetterinternet.org/donate/"
+
+[[params.site_banner_schedule]]
+id = "year-end"
+start = "2026-12-26T00:00:00-06:00"
+end = "2027-01-01T00:00:00-06:00"
+text = "ISRG protects billions of people online, every day. Join us by making a donation before December 31 to finish the year strong."
+label = "Donate Today"
+href = "https://www.abetterinternet.org/donate/"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a84305e5..b7d64108 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,13 +1,6 @@
{{ partial "head.html" . }} {{ partial "header.html" . }}
- {{ if .Site.Params.site_banner_enabled }}
- {{ if .Site.Params.site_banner_text }}
-