feat: render document or fragment
This commit is contained in:
19
templates/index.html
Normal file
19
templates/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<hgroup>
|
||||
<h1>Hello htmx!</h1>
|
||||
<p>A new old way to build web applications</p>
|
||||
</hgroup>
|
||||
<table>
|
||||
{% if users.is_some() %}
|
||||
{% include "fragment/user/table.html" %}
|
||||
{% else %}
|
||||
<tr><td>
|
||||
<button hx-get="/user" hx-target="table" hx-push-url="true">
|
||||
Load data
|
||||
</button>
|
||||
</td></tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user