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:
@@ -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(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user