diff --git a/web/index.templ b/web/index.templ index c8216b1..490cb10 100644 --- a/web/index.templ +++ b/web/index.templ @@ -67,23 +67,27 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis Your browser doesn't support an audio element, it's sad... But you always can take the playlist!
- if curSong != nil && curSong.Artist != "" {

- Listeners { strconv.FormatInt(lstnrs.Current(), 10) } - Duration { curSong.DurationString() } + Listeners + { strconv.FormatInt(lstnrs.Current(), 10) } + Duration + + + if curSong != nil && curSong.Artist != "" { + { curSong.DurationString() } + } else { + 0:00 + } +

- { curSong.Artist } - { curSong.Title } + + + if curSong != nil && curSong.Artist != "" { + { curSong.Artist } - { curSong.Title } + } +

- } else { -

- Listeners { strconv.FormatInt(lstnrs.Current(), 10) } - Duration 0:00 -

-

- Song -

- }
@@ -98,17 +102,17 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis - for _, song := range sl { - - { utils.ToClientTimezone(song.StartAt, r).Format("15:04") } - if song.PeakListeners != 0 { - { strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) } - } else { - + for _, song := range sl { + + { utils.ToClientTimezone(song.StartAt, r).Format("15:04") } + + if song.PeakListeners != 0 { + { strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) } + } + + { song.Artist } - { song.Title } + } - { song.Artist } - { song.Title } - - }