fix: trim large album names on search page
This commit is contained in:
parent
355b721069
commit
c86b076188
@ -18,13 +18,10 @@ templ SearchPage(r data.SearchResults) {
|
||||
<h2>Songs</h2>
|
||||
for _, s := range s.Hits {
|
||||
<a id="search-item" href={ templ.URL(s.Result.Path) }>
|
||||
<img
|
||||
src={ data.ExtractImageURL(s.Result.Thumbnail) }
|
||||
alt="Song image"
|
||||
/>
|
||||
<img src={ data.ExtractImageURL(s.Result.Thumbnail) } alt="Song image"/>
|
||||
<div>
|
||||
<span>{ s.Result.ArtistNames }</span>
|
||||
<h3>{ s.Result.Title }</h3>
|
||||
<h3>{ utils.TrimText(s.Result.Title,70) }</h3>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
@ -35,12 +32,9 @@ templ SearchPage(r data.SearchResults) {
|
||||
<h2>Albums</h2>
|
||||
for _, a := range s.Hits {
|
||||
<a id="search-item" href={ templ.URL(utils.TrimURL(a.Result.URL)) }>
|
||||
<img
|
||||
src={ data.ExtractImageURL(a.Result.AlbumImage) }
|
||||
alt="Album image"
|
||||
/>
|
||||
<img src={ data.ExtractImageURL(a.Result.AlbumImage) } alt="Album image"/>
|
||||
<div>
|
||||
<h3>{ a.Result.AlbumName }</h3>
|
||||
<h3>{ utils.TrimText(a.Result.AlbumName, 70) }</h3>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
@ -51,12 +45,9 @@ templ SearchPage(r data.SearchResults) {
|
||||
<h2>Artists</h2>
|
||||
for _, a := range s.Hits {
|
||||
<a id="search-item" href={ templ.URL(utils.TrimURL(a.Result.URL)) }>
|
||||
<img
|
||||
src={ data.ExtractImageURL(a.Result.ArtistImage) }
|
||||
alt="Artist image"
|
||||
/>
|
||||
<img src={ data.ExtractImageURL(a.Result.ArtistImage) } alt="Artist image"/>
|
||||
<div>
|
||||
<h3>{ a.Result.ArtistName }</h3>
|
||||
<h3>{ utils.TrimText(a.Result.ArtistName, 70) }</h3>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user