From f605475f75cef9d4e7e4d75cf776d503933e9b72 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 31 Mar 2022 02:11:23 +0400 Subject: [PATCH] Working radio online status. --- internal/handlers/web/templates/index.jade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/handlers/web/templates/index.jade b/internal/handlers/web/templates/index.jade index 1c65974..3d782e2 100644 --- a/internal/handlers/web/templates/index.jade +++ b/internal/handlers/web/templates/index.jade @@ -30,12 +30,12 @@ html(lang='en') | OGG 128 Kb/s audio(preload='none' controls='') source(src='/live/stream.ogg' type='audio/ogg') - | Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]. - //- - var isDateNA = .Status.ServerStartDate == 'n/a' - //- unless false - //- p #[span#radio-status On-air since #[time(datetime=.Status.ServerStartISO8601)= .Status.ServerStartDate]] - //- else - //- p #[span#radio-status Radio is offline.] + | Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]! + if .Status.ServerStartDate + p#radio-status On-air since + time(datetime=.Status.ServerStartISO8601)= .Status.ServerStartDate + else + p#radio-status Radio is offline. p Now playing: #[span#radio-song #{.Status.SongName}] p Current/peak listeners: #[span#radio-listeners #{.Status.Listeners}] / #[span#radio-listener-peak #{.Status.ListenerPeak}] p