51 řádky
1.9 KiB
HTML
51 řádky
1.9 KiB
HTML
|
{% import "./macros/pagination.html" as pagination %}
|
||
|
{% import "./macros/post-actions.html" as post_actions %}
|
||
|
{% import "./macros/post-form.html" as post_form %}
|
||
|
{% import "./macros/post.html" as post %}
|
||
|
|
||
|
{% extends "base.html" %}
|
||
|
|
||
|
{% block title %}/{{ board.id }}/ - {{ board.name }}{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
<div class="container">
|
||
|
<div class="center">
|
||
|
{% if let Some(banner) = board.random_banner() %}
|
||
|
<img class="banner" src="{{ banner.file_url() }}">
|
||
|
{% endif %}
|
||
|
<h1 class="title">/{{ board.id }}/ - {{ board.name }}</h1>
|
||
|
<p class="description">{{ board.description }}</p>
|
||
|
<a href="/boards/{{ board.id }}/catalog">Katalog</a>
|
||
|
</div>
|
||
|
{% call post_form::post_form(board, tcx.perms, false, 0) %}
|
||
|
</div>
|
||
|
<hr>
|
||
|
<form method="post">
|
||
|
{% for (thread, replies) in threads %}
|
||
|
<div class="thread">
|
||
|
{% call post::post(board, thread, false) %}
|
||
|
{% let count = replies.len() %}
|
||
|
{% if count > 5 %}
|
||
|
<p class="posts-omitted">
|
||
|
{% let omitted = count - 5 %}
|
||
|
{{ "Vynechán|Vynechány|Vynecháno"|czech_plural(omitted) }} {{ omitted }} {{ "příspěvek|příspěvky|příspěvků"|czech_plural(omitted) }}. <a href="{{ thread.post_url_notarget() }}">Zobrazit celé vlákno.</a>
|
||
|
</p>
|
||
|
{% for reply_post in replies.iter().rev().take(5).rev() %}
|
||
|
{% call post::post(board, reply_post, true) %}
|
||
|
<br>
|
||
|
{% endfor %}
|
||
|
{% else %}
|
||
|
{% for reply_post in replies %}
|
||
|
{% call post::post(board, reply_post, true) %}
|
||
|
<br>
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<hr>
|
||
|
{% endfor %}
|
||
|
{% call pagination::pagination("/boards/{}"|format(board.id), pages, page) %}
|
||
|
<hr>
|
||
|
{% call post_actions::post_actions(tcx.perms) %}
|
||
|
</form>
|
||
|
{% endblock %}
|