feat: render document or fragment

This commit is contained in:
2023-05-09 22:36:59 +02:00
parent f10fc81658
commit 32f5afb10f
5 changed files with 66 additions and 53 deletions

View File

@@ -1,8 +0,0 @@
<thead>
<tr><th>foo</th><th>bar</th><th>baz</th></tr>
</thead>
<tbody>
{% for row in table %}
<tr><td>{{ row.foo }}</td><td>{{ row.bar }}</td><td>{{ row.baz }}</td></tr>
{% endfor %}
</tbody>

View File

@@ -0,0 +1,7 @@
<tr><th>name</th><th>email</th></tr>
{% for user in users.as_ref().unwrap() %}
<tr>
<td>{{ user.name }}</td>
<td>{{ user.email }}</td>
</tr>
{% endfor %}