Files
devrant/templates/notifications.html
T
retoor 7ee3cb1699 feat: add Jinja2 server-side rendering with template components and locust load testing
Introduce a full server-side rendering pipeline using Jinja2Templates, including base layout, navigation, modals, and rant card components. Add a classic.html static fallback page and a locustfile.py for load testing the new endpoints. Update main.py to mount static files, create template directories on startup, and add a format_time helper for relative timestamps.
2025-08-05 01:07:46 +00:00

16 lines
637 B
HTML

{% extends 'base.html' %}
{% block content %}
<h2>Notifications</h2>
{% if items %}
{% for notif in items %}
<div class="rant-card" onclick="window.location.href='/rant/{{ notif.rant_id }}';" style="cursor: pointer;">
<p><strong>{{ notif.username }}</strong> {% if notif.type == 'comment' %}commented on your rant{% else %}mentioned you{% endif %}</p>
<p style="color: var(--text-dim); font-size: 0.9rem;">{{ format_time(notif.created_time) }}</p>
</div>
{% endfor %}
{% else %}
<p style="text-align: center; color: var(--text-dim); margin-top: 2rem;">No notifications</p>
{% endif %}
{% endblock %}