Updated template.
This commit is contained in:
parent
d1bd7982ce
commit
398b38561a
@ -67,23 +67,27 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis
|
||||
Your browser doesn't support an audio element, it's sad... But you always can take the <a href="/playlist">playlist</a>!
|
||||
</audio>
|
||||
<div>
|
||||
<p>
|
||||
<img src="/assets/img/listener.svg" alt="Listeners" title="Listeners" />
|
||||
<span id="radio-listeners">{ strconv.FormatInt(lstnrs.Current(), 10) }</span>
|
||||
<img src="/assets/img/duration.svg" alt="Duration" title="Duration" />
|
||||
<span id="radio-duration-estimate"></span>
|
||||
<span id="radio-duration">
|
||||
if curSong != nil && curSong.Artist != "" {
|
||||
<p>
|
||||
<img src="/assets/img/listener.svg" alt="Listeners" title="Listeners" /> <span id="radio-listeners">{ strconv.FormatInt(lstnrs.Current(), 10) }</span>
|
||||
<img src="/assets/img/duration.svg" alt="Duration" title="Duration" /> <span id="radio-duration-estimate"></span><span id="radio-duration">{ curSong.DurationString() }</span>
|
||||
</p>
|
||||
<p>
|
||||
<img src="/assets/img/note.svg" /> <span id="radio-song">{ curSong.Artist } - { curSong.Title }</span>
|
||||
</p>
|
||||
{ curSong.DurationString() }
|
||||
} else {
|
||||
<p>
|
||||
<img src="/assets/img/listener.svg" alt="Listeners" title="Listeners" /> <span id="radio-listeners">{ strconv.FormatInt(lstnrs.Current(), 10) }</span>
|
||||
<img src="/assets/img/duration.svg" alt="Duration" title="Duration" /> <span id="radio-duration-estimate"></span><span id="radio-duration">0:00</span>
|
||||
</p>
|
||||
<p>
|
||||
<img src="/assets/img/note.svg" alt="Song" title="Song" /> <span id="radio-song"></span>
|
||||
</p>
|
||||
0:00
|
||||
}
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<img src="/assets/img/note.svg" />
|
||||
<span id="radio-song">
|
||||
if curSong != nil && curSong.Artist != "" {
|
||||
{ curSong.Artist } - { curSong.Title }
|
||||
}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -101,11 +105,11 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis
|
||||
for _, song := range sl {
|
||||
<tr>
|
||||
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
|
||||
<td>
|
||||
if song.PeakListeners != 0 {
|
||||
<td>{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) }</td>
|
||||
} else {
|
||||
<td></td>
|
||||
{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) }
|
||||
}
|
||||
</td>
|
||||
<td>{ song.Artist } - { song.Title }</td>
|
||||
</tr>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user