mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2026-01-06 02:49:38 +05:00
changed a bunch of shit not going to elaborate
This commit is contained in:
@@ -8,17 +8,21 @@ templ Base(title string, content templ.Component, head templ.Component) {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="/global.css"/>
|
||||
if title != "" {
|
||||
<title>{ title } • Soundcloak</title>
|
||||
<title>{ title } • soundcloak</title>
|
||||
} else {
|
||||
<title>Soundcloak</title>
|
||||
<title>soundcloak</title>
|
||||
}
|
||||
if head != nil {
|
||||
@head
|
||||
}
|
||||
</head>
|
||||
<body>
|
||||
<a href="/" id="sc"><h1>Soundcloak</h1></a>
|
||||
<a href="/" id="sc"><h1>soundcloak</h1></a>
|
||||
@content
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
|
||||
css ViewTransition(name string) {
|
||||
view-transition-name: { templ.SafeCSSProperty(name) };
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
templ SearchPlaylists(p *sc.Paginated[sc.Playlist]) {
|
||||
templ SearchPlaylists(p *sc.Paginated[*sc.Playlist]) {
|
||||
<span>Found { strconv.FormatInt(p.Total, 10) } playlists</span>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
@@ -7,18 +7,14 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
templ SearchTracks(p *sc.Paginated[sc.Track]) {
|
||||
templ SearchTracks(p *sc.Paginated[*sc.Track]) {
|
||||
<span>Found { strconv.FormatInt(p.Total, 10) } tracks</span>
|
||||
<br/>
|
||||
<br/>
|
||||
for _, track := range p.Collection {
|
||||
<a class="listing" href={ templ.URL("/" + track.Author.Permalink + "/" + track.Permalink) }>
|
||||
<a class="listing" href={ templ.URL("/" + track.Author.Permalink + "/" + track.Permalink) }>
|
||||
if track.Artwork != "" {
|
||||
@templ.Raw("<img src='")
|
||||
{ track.Artwork }
|
||||
@templ.Raw("' style='view-transition-name:")
|
||||
{ "track-" + strconv.FormatInt(track.ID, 10) }
|
||||
@templ.Raw("'>")
|
||||
<img src={ track.Artwork } class={ViewTransition("t" + track.ID)}>
|
||||
} else {
|
||||
<img src="/placeholder.jpg"/>
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
templ SearchUsers(p *sc.Paginated[sc.User]) {
|
||||
templ SearchUsers(p *sc.Paginated[*sc.User]) {
|
||||
<span>Found { strconv.FormatInt(p.Total, 10) } users</span>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
@@ -17,11 +17,7 @@ templ TrackEmbed(t sc.Track) {
|
||||
|
||||
templ Track(t sc.Track, stream string) {
|
||||
if t.Artwork != "" {
|
||||
@templ.Raw("<img src='")
|
||||
{ t.Artwork }
|
||||
@templ.Raw("' style='view-transition-name:")
|
||||
{ "track-" + strconv.FormatInt(t.ID, 10) }
|
||||
@templ.Raw("'>")
|
||||
<img src={t.Artwork} class={ViewTransition("t" + t.ID)}>
|
||||
}
|
||||
<h1>{ t.Title }</h1>
|
||||
<audio id="track" data-stream={ stream } controls></audio>
|
||||
|
||||
Reference in New Issue
Block a user