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 %}
|
39
www/templates/fragments/directory/inline.html
Normal file
39
www/templates/fragments/directory/inline.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<h3>Directory contents for {{page.basename}}:</h3>
|
||||
<table class="directory">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="hsmol_hide">Name</th>
|
||||
<th>Title</th>
|
||||
<th class="entry_update_time hsmol_hide">Modified</th>
|
||||
</tr>
|
||||
|
||||
<tr class="entry">
|
||||
<td>
|
||||
{{ fa['turn-up'] | raw }}
|
||||
</td>
|
||||
<td class="hsmol_hide">
|
||||
<a href={{page.parent.path}}> .. </a>
|
||||
</td>
|
||||
<td class="entry_title">
|
||||
<a href={{page.parent.path}}> .. </a>
|
||||
</td>
|
||||
<td class="entry_update_time hsmol_hide">
|
||||
</td>
|
||||
</tr>
|
||||
{% for post in page.child_posts %}
|
||||
<tr class="entry">
|
||||
<td>
|
||||
{{ fa[post.icon] | raw }}
|
||||
</td>
|
||||
<td class="hsmol_hide">
|
||||
<a href={{post.path}}>{{post.basename}}</a>
|
||||
</td>
|
||||
<td class="entry_title">
|
||||
<a href={{post.path}}>{{ post.title }}</a>
|
||||
</td>
|
||||
<td class="entry_update_time hsmol_hide">
|
||||
{{ post.updated_at }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue