Initial scaffold: Hugo site for west575.org

Blog with contact form and newsletter signup, structured like the
other Reground-hosted sites but with its own visual identity.
This commit is contained in:
2026-08-27 05:28:14 -04:00
commit 19034a026e
17 changed files with 672 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<footer class="site">
<div class="inner">
<div class="footer-top">
<div class="footer-about">
<span>&copy; {{ now.Year }} {{ .Site.Params.author | default .Site.Title }}</span>
<nav aria-label="Footer">
{{ range .Site.Menus.footer }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
<a href="{{ "index.xml" | absURL }}">RSS</a>
</nav>
</div>
<div class="footer-subscribe">
<p class="footer-subscribe-label">Get new posts by email, occasionally.</p>
{{ partial "subscribe-form.html" . }}
</div>
</div>
</div>
</footer>
+10
View File
@@ -0,0 +1,10 @@
<header class="site">
<div class="inner">
<a class="brand" href="/">{{ .Site.Title }}</a>
<nav aria-label="Primary">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}"{{ if $.IsMenuCurrent "main" . }} aria-current="page"{{ end }}>{{ .Name }}</a>
{{ end }}
</nav>
</div>
</header>
+51
View File
@@ -0,0 +1,51 @@
{{/* Standalone newsletter signup — not tied to any ARC/giveaway flow.
Posts a JSON body to {eec_base_url}/subscribe. Include anywhere with
{{ partial "subscribe-form.html" . }}. */}}
{{ $id := printf "subscribe-%d" (now.UnixNano) }}
<form id="{{ $id }}" class="subscribe-form">
<label for="{{ $id }}-email" class="sr-only">Email address</label>
<input type="email" id="{{ $id }}-email" name="email" required autocomplete="email" placeholder="you@example.com">
<div class="field-honeypot" aria-hidden="true">
<label for="{{ $id }}-website">Leave this field empty</label>
<input type="text" id="{{ $id }}-website" name="website" tabindex="-1" autocomplete="off">
</div>
<button type="submit" class="btn btn-subscribe">Subscribe</button>
</form>
<p id="{{ $id }}-status" role="status" class="subscribe-status"></p>
<script>
(function () {
var form = document.getElementById("{{ $id }}");
var status = document.getElementById("{{ $id }}-status");
form.addEventListener("submit", function (e) {
e.preventDefault();
if (form.website.value) return; // honeypot
var payload = {
email: form.email.value
};
var submitBtn = form.querySelector("button[type=submit]");
submitBtn.disabled = true;
status.textContent = "Subscribing…";
fetch("{{ .Site.Params.eec_base_url }}/subscribe", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}).then(function (res) {
submitBtn.disabled = false;
if (res.ok) {
form.reset();
status.textContent = "You're on the list — check your inbox to confirm.";
return;
}
return res.text().then(function (msg) {
status.textContent = msg || "Something went wrong. Try again in a moment.";
});
}).catch(function () {
submitBtn.disabled = false;
status.textContent = "Something went wrong. Try again in a moment.";
});
});
})();
</script>