Files
devrant/templates/feed.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

17 lines
566 B
HTML

{% extends 'base.html' %}
{% from 'components/rant_card.html' import render_rant_card %}
{% block content %}
<div class="sort-options">
<a href="/?sort=recent" class="sort-btn {% if current_sort == 'recent' %}active{% endif %}">Recent</a>
<a href="/?sort=top" class="sort-btn {% if current_sort == 'top' %}active{% endif %}">Top</a>
<a href="/?sort=algo" class="sort-btn {% if current_sort == 'algo' %}active{% endif %}">Algorithm</a>
</div>
<div>
{% for rant in rants %}
{{ render_rant_card(rant) }}
{% endfor %}
</div>
{% endblock %}