1
0

Pass number of last songs to a template.

This commit is contained in:
Alexander Andreev 2023-02-07 02:37:30 +04:00
parent 39486e7cf0
commit dde372fd5d
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -1,4 +1,4 @@
:go:func Index(mainSite string, status *radio.IcecastStatus, songs *[]radio.Song)
:go:func Index(mainSite string, songsNum int, status *radio.IcecastStatus, songs *[]radio.Song)
:go:import "dwelling-radio/internal/radio"
@ -46,7 +46,7 @@ html(lang='en')
small Notice: information updates every 45 seconds. But you can #[button(id='btn-update') update] it forcibly.
if len(*songs) > 0
section
h2 Last 10 songs
h2 Last #{songsNum} songs
table#last-played
each song in *songs
tr