Add album art placeholder
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sijmen 2023-05-08 13:56:10 +02:00
parent 68a00bfe80
commit 63a365d11d
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48
4 changed files with 8 additions and 6 deletions

BIN
static/placeholder.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -58,7 +58,11 @@
>
<span class="material-symbols-outlined" title="Song">music_note</span>
<div class="albumart">
<img src="/art?path={{ path|urlencode }}" onerror="this.style.visibility = 'hidden'">
<img
src="/art?path={{ path|urlencode }}"
onload="this.style.visibility = 'visible'"
alt="Album art"
>
</div>
<div class="song">
<div class="song__name">{{ name }}</div>

View file

@ -5,11 +5,10 @@
{% if let Some(song) = song %}
<div class="albumart">
<a href="/art?path={{ song.file|urlencode }}" target="_blank">
<img
<img
src="/art?path={{ song.file|urlencode }}"
onerror="this.style.opacity = 0"
onload="this.style.visibility = 'visible'"
alt="Album art"
title="Album art"
>
</a>
</div>

View file

@ -7,9 +7,8 @@
<div class="albumart">
<img
src="/art?path={{ item.file|urlencode }}"
onerror="this.style.opacity = 0"
onload="this.style.visibility = 'visible'"
alt="Album art"
title="Album art"
>
</div>
<div class="metadata">