2024-07-29 20:44:06 +00:00
|
|
|
{% if #directories ~= 0 then %}
|
|
|
|
<ul class="directories">
|
|
|
|
{% for _, dir in ipairs(directories) do %}
|
|
|
|
<details
|
|
|
|
hx-trigger="toggle once"
|
2024-08-06 04:46:43 +00:00
|
|
|
hx-get="/dirlist.lua?dirpath={%& dir.path %}"
|
2024-07-29 20:44:06 +00:00
|
|
|
hx-target="find .details-children">
|
|
|
|
<summary>{%& dir.name %}</summary>
|
|
|
|
<div class="details-children"></div>
|
|
|
|
</details>
|
|
|
|
{% end %}
|
|
|
|
</ul>
|
|
|
|
{% end %}
|
|
|
|
{% if #files ~= 0 then %}
|
|
|
|
<ul class="files">
|
|
|
|
{% for _, file in ipairs(files) do %}
|
|
|
|
<li><label>
|
|
|
|
<input type="radio" name="filename-option" value="{%& file.path %}">
|
|
|
|
{%& file.name %}
|
|
|
|
</label></li>
|
|
|
|
{% end %}
|
|
|
|
</ul>
|
|
|
|
{% end %}
|