From 3494ad6515729448eceb461078f9188b880a53df Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Tue, 17 Feb 2026 20:02:14 +0300 Subject: [PATCH] show date episode was added --- main.go | 5 +++++ views/podcast.html | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index c65893b..8cf2d22 100644 --- a/main.go +++ b/main.go @@ -376,6 +376,11 @@ func main() { return } + loc, _ := time.LoadLocation("Europe/Moscow") + for _, episode := range episodes { + episode.CreatedAt = episode.CreatedAt.In(loc) + } + tmpl.ExecuteTemplate(w, "podcast.html", struct { Podcast *Podcast Episodes []*Episode diff --git a/views/podcast.html b/views/podcast.html index a853b67..a9d9d37 100644 --- a/views/podcast.html +++ b/views/podcast.html @@ -43,6 +43,12 @@ padding: 10px; border-top: 1px solid; } + + .episode { + display: flex; + justify-content: space-between; + align-items: center; + } @@ -58,8 +64,9 @@
{{range .Episodes}} -
+
{{.Title}} + Added {{.CreatedAt.Format "Mon, Jan 2, 2006 15:04"}}
{{end}}