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"> <ul class="dir">
{% for entry in entries %} {% for entry in entries %}
<li> {% match entry %}
{% match entry %} {% when mpd::Entry::Song with { name, path, artist } %}
{% 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> <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__name">{{ name }}</div>
<div class="song__artist">{{ artist }}</div> <div class="song__artist">{{ artist }}</div>
</a> </a>
{% when mpd::Entry::Directory with { name, path }%} </li>
{% when mpd::Entry::Directory with { name, path }%}
<li onclick="window.location = '?path={{path}}'">
<span class="material-symbols-outlined">folder</span> <span class="material-symbols-outlined">folder</span>
<a href="?path={{path}}">{{ name }}</a> <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> </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 %} {% endfor %}
</ul> </ul>