mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-03-22 08:38:11 +05:00
drop "featured tracks", not available anymore
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user