60 řádky
2.7 KiB
HTML
60 řádky
2.7 KiB
HTML
|
{% macro post(board, post, boxed) %}
|
||
|
<div id="{{ post.id }}" class="post{% if boxed %} box{% endif %}">
|
||
|
<div class="post-header">
|
||
|
<input name="posts[]" type="checkbox" value="{{ post.board }}/{{ post.id }}"> 
|
||
|
{% if let Some(email) = post.email %}
|
||
|
<a class="name" rel="nofollow" href="mailto:{{ email }}">{{ post.name }}</a> 
|
||
|
{% else %}
|
||
|
<span class="name">{{ post.name }}</span> 
|
||
|
{% endif %}
|
||
|
{% if let Some(tripcode) = post.tripcode %}
|
||
|
<span class="tripcode">{{ tripcode }}</span> 
|
||
|
{% endif %}
|
||
|
{% if let Some(capcode) = post.capcode %}
|
||
|
<span class="capcode">## {{ capcode }}</span> 
|
||
|
{% endif %}
|
||
|
{% if tcx.ip == post.ip %}
|
||
|
{# Technically not a tripcode or something but same styling #}
|
||
|
<i class="tripcode">(Ty)</i> 
|
||
|
{% endif %}
|
||
|
{% if board.config.0.flags %}
|
||
|
<img class="icon" src="/static/flags/{{ post.country }}.png"> 
|
||
|
{% endif %}
|
||
|
<span title="{{ post.created|czech_datetime }}">{{ post.created|czech_humantime }}</span> 
|
||
|
{% if board.config.0.user_ids %}
|
||
|
<span class="user-id" style="background-color: #{{ post.user_id }};">{{ post.user_id }}</span> 
|
||
|
{% endif %}
|
||
|
<a class="post-number" href="{{ post.post_url() }}">Č.{{ post.id }}</a> 
|
||
|
{% if post.sticky %}
|
||
|
<img class="icon" src="/static/icons/sticky.png"> 
|
||
|
{% endif %}
|
||
|
{% if post.locked %}
|
||
|
<img class="icon" src="/static/icons/locked.png"> 
|
||
|
{% endif %}
|
||
|
|
||
|
{% if !boxed %}
|
||
|
<a href="{{ post.post_url_notarget() }}">[Odpovědět]</a> 
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
{% if !post.files.0.is_empty() %}
|
||
|
<div class="post-files{% if post.files.0.len() > 1 %} multi-files{% endif %}">
|
||
|
{% for file in post.files.0 %}
|
||
|
<div class="post-file">
|
||
|
<a download="{{ file.original_name }}" href="{{ file.file_url() }}">
|
||
|
{% if file.spoiler %}<i>[Spoiler]</i>{% else %}{{ file.original_name }}{% endif %} 
|
||
|
<img class="icon" src="/static/icons/download.png">
|
||
|
</a>
|
||
|
<br>
|
||
|
({{ file.size|filesizeformat }}, {{ file.width }}x{{ file.height }})
|
||
|
<br>
|
||
|
<a target="_blank" href="{{ file.file_url() }}">
|
||
|
<img class="thumb" src="{{ file.thumb_url() }}">
|
||
|
</a>
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<pre class="post-content">{{ post.content|add_yous(post.board, tcx.yous)|safe }}</pre>
|
||
|
</div>
|
||
|
{% endmacro %}
|