mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-10 05:39:38 +05:00
fetchpriority low for some images
This commit is contained in:
@@ -23,9 +23,9 @@ func playlist(t sc.Track, p sc.Playlist) string {
|
||||
templ PlaylistItem(playlist *sc.Playlist, showUsername bool) {
|
||||
<a class="listing" href={ templ.SafeURL(playlist.Href()) }>
|
||||
if playlist.Artwork != "" {
|
||||
<img loading="lazy" src={ playlist.Artwork }/>
|
||||
<img loading="lazy" fetchpriority="low" src={ playlist.Artwork }/>
|
||||
} else {
|
||||
<img loading="lazy" src="/_/static/placeholder.jpg"/>
|
||||
<img loading="lazy" fetchpriority="low" src="/_/static/placeholder.jpg"/>
|
||||
}
|
||||
<div class="meta">
|
||||
<h3>{ playlist.Title }</h3>
|
||||
|
||||
@@ -131,9 +131,9 @@ templ TrackItem(track *sc.Track, showUsername bool, overrideHref string) {
|
||||
}}
|
||||
<a class="listing" href={ templ.SafeURL(overrideHref) }>
|
||||
if track.Artwork != "" {
|
||||
<img loading="lazy" src={ track.Artwork }/>
|
||||
<img loading="lazy" fetchpriority="low" src={ track.Artwork }/>
|
||||
} else {
|
||||
<img loading="lazy" src="/_/static/placeholder.jpg"/>
|
||||
<img loading="lazy" fetchpriority="low" src="/_/static/placeholder.jpg"/>
|
||||
}
|
||||
<div class="meta">
|
||||
<h3>{ track.Title }</h3>
|
||||
@@ -147,7 +147,7 @@ templ TrackItem(track *sc.Track, showUsername bool, overrideHref string) {
|
||||
|
||||
templ Track(prefs cfg.Preferences, t sc.Track, stream string, displayErr string, autoplay bool, playlist *sc.Playlist, nextTrack *sc.Track, volume string, mode string, audio string, downloadAudio *string, comments *sc.Paginated[*sc.Comment]) {
|
||||
if t.Artwork != "" {
|
||||
<img loading="lazy" src={ t.Artwork } width="300px"/>
|
||||
<img loading="lazy" fetchpriority="low" src={ t.Artwork } width="300px"/>
|
||||
}
|
||||
<h1>{ t.Title }</h1>
|
||||
@TrackPlayer(prefs, t, stream, displayErr, autoplay, nextTrack, playlist, volume, mode, audio)
|
||||
|
||||
@@ -19,9 +19,9 @@ templ UserHeader(u sc.User) {
|
||||
templ UserItem(user *sc.User) {
|
||||
<a class="listing" href={ templ.SafeURL("/" + user.Permalink) }>
|
||||
if user.Avatar != "" {
|
||||
<img loading="lazy" src={ user.Avatar }/>
|
||||
<img loading="lazy" fetchpriority="low" src={ user.Avatar }/>
|
||||
} else {
|
||||
<img loading="lazy" src="/_/static/placeholder.jpg"/>
|
||||
<img loading="lazy" fetchpriority="low" src="/_/static/placeholder.jpg"/>
|
||||
}
|
||||
<div class="meta">
|
||||
<h3>{ user.Username }</h3>
|
||||
|
||||
Reference in New Issue
Block a user