<li id="notif-{{ n.id }}" class="card bg-base-200 border p-3 flex flex-row items-center gap-3 {% if not n.is_read %}border-primary{% else %}border-base-300{% endif %}">
<i class="fas fa-bell {% if not n.is_read %}text-primary{% else %}opacity-40{% endif %}"></i>
<div class="flex-1 text-sm min-w-0">
{% if n.kind == "new_topic" %}
<a href="/t/{{ n.topic_id }}" class="link link-hover">
<span class="font-semibold">{{ n.actor }}</span> posted a new topic:
<span class="font-medium">{{ n.topic_title }}</span>
</a>
{% elif n.kind == "reaction" %}
<a href="/p/{{ n.post_id }}" class="link link-hover">
<span class="font-semibold">{{ n.actor }}</span> reacted to your post{% if n.topic_title %} in
<span class="font-medium">{{ n.topic_title }}</span>{% endif %}
</a>
{% else %}
<span>{{ n.actor }} · {{ n.kind }}</span>
{% endif %}
</div>
<span class="opacity-60 text-xs shrink-0" title="{{ n.created_abs }}">{{ n.created }}</span>
{% if not n.is_read %}
<button hx-post="/notifications/{{ n.id }}/read" hx-target="#notif-{{ n.id }}" hx-swap="outerHTML"
type="button" class="btn btn-ghost btn-xs shrink-0">Mark read</button>
{% endif %}
</li>
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions queued · Badges · Packages
⭐
Log in to mark this repository.
1.2 KiB · text
History
2264215