From 1ebecc91d91beac06e4cb8f0819e8440aa42c037 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 12 Mar 2023 04:05:07 +0400 Subject: [PATCH] Keep last songs section even if there are no songs. Otherwise a JS code will be broken without further bloating. --- web/templates/index.pug | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/web/templates/index.pug b/web/templates/index.pug index d41f62c..a467546 100644 --- a/web/templates/index.pug +++ b/web/templates/index.pug @@ -44,18 +44,17 @@ html(lang='en') p Current/peak listeners: #[span#radio-listeners #{status.Listeners}] / #[span#radio-listener-peak #{status.ListenerPeak}] p small Notice: information updates every 45 seconds. But you can #[button(id='btn-update') update] it forcibly. - if len(*songs) > 0 - section - h2 Last #{songsNum} songs - table#last-played - each song in *songs - tr - td= song.Time - if song.Listeners != "0" - td= song.Listeners - else - td - td= song.Song + section + h2 Last #{songsNum} songs + table#last-played + each song in *songs + tr + td= song.Time + if song.Listeners != "0" + td= song.Listeners + else + td + td= song.Song section 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.