Make directory items easier to click

This commit is contained in:
Sijmen 2023-04-25 04:00:46 +02:00
parent 97a1d7e03c
commit ab7b114d14
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -117,22 +117,28 @@
<ul class="dir">
{% for entry in entries %}
<li>
{% match entry %}
{% when mpd::Entry::Song with { name, path, artist } %}
<li hx-post="/queue?path={{path}}" hx-swap="none" role="button" >
<span class="material-symbols-outlined">music_note</span>
<div hx-post="/queue?path={{path}}" hx-swap="none" role="button" class="song">
<div class="song">
<div class="song__name">{{ name }}</div>
<div class="song__artist">{{ artist }}</div>
</a>
</li>
{% when mpd::Entry::Directory with { name, path }%}
<li onclick="window.location = '?path={{path}}'">
<span class="material-symbols-outlined">folder</span>
<a href="?path={{path}}">{{ name }}</a>
{% when mpd::Entry::Playlist with { name, path } %}
<span class="material-symbols-outlined">playlist_play</span>
<a href="?path={{path}}">{{ name }}</a>
{% endmatch %}
</li>
{% when mpd::Entry::Playlist with { name, path } %}
<li hx-post="/queue?path={{path}}" hx-swap="none" role="button" >
<span class="material-symbols-outlined">playlist_play</span>
<div class="song">
<div class="song__name">{{ name }}</div>
</a>
</li>
{% endmatch %}
{% endfor %}
</ul>