56 lines
2.0 KiB
HTML
56 lines
2.0 KiB
HTML
{% from 'common/macros.html' import pager, timestamp %}
|
|
{% extends "base.html" %}
|
|
{% block title %}browsing topic {{ topic['name'] }}{% endblock %}
|
|
{% block content %}
|
|
<nav class="darkbg">
|
|
<h1 class="thread-title">All threads in "{{topic['name']}}"</h1>
|
|
<span>{{topic['description']}}</span>
|
|
<div>
|
|
{% if active_user and active_user.is_mod() %}
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
|
|
{% if topic['is_locked'] %}
|
|
{{ infobox("This topic is locked. Only moderators can create new threads.", InfoboxKind.INFO) }}
|
|
{% endif %}
|
|
|
|
{% if threads_list | length == 0 %}
|
|
<p>There are no threads in this topic.</p>
|
|
{% else %}
|
|
{% for thread in threads_list %}
|
|
<div class="thread">
|
|
<div class="thread-sticky-container contain-svg">
|
|
{% if thread['is_stickied'] %}
|
|
<img src="/static/misc/sticky.svg">
|
|
<i>Stickied</i>
|
|
{% endif %}
|
|
</div>
|
|
<div class="thread-info-container">
|
|
<span>
|
|
<span class="thread-title"><a href="{{ url_for("threads.thread", slug=thread['slug']) }}">{{thread['title']}}</a></span>
|
|
•
|
|
Started by <a href="{{ url_for("users.page", username=thread['started_by']) }}">{{ thread['started_by'] }}</a> on {{ timestamp(thread['created_at'])}}
|
|
</span>
|
|
<span>
|
|
Latest post by <a href="{{ url_for("users.page", username=thread['latest_post_username']) }}">{{ thread['latest_post_username'] }}</a>
|
|
on <a href="{{ url_for("threads.thread", slug=thread['slug']) }}">on {{ timestamp(thread['latest_post_created_at'] )}}</a>:
|
|
</span>
|
|
<span class="thread-info-post-preview">
|
|
{{ thread['latest_post_content'] }}
|
|
</span>
|
|
</div>
|
|
<div class="thread-locked-container contain-svg">
|
|
{% if thread['is_locked'] %}
|
|
<img src="/static/misc/lock.svg">
|
|
<i>Locked</i>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
<nav id="bottomnav">
|
|
{{ pager(current_page = current_page, page_count = page_count) }}
|
|
</nav>
|
|
{% endblock %}
|