Files
go-htmx-tailwind-example/templates/entity-list.html

44 lines
1.7 KiB
HTML

<div id="entity-list">
<div id="processing" class="htmx-indicator">Processing...</div>
<div class="flex flex-col">
<div class="overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 sm:px-6 lg:px-8">
<div class="overflow-hidden">
<!-- <div class="flex justify-end">
<button
hx-get="/item/add"
hx-target="#table-body"
hx-swap="beforeend"
hx-indicator="#processing"
class="inline-flex items-center h-8 px-4 m-2 text-sm text-blue-100 transition-colors duration-150 bg-blue-700 rounded-lg focus:shadow-outline hover:bg-blue-800"
href=""
>
Add
</button>
</div> -->
<table class="min-w-full text-left text-sm font-light">
<thead class="border-b font-medium dark:border-neutral-500">
<tr>
<th scope="col" class="px-6 py-4">#</th>
<th scope="col" class="px-6 py-4">Name</th>
<th scope="col" class="px-6 py-4">Stage</th>
<th scope="col" class="px-6 py-4">Category</th>
<th scope="col" class="px-6 py-4">Description</th>
<th scope="col" class="px-6 py-4">Notes</th>
<th scope="col" class="px-6 py-4"></th>
</tr>
</thead>
<tbody id="table-body">
{{range .}}
{{ template "entity-row.html" . }}
{{end}}
{{ template "entity-add.html" . }}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>