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>!
|
Your browser doesn't support an audio element, it's sad... But you always can take the <a href="/playlist">playlist</a>!
|
||||||
</audio>
|
</audio>
|
||||||
<div>
|
<div>
|
||||||
if curSong != nil && curSong.Artist != "" {
|
|
||||||
<p>
|
<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/listener.svg" alt="Listeners" title="Listeners" />
|
||||||
<img src="/assets/img/duration.svg" alt="Duration" title="Duration" /> <span id="radio-duration-estimate"></span><span id="radio-duration">{ curSong.DurationString() }</span>
|
<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 != "" {
|
||||||
|
{ curSong.DurationString() }
|
||||||
|
} else {
|
||||||
|
0:00
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<img src="/assets/img/note.svg" /> <span id="radio-song">{ curSong.Artist } - { curSong.Title }</span>
|
<img src="/assets/img/note.svg" />
|
||||||
|
<span id="radio-song">
|
||||||
|
if curSong != nil && curSong.Artist != "" {
|
||||||
|
{ curSong.Artist } - { curSong.Title }
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
} 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>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -98,17 +102,17 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
for _, song := range sl {
|
for _, song := range sl {
|
||||||
<tr>
|
<tr>
|
||||||
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
|
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
|
||||||
if song.PeakListeners != 0 {
|
<td>
|
||||||
<td>{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) }</td>
|
if song.PeakListeners != 0 {
|
||||||
} else {
|
{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) }
|
||||||
<td></td>
|
}
|
||||||
|
</td>
|
||||||
|
<td>{ song.Artist } - { song.Title }</td>
|
||||||
|
</tr>
|
||||||
}
|
}
|
||||||
<td>{ song.Artist } - { song.Title }</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user