start the new topics route and view

This commit is contained in:
2026-04-12 23:36:50 +03:00
parent 099b5c135e
commit ce9bca0a75
11 changed files with 141 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
{% from 'common/macros.html' import timestamp %}
{%- extends 'base.html' -%}
{%- block content -%}
{%- for topic in topics -%}
<div class="topic-info plank">
<div class="title-container">
<a class="info" href="{{url_for('topics.topic', slug=topic.slug)}}">{{topic.name}}</a>
</div>
<div>{{topic.description}}</div>
<ul class="horizontal">
<li>{{topic.threads_count}} {{"thread" | pluralize(topic.threads_count)}}</li>
<li>{{topic.posts_count}} {{"post" | pluralize(topic.posts_count)}}</li>
</ul>
<div>
{%- if topic.latest_post_timestamp -%}
Latest post at: {{timestamp(topic.latest_post_timestamp)}}
{%- else -%}
No posts yet
{%- endif -%}
</div>
</div>
{%- endfor -%}
{%- endblock -%}