drop "featured tracks", not available anymore

This commit is contained in:
Laptop
2025-04-16 21:08:20 +03:00
parent 14b501d162
commit 4f6f6585cb
6 changed files with 6 additions and 56 deletions

View File

@@ -54,7 +54,6 @@ templ MainPage(p cfg.Preferences) {
</form>
<footer>
<div>
<a class="btn" href="/_/featured">Featured Tracks</a>
<a class="btn" href="/discover">Discover Playlists</a>
<a class="btn" href="/_/preferences">Preferences</a>
<a class="btn" href="https://git.maid.zone/stuff/soundcloak">Source code</a>

View File

@@ -2,24 +2,9 @@ package templates
import (
"git.maid.zone/stuff/soundcloak/lib/sc"
"net/url"
"strconv"
)
templ FeaturedTracks(p *sc.Paginated[*sc.Track]) {
<h1>Featured Tracks</h1>
if len(p.Collection) == 0 {
<p>no more tracks</p>
} else {
for _, track := range p.Collection {
@TrackItem(track, true, "")
}
if p.Next != "" {
<a class="btn" href={ templ.SafeURL("/_/featured?pagination=" + url.QueryEscape(p.Next[sc.H+len("/featured_tracks/top/all-music"):])) } rel="noreferrer">more tracks</a>
}
}
}
templ Discover(p *sc.Paginated[*sc.Selection]) {
<h1>Discover Playlists</h1> // also tracks apparently? haven't seen any
<span>Got { strconv.FormatInt(int64(len(p.Collection)), 10) } selections</span>