2023-12-11 15:18:43 +00:00
|
|
|
{% 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 }}"> 
|
2024-02-18 19:25:38 +00:00
|
|
|
{% if tcx.perms.owner() || tcx.perms.view_ips() %}
|
|
|
|
<b><a title="Více příspěvků od uživatele [{{ post.ip }}]" href="/ip-posts/{{ post.ip }}">[+]</a></b> 
|
|
|
|
{% endif %}
|
2023-12-11 15:18:43 +00:00
|
|
|
{% 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 %}
|
2024-02-18 19:25:38 +00:00
|
|
|
<span title="Tento uživatel to dělá ZDARMA!" class="capcode">## {{ capcode }} <img class="icon" src="/favicon.ico"></span> 
|
2023-12-11 15:18:43 +00:00
|
|
|
{% 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 %}
|
2024-02-18 19:25:38 +00:00
|
|
|
<img title="Země: {{ post.country }}" class="icon" src="/static/flags/{{ post.country }}.png"> 
|
2023-12-11 15:18:43 +00:00
|
|
|
{% endif %}
|
2024-02-25 16:26:39 +00:00
|
|
|
<time datetime="{{ post.created }}">{{ post.created|czech_datetime }}</time> 
|
2023-12-11 15:18:43 +00:00
|
|
|
{% 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 %}
|
2024-02-18 19:25:38 +00:00
|
|
|
<img title="Připnuto" class="icon" src="/static/icons/sticky.png"> 
|
2023-12-11 15:18:43 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if post.locked %}
|
2024-02-18 19:25:38 +00:00
|
|
|
<img title="Uzamčeno" class="icon" src="/static/icons/locked.png"> 
|
2023-12-11 15:18:43 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if !boxed %}
|
|
|
|
<a href="{{ post.post_url_notarget() }}">[Odpovědět]</a> 
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% if !post.files.0.is_empty() %}
|
2024-02-19 17:02:41 +00:00
|
|
|
<div class="post-files{% if post.files.0.len() > 1 %} float-none-a{% endif %}">
|
2023-12-11 15:18:43 +00:00
|
|
|
{% for file in post.files.0 %}
|
|
|
|
<div class="post-file">
|
2024-02-19 17:02:41 +00:00
|
|
|
<a title="Stáhnout {{ file.original_name }}" download="{{ file.original_name }}" href="{{ file.file_url() }}">
|
2023-12-25 13:53:44 +00:00
|
|
|
{% if file.spoiler %}
|
|
|
|
[Spoiler]
|
|
|
|
{% else %}
|
2024-02-17 21:24:39 +00:00
|
|
|
{{ file.original_name|truncate(20) }}
|
2023-12-25 13:53:44 +00:00
|
|
|
{% endif %}
|
2023-12-11 15:18:43 +00:00
|
|
|
</a>
|
|
|
|
<br>
|
|
|
|
({{ file.size|filesizeformat }}, {{ file.width }}x{{ file.height }})
|
|
|
|
<br>
|
2024-02-18 19:25:38 +00:00
|
|
|
<a class="expandable" target="_blank" href="{{ file.file_url() }}">
|
2023-12-11 15:18:43 +00:00
|
|
|
<img class="thumb" src="{{ file.thumb_url() }}">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2024-01-15 15:06:25 +00:00
|
|
|
<div class="post-content">{{ post.content|add_yous(post.board, tcx.yous)|safe }}</div>
|
2023-12-11 15:18:43 +00:00
|
|
|
</div>
|
|
|
|
{% endmacro %}
|