empede/templates/player.html
Sijmen b2ff3b60c8
Several changes:
- Add MPD_HOST and MPD_PORT environment variables
- Improve styling
- Move browser to separate template
- Reload directory on database update
2023-04-27 16:14:17 +02:00

43 lines
1.1 KiB
HTML

{# #}
<!DOCTYPE html>
<div class="nowplaying">
<div class="current">
{% if let Some(song) = song %}
<div class="albumart">
<img src="/art?path={{ song.file }}" onerror="this.style.opacity = 0">
</div>
<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>
{% else %}
<div class="metadata idle">
Nothing playing right now
</div>
{% 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>