This commit is contained in:
2024-02-04 20:40:59 -03:00
parent afd43e3ff3
commit c06b44b71d
2 changed files with 28 additions and 4 deletions
+18 -3
View File
@@ -1,6 +1,21 @@
{{ define "users" }}
<h1 class="text-3xl mb-8">Users</h1>
<ul>
{{ range .Users }}<li class="italic hover:font-bold">{{ .FirstName }}, {{ .Age }} years old</li>{{ end }}
</ul>
<div class="flex items-center justify-center!">
<table class="border border-separate table-fixed" style="max-width: 50%;">
<thead>
<tr>
<th>First name</th>
<th>Age</th>
</tr>
</thead>
<tbody>
{{ range .Users }}
<tr>
<td>{{ .FirstName }}</td>
<td>{{ .Age }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
{{ end }}