html-over-websockets-with-d.../app/website/templates/pages/talks.html
Andros Fenollosa 209adf66f7 Add single page
2021-11-13 09:07:55 +01:00

35 lines
1.3 KiB
HTML

<main id="main">
{% for talk in talks %}
<form>
<input type="hidden" name="action" value="page">
<input type="hidden" name="value" value="single-talk">
<input type="hidden" name="id" value="{{ talk.id }}">
<a href="#" hx-ws="send" hx-trigger="click">
<article>
<header>
<div class="grid">
<p>
<img width="200" src="{{ talk.image.url }}">
</p>
<h2>{{ talk.title }}</h2>
</div>
</header>
<p>
{{ talk.content|truncatechars:150 }}
</p>
<footer>Author {{ talk.author.full_name }} - {{ talk.category.name }}</footer>
</article>
</a>
</form>
{% endfor %}
{# Pagination #}
<div class="loading" >
<form>
<input type="hidden" name="action" value="page">
<input type="hidden" name="value" value="talks">
<input type="hidden" name="page" value="{{ next_page }}">
<p hx-ws="send" hx-trigger="click,revealed">Show more</p>
</form>
</div>
</main>