generated from alecodes/base-template
feat: add basic htmx example
This commit is contained in:
parent
17bf419074
commit
ffca6175c0
6 changed files with 80 additions and 25 deletions
|
|
@ -1,26 +1,34 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="msp-text-center">Database</th>
|
||||
<th class="msp-text-center">Version</th>
|
||||
<th class="msp-text-center">Database Name</th>
|
||||
<th class="msp-text-center">Current User</th>
|
||||
<th class="msp-text-center">Current Timestamp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
<th>{{ row.database }}</th>
|
||||
<th>{{ row.version }}</th>
|
||||
<th>{{ row.current_database }}</th>
|
||||
<th>{{ row.current_user }}</th>
|
||||
<th>{{ row.current_timestamp }}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="msp-hstack msp-justify-content-end msp-mb-3">
|
||||
<button class="msp-btn-sm" hx-get="/" hx-target="#example-table">Refresh</button>
|
||||
</div>
|
||||
|
||||
|
||||
{% block htmx %}
|
||||
<table id="example-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="msp-text-center">Database</th>
|
||||
<th class="msp-text-center">Version</th>
|
||||
<th class="msp-text-center">Database Name</th>
|
||||
<th class="msp-text-center">Current User</th>
|
||||
<th class="msp-text-center">Current Timestamp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
<th>{{ row.database }}</th>
|
||||
<th>{{ row.version }}</th>
|
||||
<th>{{ row.current_database }}</th>
|
||||
<th>{{ row.current_user }}</th>
|
||||
<th>{{ row.current_timestamp }}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock htmx %}
|
||||
{% endblock content %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue