mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-01-06 02:49:38 +05:00
17 lines
525 B
Plaintext
17 lines
525 B
Plaintext
package templates
|
|
|
|
import (
|
|
"github.com/maid-zone/soundcloak/lib/sc"
|
|
"strconv"
|
|
"net/url"
|
|
"strings"
|
|
)
|
|
|
|
templ SearchTracks(p *sc.Paginated[sc.Track]) {
|
|
<h1>Found { strconv.FormatInt(p.Total, 10) } tracks</h1>
|
|
for _, track := range p.Collection {
|
|
<h1><a href={ templ.URL("/" + track.Author.Permalink + "/" + track.Permalink) }>{ track.Title }</a></h1>
|
|
}
|
|
|
|
<a href={ templ.URL("?type=tracks&pagination=" + url.QueryEscape(strings.Split(p.Next, "/tracks")[1])) } rel="noreferrer">more tracks</a>
|
|
} |