some frontend changes

This commit is contained in:
Laptop
2024-10-07 21:25:42 +03:00
parent c13c188c02
commit 6aa8c531fa
4 changed files with 7 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ templ PlaylistHeader(p sc.Playlist) {
templ Playlist(p sc.Playlist) {
if p.Artwork != "" {
<img src={ p.Artwork }/>
<img src={ p.Artwork } width="300px"/>
}
<h1>{ p.Title }</h1>
<a class="listing" href={ templ.URL("/" + p.Author.Permalink) }>
@@ -43,7 +43,7 @@ templ Playlist(p sc.Playlist) {
if track.Title != "" {
<a class="listing" href={ templ.URL("/" + track.Author.Permalink + "/" + track.Permalink) }>
if track.Artwork != "" {
<img src={ track.Artwork }/>
<img src={ track.Artwork } class={ ViewTransition("t" + track.ID) }/>
} else {
<img src="/placeholder.jpg">
}

View File

@@ -46,7 +46,7 @@ templ TrackPlayer() {
templ Track(t sc.Track, stream string) {
if t.Artwork != "" {
<img src={ t.Artwork } class={ ViewTransition("t" + t.ID) }/>
<img src={ t.Artwork } class={ ViewTransition("t" + t.ID) } width="300px"/>
}
<h1>{ t.Title }</h1>
<audio id="track" src={ stream } controls></audio>
@@ -100,7 +100,7 @@ templ TrackEmbed(t sc.Track, stream string) {
</head>
<body>
if t.Artwork != "" {
<img src={ t.Artwork }/>
<img src={ t.Artwork } width="300px"/>
}
<h1>{ t.Title }</h1>
<audio id="track" src={ stream } controls></audio>

View File

@@ -18,7 +18,7 @@ templ UserHeader(u sc.User) {
templ UserBase(u sc.User) {
<div>
if u.Avatar != "" {
<img src={ u.Avatar }/>
<img src={ u.Avatar } class={ ViewTransition("u" + u.ID) } width="300px"/>
}
<h1>{ u.Username }</h1>
if u.FullName != "" {
@@ -151,7 +151,7 @@ templ SearchUsers(p *sc.Paginated[*sc.User]) {
for _, user := range p.Collection {
<a class="listing" href={ templ.URL("/" + user.Permalink) }>
if user.Avatar != "" {
<img src={ user.Avatar }/>
<img src={ user.Avatar } class={ ViewTransition("u" + user.ID) }/>
} else {
<img src="/placeholder.jpg"/>
}