Nekrocuck

This commit is contained in:
2025-09-28 12:59:09 +02:00
commit a2d093954d
402 changed files with 13763 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
{% macro board_links() %}
<span class="link-group">
{% for board_link in tcx.boards %}
<a href="/boards/{{ board_link }}">{{ board_link }}</a>
{% if !loop.last %}<span class="link-separator"></span>{% endif %}
{% endfor %}
</span>
{% endmacro %}

View File

@@ -0,0 +1,23 @@
{% 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 class="thumb" 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>
<div class="post-content">{{ post.content|add_yous(post.board, tcx.yous)|safe }}</div>
</div>
{% endmacro %}

View File

@@ -0,0 +1,25 @@
{% macro pagination(base, pages, current) %}
<div class="pagination box inline-block">
{% if current == 1 %}
[Předchozí]
{% else %}
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
{% endif %}
&#32;
{% for page in 1..(pages + 1) %}
{% if page == current %}
[<b><a href="{{ base }}?page={{ page }}">{{ page }}</a></b>]
{% else %}
[<a href="{{ base }}?page={{ page }}">{{ page }}</a>]
{% endif %}
&#32;
{% endfor %}
{% if current == pages %}
[Další]
{% else %}
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
{% endif %}
</div>
{% endmacro %}

View File

@@ -0,0 +1,224 @@
{% macro post_actions() %}
<details>
<summary class="box">Uživatelské akce</summary>
<table class="form-table">
<tr>
<td class="label">Odstranit příspěvky</td>
<td>
<div class="input-wrapper">
<input name="remove_posts" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Odstranit soubory</td>
<td>
<div class="input-wrapper">
<input name="remove_files" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Přidat/odstranit spoiler</td>
<td>
<div class="input-wrapper">
<input name="toggle_spoiler" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Heslo</td>
<td><input name="post_password" type="password"></td>
</tr>
<tr>
<td colspan="2">
<input
class="button"
type="submit"
formaction="/actions/user-post-actions"
value="Odeslat"
>
</td>
</tr>
</table>
<table class="form-table">
<tr>
<td class="label">Důvod hlášení</td>
<td><input name="report_reason" type="text"></td>
</tr>
<tr>
<td colspan="2">
<input
class="button"
type="submit"
formaction="/actions/report-posts"
value="Nahlásit"
>
</td>
</tr>
</table>
</details>
<br>
{% if tcx.perms.owner() || tcx.perms.edit_posts() || tcx.perms.manage_posts() || tcx.perms.reports() || tcx.perms.bans() %}
<details>
<summary class="box">Uklízečské akce</summary>
<table class="form-table">
{% if tcx.perms.owner() || tcx.perms.manage_posts() %}
<tr>
<td class="label">Odstranit příspěvky</td>
<td>
<div class="input-wrapper">
<input name="staff_remove_posts" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Odstranit soubory</td>
<td>
<div class="input-wrapper">
<input name="staff_remove_files" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Přidat/odstranit spoiler</td>
<td>
<div class="input-wrapper">
<input name="staff_toggle_spoiler" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Odstranit od IP na nástěnce</td>
<td>
<div class="input-wrapper">
<input name="remove_by_ip_board" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Odstranit od IP globálně</td>
<td>
<div class="input-wrapper">
<input name="remove_by_ip_global" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Připnout/odepnout</td>
<td>
<div class="input-wrapper">
<input name="toggle_sticky" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Uzamknout/odemknout</td>
<td>
<div class="input-wrapper">
<input name="toggle_lock" type="checkbox">
</div>
</td>
</tr>
{% endif %}
{% if tcx.perms.owner() || tcx.perms.reports() %}
<tr>
<td class="label">Odstranit hlášení</td>
<td>
<div class="input-wrapper">
<input name="remove_reports" type="checkbox">
</div>
</td>
</tr>
{% endif %}
{% if tcx.perms.owner() || tcx.perms.bans() %}
<tr>
<td class="label">Zabanovat uživatele</td>
<td>
<div class="input-wrapper">
<input name="ban_user" type="checkbox">
</div>
</td>
</tr>
{% if tcx.perms.owner() || tcx.perms.reports() %}
<tr>
<td class="label">Zabanovat nahlašovatele</td>
<td>
<div class="input-wrapper">
<input name="ban_reporters" type="checkbox">
</div>
</td>
</tr>
{% endif %}
<tr>
<td class="label">Globální ban</td>
<td>
<div class="input-wrapper">
<input name="global_ban" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Neodvolatelný ban</td>
<td>
<div class="input-wrapper">
<input name="unappealable_ban" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Důvod banu</td>
<td><textarea name="ban_reason"></textarea></td>
</tr>
<tr>
<td class="label">Délka banu <span class="small">(dny, 0 = trvalý)</span></td>
<td><input name="ban_duration" type="number" min="0" value="0"></td>
</tr>
<tr>
<td class="label">Rozsah banu</td>
<td>
<select name="ban_range">
<option value="ip" selected="selected">IP adresa</option>
<option value="lan">LAN</option>
<option value="isp">ISP</option>
</select>
</td>
</tr>
{% endif %}
{% if tcx.perms.owner() || (tcx.perms.edit_posts() && tcx.perms.view_ips()) %}
<td class="label">Vytrolit uživatele</td>
<td>
<div class="input-wrapper">
<input name="troll_user" type="checkbox">
</div>
</td>
{% endif %}
<tr>
<td colspan="2">
<input
class="button"
type="submit"
formaction="/actions/staff-post-actions"
value="Odeslat"
>
</td>
</tr>
</table>
{% if tcx.perms.owner() || tcx.perms.edit_posts() %}
<table class="form-table">
<tr>
<td>
<input
class="button"
type="submit"
formaction="/edit-posts"
value="Upravit příspěvky"
>
</td>
</tr>
</table>
{% endif %}
</details>
{% endif %}
{% endmacro %}

View File

@@ -0,0 +1,105 @@
{% macro post_form(board, reply, reply_to) %}
<form id="post-form" method="post" enctype="multipart/form-data" action="/actions/create-post" autocomplete="off" data-visible="false">
<input name="board" type="hidden" value="{{ board.id }}">
{% if reply %}
<input name="thread" type="hidden" value="{{ reply_to }}">
{% endif %}
<table class="form-table">
<tr>
<td id="post-form-handle" class="label center" colspan="2">
{% if reply %}
Nová odpověď
{% else %}
Nové vlákno
{% endif %}
<a class="close-post-form float-r" href="#">[X]</a>
</td>
</tr>
<tr>
<td class="label">Jméno</td>
<td>
<input name="post_name" type="text" placeholder="{{ board.config.0.anon_name }}">
</td>
</tr>
<tr>
<td class="label">Email</td>
<td>
<input name="email" type="text">
</td>
</tr>
<tr>
<td class="label">Obsah</td>
<td>
<textarea id="content" name="content" {% if (!reply && board.config.0.require_thread_content) || (reply && board.config.0.require_reply_content) %}required=""{% endif %}></textarea>
</td>
</tr>
{% if !(tcx.perms.bypass_captcha() || tcx.perms.owner()) %}
{% let difficulty %}
{% if reply %}
{% let difficulty = board.config.0.reply_captcha.as_str() %}
{% else %}
{% let difficulty = board.config.0.thread_captcha.as_str() %}
{% endif %}
{% if (!reply && board.config.0.thread_captcha != "off") || (reply && board.config.0.reply_captcha != "off") %}
<tr>
<td class="label">
CAPTCHA<br>
<span class="small">(vyprší za 10 min.)</span>
<noscript><span class="small">(VYŽADUJE JAVASCRIPT)</span></noscript>
</td>
<td>
<div class="input-wrapper">
<table class="full-width">
<input id="captcha-id" name="captcha_id" type="hidden">
<tr>
<td>
<button id="get-captcha" type="button" class="button" data-board="{{ board.id }}" data-reply="{{ reply }}">Získat CAPTCHA</button>
</td>
<td>
<input name="captcha_solution" type="text" placeholder="Řešení" value="" required="">
</tr>
</tr>
<tr><td colspan="2"><div id="captcha"></div></tr>
</table>
</div>
</td>
</tr>
{% endif %}
{% endif %}
<tr>
<td class="label">
{% if board.config.0.file_limit > 1 %}
Soubory <span class="small">(max {{ board.config.0.file_limit }})</span>
{% else %}
Soubor
{% endif %}
</td>
<td>
<div class="input-wrapper">
<input name="files[]" type="file"{% if board.config.0.file_limit > 1 %} multiple="multiple"{% endif %}{% if (!reply && board.config.0.require_thread_file) || (reply && board.config.0.require_reply_file) %} required=""{% endif %}>
</div>
</td>
</tr>
<tr>
<td class="label">Spoiler?</td>
<td>
<div class="input-wrapper">
<input class="full-width" name="spoiler_files" type="checkbox">
</div>
</td>
</tr>
<tr>
<td class="label">Heslo</td>
<td><input name="post_password" type="password" required=""></td>
</tr>
<tr>
{% if reply %}
<td colspan="2"><input class="button" type="submit" value="Nová odpověď"></td>
{% else %}
<td colspan="2"><input class="button" type="submit" value="Nové vlákno"></td>
{% endif %}
</tr>
</table>
</form>
{% endmacro %}

View File

@@ -0,0 +1,82 @@
{% macro post(board, post, boxed) %}
<div id="{{ post.id }}" class="post{% if boxed %} box{% endif %}" data-board="{{ board.id }}">
<div class="post-header">
<input name="posts[]" type="checkbox" value="{{ post.board }}/{{ post.id }}">&#32;
{% 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>&#32;
{% endif %}
{% if let Some(email) = post.email %}
<a class="name" rel="nofollow" href="mailto:{{ email }}">{{ post.name }}</a>&#32;
{% else %}
<span class="name">{{ post.name }}</span>&#32;
{% endif %}
{% if let Some(tripcode) = post.tripcode %}
<span class="tripcode">{{ tripcode }}</span>&#32;
{% endif %}
{% if let Some(capcode) = post.capcode %}
<span title="Tento uživatel to dělá ZDARMA!" class="capcode">## {{ capcode }} <img class="icon" src="/favicon.ico"></span>&#32;
{% endif %}
{% if tcx.ip == post.ip %}
{# Technically not a tripcode or something but same styling #}
<i class="tripcode">(Ty)</i>&#32;
{% endif %}
{% if board.config.0.flags %}
<img title="Země: {{ post.country }}" class="icon" src="/static/flags/{{ post.country }}.png">&#32;
{% endif %}
{% if board.config.0.flags_reg %}
{% if let Some(region) = post.region %}
<img title="Region: {{ region }}" class="icon" src="/static/flags/reg/{{ region }}.png">&#32;
{% endif %}
{% endif %}
<time datetime="{{ post.created }}">{{ post.created|czech_datetime }}</time>&#32;
{% if board.config.0.user_ids %}
<span class="user-id" style="background-color: #{{ post.user_id }};">{{ post.user_id }}</span>&#32;
{% endif %}
<span class="post-number">
<a href="{{ post.post_url() }}">Č.</a>
<a class="quote-link" href="{{ post.thread_url() }}#post-form" data-thread-url="{{ post.thread_url() }}">{{ post.id }}</a>&#32;
</span>
{% if post.sticky %}
<img title="Připnuto" class="icon" src="/static/icons/sticky.png">&#32;
{% endif %}
{% if post.locked %}
<img title="Uzamčeno" class="icon" src="/static/icons/locked.png">&#32;
{% endif %}
{% if !boxed %}
<a href="{{ post.post_url_notarget() }}">[Otevřít]</a>&#32;
{% endif %}
</div>
{% if !post.files.0.is_empty() %}
<div class="post-files{% if post.files.0.len() > 1 %} float-none-a{% endif %}">
{% for file in post.files.0 %}
<div class="post-file">
<a title="Stáhnout {{ file.original_name }}" download="{{ file.original_name }}" href="{{ file.file_url() }}">
{% if file.spoiler %}
[Spoiler]
{% else %}
{{ file.original_name|truncate(20) }}
{% endif %}
</a>
<br>
({{ file.size|filesizeformat }}, {{ file.width }}x{{ file.height }})
<br>
<a class="expandable" target="_blank" href="{{ file.file_url() }}">
<img class="thumb" src="{{ file.thumb_url() }}">
</a>
</div>
{% endfor %}
</div>
{% endif %}
<div class="post-content">{{ post.content|add_yous(post.board, tcx.yous)|safe }}</div>
<div class="clearfix"></div>
{% if !post.quotes.is_empty() %}
<div class="small">
Odpovědi:&#32;
{% for quote in post.quotes %}
<a class="quote" href="{{ post.thread_url() }}#{{ quote }}">&gt;&gt;{{ quote }}</a>&#32;
{% endfor %}
</div>
{% endif %}
</div>
{% endmacro %}

View File

@@ -0,0 +1,26 @@
{% macro staff_nav() %}
<div class="pagination box inline-block">
[<a href="/staff/account">Účet</a>]&#32;
[<a href="/staff/accounts">Účty</a>]&#32;
{% if tcx.perms.owner() || tcx.perms.board_config() || tcx.perms.banners() %}
[<a href="/staff/boards">Nástěnky</a>]&#32;
{% endif %}
{% if tcx.perms.owner() || tcx.perms.bans() %}
[<a href="/staff/bans">Bany</a>]&#32;
{% endif %}
{% if tcx.perms.owner() || tcx.perms.banners() %}
[<a href="/staff/banners">Bannery</a>]&#32;
{% endif %}
{% if tcx.perms.owner() || tcx.perms.reports() %}
[<a href="/staff/reports">Hlášení</a>]&#32;
{% endif %}
{% if tcx.perms.owner() || tcx.perms.news() %}
[<a href="/staff/news">Novinky</a>]&#32;
{% endif %}
</div>
{% endmacro %}

View File

@@ -0,0 +1,22 @@
{% macro static_pagination(base, current, chain) %}
<div class="pagination box inline-block">
{% if current == 1 %}
[Předchozí]
{% else %}
{% if chain %}
[<a href="{{ base }}&page={{ current - 1 }}">Předchozí</a>]
{% else %}
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
{% endif %}
{% endif %}
&#32;
{% if chain %}
[<b><a href="{{ base }}&page={{ current }}">{{ current }}</a></b>]&#32;
[<a href="{{ base }}&page={{ current + 1 }}">Další</a>]
{% else %}
[<b><a href="{{ base }}?page={{ current }}">{{ current }}</a></b>]&#32;
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
{% endif %}
</div>
{% endmacro %}