1
0

In an index.pug file added a tbody tag to a table.

This commit is contained in:
Alexander Andreev 2023-10-02 18:20:07 +04:00
parent 98ed4035a7
commit 20b8b62b73
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -46,23 +46,24 @@ html(lang='en')
| Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]! | Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]!
div div
if (songList.Current() != nil) if (songList.Current() != nil)
p Now playing: #[span#radio-song #{songList.Current().ArtistTitle()}] #[span#radio-duration #{songList.Current().DurationString()}] p Now playing: #[span#radio-song #{songList.Current().ArtistTitle()}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{songList.Current().DurationString()}] )
else else
p Now playing: #[span#radio-song ] #[span#radio-duration ] p Now playing: #[span#radio-song ] ( #[span#radio-duration-estimate ] #[span#radio-duration ] )
p Current/peak listeners: #[span#radio-listeners #{listeners.Current()}] / #[span#radio-listener-peak #{listeners.Peak()}] p Current/peak listeners: #[span#radio-listeners #{listeners.Current()}] / #[span#radio-listener-peak #{listeners.Peak()}]
p p
small Notice: information updates every 45 seconds. But you can #[button#radio-update update] it forcibly. small Notice: information updates every 45 seconds. But you can #[button#radio-update update] it forcibly.
section section
h2 Last #{songList.Len()} songs h2 Last #{songList.Len()} songs
table#last-songs table#last-songs
each song in songList.List() tbody
tr each song in songList.List()
td= utils.ToClientTimezone(song.StartAt, r).Format("15:04") tr
if song.MaxListeners != 0 td= utils.ToClientTimezone(song.StartAt, r).Format("15:04")
td= song.MaxListeners if song.MaxListeners != 0
else td= song.MaxListeners
td else
td= song.ArtistTitle() td
td= song.ArtistTitle()
- ml := radio.MostListened() - ml := radio.MostListened()
if ml.Song != "" if ml.Song != ""
p.right Most listened song was "#{ml.Song}" on #{utils.ToClientTimezone(ml.Date, r).Format(radio.MostListenedDateFormat)} with #[b #{ml.Listeners}] listeners. p.right Most listened song was "#{ml.Song}" on #{utils.ToClientTimezone(ml.Date, r).Format(radio.MostListenedDateFormat)} with #[b #{ml.Listeners}] listeners.