22 lines
490 B
Plaintext
22 lines
490 B
Plaintext
package templates
|
|
|
|
import "time"
|
|
|
|
func FormatLastUpdated(t time.Time) string {
|
|
updatedAt := "Now-ish"
|
|
if !t.IsZero() {
|
|
updatedAt = t.Format("January 2, 2006")
|
|
}
|
|
return updatedAt
|
|
}
|
|
|
|
templ Footer(lastUpdated time.Time) {
|
|
<footer class="footer">
|
|
<p>
|
|
© 2026 Valentine Bott | Built with Go + Templ + HTMX |
|
|
<a href="https://git.valxntine.dev/valxntine/blog">Source Code</a> |
|
|
Last updated: <span class="blink">●</span> { FormatLastUpdated(lastUpdated) }
|
|
</p>
|
|
</footer>
|
|
}
|