lib.itmens/social/templates/events.html

48 lines
1.4 KiB
HTML
Raw Normal View History

2024-04-19 20:24:34 -04:00
{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
{% load thumb %}
{% load user_actions %}
{% load duration %}
{% for event in events %}
<section class="activity">
<div class="avatar">
<img src="{{ event.identity.avatar }}" alt="cover" />
</div>
<div>
<div>
<span class="time">
2024-06-03 17:33:39 -04:00
<span>{{ event.created|naturaldelta }}</span>
2024-04-19 20:24:34 -04:00
</span>
<div>
<span>
<a href="{{ event.identity.url }}"
class="nickname"
title="@{{ event.identity.full_handle }}">{{ event.identity.display_name }}</a>
</span>
{% with "event/"|add:event.template|add:".html" as template %}
{% include template %}
{% endwith %}
</div>
</div>
</div>
</section>
{% if forloop.last %}
<div class="htmx-indicator"
style="margin-left: 60px"
2024-04-20 10:01:46 -04:00
hx-get="{% url 'social:events' %}?type={{ request.GET.type }}&last={{ event.created|date:'Y-m-d H:i:s.uO'|urlencode }}"
2024-04-19 20:24:34 -04:00
hx-trigger="revealed"
hx-swap="outerHTML">
<i class="fa-solid fa-compact-disc fa-spin loading"></i>
</div>
{% endif %}
{% empty %}
{% if request.GET.last %}
<div class="empty">{% trans 'nothing more.' %}</div>
{% else %}
<div class="empty">{% trans 'nothing so far.' %}</div>
{% endif %}
{% endfor %}