Pass number of last songs to a template.
This commit is contained in:
parent
39486e7cf0
commit
dde372fd5d
@ -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"
|
: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.
|
small Notice: information updates every 45 seconds. But you can #[button(id='btn-update') update] it forcibly.
|
||||||
if len(*songs) > 0
|
if len(*songs) > 0
|
||||||
section
|
section
|
||||||
h2 Last 10 songs
|
h2 Last #{songsNum} songs
|
||||||
table#last-played
|
table#last-played
|
||||||
each song in *songs
|
each song in *songs
|
||||||
tr
|
tr
|
||||||
|
Loading…
Reference in New Issue
Block a user