empede/templates/player.html

46 lines
1.1 KiB
HTML
Raw Normal View History

2023-04-25 14:32:51 +00:00
{# #}
<!DOCTYPE html>
<div class="nowplaying">
<div class="current">
{% if let Some(song) = song %}
2023-04-26 19:14:14 +00:00
<img
class="albumart"
src="/art?path={{ song.file }}"
onerror="this.style.opacity = 0"
>
2023-04-25 14:32:51 +00:00
<div class="metadata">
{% if let Some(name) = name %}
<div class="song__name">{{ name }}</div>
{% endif %}
{% if let Some(artist) = song.artist %}
<div>{{ artist }}</div>
{% endif %}
</div>
2023-04-25 16:58:34 +00:00
{% else %}
<div class="metadata idle">
Nothing playing right now
</div>
2023-04-25 14:32:51 +00:00
{% endif %}
</div>
<div class="controls">
<span
hx-post="/previous" hx-swap="none"
class="control material-symbols-outlined" role="button"
>skip_previous</span>
<span
hx-post="/play" hx-swap="none"
class="control material-symbols-outlined" role="button"
>play_arrow</span>
<span
hx-post="/pause" hx-swap="none"
class="control material-symbols-outlined" role="button"
>pause</span>
<span
hx-post="/next" hx-swap="none"
class="control material-symbols-outlined" role="button"
>skip_next</span>
</div>
</div>