feat: reworked the template structure
This commit is contained in:
parent
c607d57221
commit
c9808f90f8
24 changed files with 216 additions and 80 deletions
27
www/templates/fragments/directory/compact/entry.html
Normal file
27
www/templates/fragments/directory/compact/entry.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
|
||||
<li class="folder-listing">
|
||||
{% set folder_key = random() %}
|
||||
|
||||
<input type="checkbox" id="folder-open-{{folder_key}}" name="folder-open-{{folder_key}}">
|
||||
<label for="folder-open-{{folder_key}}"
|
||||
hx-trigger="click once queue:last, mouseenter once queue:all, intersect once queue:all"
|
||||
hx-get="/ajax/fragments/directory/compact/listing.html?page={{ post.path }}"
|
||||
hx-target="next ul">
|
||||
|
||||
{{ fa['folder'] | raw }}
|
||||
{{ fa['folder-open'] | raw }}
|
||||
</label>
|
||||
|
||||
<a href={{post.path}}>
|
||||
{{ post.basename }} - {{ post.title }}
|
||||
</a>
|
||||
|
||||
<ul class="folder-listing">
|
||||
<li>
|
||||
<span>
|
||||
Loading...
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
4
www/templates/fragments/directory/compact/listing.html
Normal file
4
www/templates/fragments/directory/compact/listing.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
{% for post in page.child_posts %}
|
||||
{{ include('fragments/directory/compact/entry.html') }}
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue