nekrochan/templates/macros/catalog-entry.html

24 řádky
927 B
HTML

{% macro catalog_entry(post, index, page_size) %}
<div class="box catalog-entry">
<input name="posts[]" type="checkbox" value="{{ post.board }}/{{ post.id }}">&#32;
<b>/{{ post.board }}/{{ post.id }}</b>
{% if let Some(file) = post.files.0.get(0) %}
<a href="{{ post.post_url_notarget() }}">
<img src="{{ file.thumb_url() }}">
</a>
{% else %}
<p><b><a href="{{ post.post_url_notarget() }}">[Link]</a></b></p>
{% endif %}
<b>
<span>R: {{ post.replies }} / P: {{ index|get_page(page_size) }}</span>&#32;
{% if post.sticky %}
<img class="icon" src="/static/icons/sticky.png">&#32;
{% endif %}
{% if post.locked %}
<img class="icon" src="/static/icons/locked.png">&#32;
{% endif %}
</b>
<pre class="post-content">{{ post.content|add_yous(post.board, tcx.yous)|safe }}</pre>
</div>
{% endmacro %}