1
0

Keep last songs section even if there are no songs. Otherwise a JS code will be broken without further bloating.

This commit is contained in:
Alexander Andreev 2023-03-12 04:05:07 +04:00
parent 0409da3ca3
commit 1ebecc91d9
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -44,18 +44,17 @@ html(lang='en')
p Current/peak listeners: #[span#radio-listeners #{status.Listeners}] / #[span#radio-listener-peak #{status.ListenerPeak}] p Current/peak listeners: #[span#radio-listeners #{status.Listeners}] / #[span#radio-listener-peak #{status.ListenerPeak}]
p p
small Notice: information updates every 45 seconds. But you can #[button(id='btn-update') update] it forcibly. small Notice: information updates every 45 seconds. But you can #[button(id='btn-update') update] it forcibly.
if len(*songs) > 0 section
section h2 Last #{songsNum} songs
h2 Last #{songsNum} songs table#last-played
table#last-played each song in *songs
each song in *songs tr
tr td= song.Time
td= song.Time if song.Listeners != "0"
if song.Listeners != "0" td= song.Listeners
td= song.Listeners else
else td
td td= song.Song
td= song.Song
section section
h2 Privacy statements h2 Privacy statements
p Logs are collected and include access date and time, IP-address, User-Agent, referer URL, request. This website makes use of JavaScript to update a radio status and last #{songsNum} songs list. p Logs are collected and include access date and time, IP-address, User-Agent, referer URL, request. This website makes use of JavaScript to update a radio status and last #{songsNum} songs list.