Compare commits

...

2 Commits

Author SHA1 Message Date
d193e9d7a2 add dev script in Justfile 2026-02-17 20:02:30 +03:00
3494ad6515 show date episode was added 2026-02-17 20:02:14 +03:00
3 changed files with 16 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
dev:
PODCASTS_DIRPATH=./podcasts go run .
build: build:
docker build -t podcaster . docker build -t podcaster .

View File

@@ -376,6 +376,11 @@ func main() {
return return
} }
loc, _ := time.LoadLocation("Europe/Moscow")
for _, episode := range episodes {
episode.CreatedAt = episode.CreatedAt.In(loc)
}
tmpl.ExecuteTemplate(w, "podcast.html", struct { tmpl.ExecuteTemplate(w, "podcast.html", struct {
Podcast *Podcast Podcast *Podcast
Episodes []*Episode Episodes []*Episode

View File

@@ -43,6 +43,12 @@
padding: 10px; padding: 10px;
border-top: 1px solid; border-top: 1px solid;
} }
.episode {
display: flex;
justify-content: space-between;
align-items: center;
}
</style> </style>
</head> </head>
<body> <body>
@@ -58,8 +64,9 @@
<div class="episodes"> <div class="episodes">
{{range .Episodes}} {{range .Episodes}}
<div> <div class="episode">
<span>{{.Title}}</span> <span>{{.Title}}</span>
<span>Added {{.CreatedAt.Format "Mon, Jan 2, 2006 15:04"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>