2021-11-20 23:55:39 +01:00
|
|
|
{% load static %}
|
2021-11-20 19:54:57 +01:00
|
|
|
{% load slippers %}
|
|
|
|
<main id="main" data-scroll-to-top="true">
|
2021-11-20 20:29:44 +01:00
|
|
|
|
|
|
|
{# Search #}
|
|
|
|
<form>
|
|
|
|
<input type="hidden" name="action" value="page">
|
|
|
|
<input type="hidden" name="value" value="search-talks">
|
|
|
|
<label>
|
|
|
|
<input
|
2021-11-20 23:55:39 +01:00
|
|
|
id="search"
|
2021-11-20 20:29:44 +01:00
|
|
|
type="search"
|
|
|
|
name="search"
|
|
|
|
hx-ws="send"
|
2021-11-20 23:55:39 +01:00
|
|
|
hx-trigger="keyup changed delay:1s"
|
2021-11-20 20:29:44 +01:00
|
|
|
value="{{ search }}"
|
|
|
|
>
|
|
|
|
</label>
|
|
|
|
</form>
|
|
|
|
{# End search #}
|
|
|
|
|
|
|
|
{# List talks #}
|
2021-11-20 23:55:39 +01:00
|
|
|
{% if talks %}
|
|
|
|
{% for talk in talks %}
|
|
|
|
<form>
|
2021-11-21 09:34:54 +01:00
|
|
|
{% #link action="page" value="single-talk" id=talk.id %}
|
2021-11-20 23:55:39 +01:00
|
|
|
<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>
|
2021-11-21 09:34:54 +01:00
|
|
|
{% /link %}
|
2021-11-20 23:55:39 +01:00
|
|
|
</form>
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
<h1>No talks found.</h1>
|
|
|
|
{% endif %}
|
2021-11-20 20:29:44 +01:00
|
|
|
{# End List talks #}
|
|
|
|
|
|
|
|
{# Paginator #}
|
|
|
|
{% if not search %}
|
|
|
|
<div class="loading" >
|
|
|
|
<p>Page {{ page }}</p>
|
2021-11-21 09:35:56 +01:00
|
|
|
{% #link action="page" value="talks" page=next_page %}Next page{% /link %}
|
2021-11-20 20:29:44 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{# End Paginator #}
|
|
|
|
|
2021-11-20 23:55:39 +01:00
|
|
|
<script src="{% static "js/talks.js" %}"></script>
|
2021-11-12 18:59:01 +01:00
|
|
|
</main>
|