Add copyright footer to gallery and photo pages

Renders a © 2000–<current-year> 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.
This commit is contained in:
2026-07-02 02:18:32 +02:00
parent b26bef0296
commit ec42a65c5b
4 changed files with 24 additions and 0 deletions
+2
View File
@@ -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{ return g.render("index.html", filepath.Join(g.outputDir, "index.html"), map[string]any{
"Photos": photos, "Photos": photos,
"BaseURL": g.baseURL, "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{ return g.render("photo.html", filepath.Join(dir, "index.html"), map[string]any{
"Photo": p, "Photo": p,
"BaseURL": g.baseURL, "BaseURL": g.baseURL,
"Year": time.Now().Year(),
}) })
} }
+14
View File
@@ -288,6 +288,20 @@ body {
color: var(--fg2); 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 ────────────────────────────────────────────── */ /* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) { @media (max-width: 600px) {
+4
View File
@@ -42,5 +42,9 @@
</div> </div>
</div> </div>
</main> </main>
<footer class="site-footer">
© 2000{{.Year}} Ashik Salahudeen. All rights reserved.
</footer>
</body> </body>
</html> </html>
+4
View File
@@ -28,5 +28,9 @@
</div> </div>
</div> </div>
</div> </div>
<footer class="site-footer">
© 2000{{.Year}} Ashik Salahudeen. All rights reserved.
</footer>
</body> </body>
</html> </html>