1
0

Fixed Last N songs section.

This commit is contained in:
Alexander Andreev 2024-05-11 05:34:32 +04:00
parent 056f2c022b
commit 5d042cdb3a
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -84,7 +84,6 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis
</div> </div>
</div> </div>
</section> </section>
if sl != nil && len(sl) != 0 {
<section> <section>
<h2>Last { strconv.FormatInt(slLen, 10) } songs</h2> <h2>Last { strconv.FormatInt(slLen, 10) } songs</h2>
<table id="last-songs"> <table id="last-songs">
@ -96,6 +95,7 @@ if sl != nil && len(sl) != 0 {
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
if sl != nil && len(sl) != 0 {
for i := 0; i < len(sl); i++ { for i := 0; i < len(sl); i++ {
<tr> <tr>
<td>{ utils.ToClientTimezone(sl[i].StartAt, r).Format("15:04") }</td> <td>{ utils.ToClientTimezone(sl[i].StartAt, r).Format("15:04") }</td>
@ -107,10 +107,10 @@ if sl != nil && len(sl) != 0 {
<td>{ sl[i].Artist } - { sl[i].Title }</td> <td>{ sl[i].Artist } - { sl[i].Title }</td>
</tr> </tr>
} }
}
</tbody> </tbody>
</table> </table>
</section> </section>
}
<footer> <footer>
2017&mdash;2024 Alexander &quot;Arav&quot; Andreev &lt;<a href="mailto:me@arav.su">me@arav.su</a>&gt; <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>Privacy statements</a> 2017&mdash;2024 Alexander &quot;Arav&quot; Andreev &lt;<a href="mailto:me@arav.su">me@arav.su</a>&gt; <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>Privacy statements</a>
</footer> </footer>