open-law/app/templates/notification.html

25 lines
757 B
HTML

<!-- prettier-ignore -->
{% if not current_user.active_notifications %}
<div class="flex px-4 py-3">
<div class="w-full pl-3">
<div class="text-gray-500 text-sm mb-1.5 dark:text-gray-400">
You don't have notifications!
</div>
</div>
</div>
<!-- prettier-ignore -->
{% endif %}
<!-- prettier-ignore -->
{% for notification in current_user.active_notifications[:3]%}
<a
href="{{url_for('notifications.mark_as_read',notification_id=notification.id)}}"
class="flex px-4 py-3 hover:bg-gray-100 dark:hover:bg-gray-700">
<div class="w-full pl-3">
<div
class="text-gray-500 text-sm mb-1.5 dark:text-gray-400 {% if not notification.is_read %} font-bold{% endif %}">
{{notification.text}}
</div>
</div>
</a>
{% endfor %}