From ec42a65c5b7eae3e52269540f19b5632283d7f20 Mon Sep 17 00:00:00 2001 From: puttaalu Date: Thu, 2 Jul 2026 02:18:32 +0200 Subject: [PATCH] Add copyright footer to gallery and photo pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renders a © 2000– Ashik Salahudeen line under both the index and each photo page. The year comes from time.Now().Year() at render time so the range stays current without manual updates. --- generator.go | 2 ++ static/style.css | 14 ++++++++++++++ templates/index.html | 4 ++++ templates/photo.html | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/generator.go b/generator.go index 1148cb7..bc02bc8 100644 --- a/generator.go +++ b/generator.go @@ -274,6 +274,7 @@ func (g *Generator) renderIndex(photos []Photo) error { return g.render("index.html", filepath.Join(g.outputDir, "index.html"), map[string]any{ "Photos": photos, "BaseURL": g.baseURL, + "Year": time.Now().Year(), }) } @@ -286,6 +287,7 @@ func (g *Generator) renderPhotoPage(p Photo) error { return g.render("photo.html", filepath.Join(dir, "index.html"), map[string]any{ "Photo": p, "BaseURL": g.baseURL, + "Year": time.Now().Year(), }) } diff --git a/static/style.css b/static/style.css index a4be6a9..2aba8b8 100644 --- a/static/style.css +++ b/static/style.css @@ -288,6 +288,20 @@ body { color: var(--fg2); } +/* ── Site footer ───────────────────────────────────────────── */ + +.site-footer { + max-width: 935px; + margin: 48px auto 0; + padding: 18px 20px 28px; + border-top: 1px solid var(--line); + text-align: center; + font-size: 12px; + color: var(--fg4); + font-family: monospace; + letter-spacing: 0.04em; +} + /* ── Responsive ────────────────────────────────────────────── */ @media (max-width: 600px) { diff --git a/templates/index.html b/templates/index.html index 6b9e03e..40a3363 100644 --- a/templates/index.html +++ b/templates/index.html @@ -42,5 +42,9 @@ + +
+ © 2000–{{.Year}} Ashik Salahudeen. All rights reserved. +
diff --git a/templates/photo.html b/templates/photo.html index d73492f..9de41ea 100644 --- a/templates/photo.html +++ b/templates/photo.html @@ -28,5 +28,9 @@ + +