feat: implement typed List template page for plants
This commit is contained in:
parent
1b22c8d118
commit
4e92c02e63
10 changed files with 208 additions and 36 deletions
5
templates/li/plant.html
Normal file
5
templates/li/plant.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% import "components/plant.html" as comp_plant %}
|
||||
|
||||
<li>
|
||||
{{ comp_plant::name(plant=item) }}
|
||||
</li>
|
||||
18
templates/list/ul.html
Normal file
18
templates/list/ul.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<h1>{{ heading }}</h1>
|
||||
|
||||
<ul id="items">
|
||||
{% for item in items %}
|
||||
{{ item | safe }}
|
||||
{% endfor %}
|
||||
|
||||
{% if next_page_url %}
|
||||
<div
|
||||
aria-busy="true"
|
||||
hx-get="{{ next_page_url }}"
|
||||
hx-select="#items > *"
|
||||
hx-trigger="revealed"
|
||||
hx-target="this"
|
||||
hx-swap="outerHTML">
|
||||
</div>
|
||||
{% endif %}
|
||||
</ul>
|
||||
Loading…
Add table
Add a link
Reference in a new issue