From 20b8b62b738281a0e5d6cb94578d1b241b5963ff Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 2 Oct 2023 18:20:07 +0400 Subject: [PATCH] In an index.pug file added a tbody tag to a table. --- web/templates/index.pug | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/web/templates/index.pug b/web/templates/index.pug index c54e214..1dceed2 100644 --- a/web/templates/index.pug +++ b/web/templates/index.pug @@ -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]! div 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 - 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 small Notice: information updates every 45 seconds. But you can #[button#radio-update update] it forcibly. section h2 Last #{songList.Len()} songs table#last-songs - each song in songList.List() - tr - td= utils.ToClientTimezone(song.StartAt, r).Format("15:04") - if song.MaxListeners != 0 - td= song.MaxListeners - else - td - td= song.ArtistTitle() + tbody + each song in songList.List() + tr + td= utils.ToClientTimezone(song.StartAt, r).Format("15:04") + if song.MaxListeners != 0 + td= song.MaxListeners + else + td + td= song.ArtistTitle() - ml := radio.MostListened() 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.