sarmentine/templates/threads/view.html
Butter dc7eb57640
Some checks failed
CI / Check (push) Failing after 20s
CI / Build & Push Docker Image (push) Has been skipped
CI / Deploy to Rocky (push) Has been skipped
added basic admin tools
i can ban users now!
2026-05-04 18:40:01 -04:00

56 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div style="font-family:'Silkscreen',monospace; font-size:14px; color:#d4879c; margin-bottom:12px;">
<a href="/threads" style="color:#888;">threads</a> :: {{ thread.thread.title }}
</div>
<div class="post">
<div class="post-title">{{ thread.thread.title }}</div>
<div class="post-body" style="color:#888; font-size:11px; margin-bottom:8px;">by <a href="/profile/{{ thread.author.username }}">{{ thread.author.username }}</a> &middot; {{ thread.thread.created_at }}</div>
<div class="post-body markdown-content">{{ thread.thread.body|render_markdown|safe }}</div>
</div>
{% if let Some(error) = error %}
<div class="post" style="border-color:#ff6b6b;">
<div class="post-body" style="color:#ff6b6b;">{{ error }}</div>
</div>
{% endif %}
{% if !posts.is_empty() %}
<div style="font-family:'Silkscreen',monospace; font-size:11px; color:#888; margin:16px 0 8px; text-transform:uppercase;">replies</div>
{% for pwa in posts %}
<div class="post">
{% if pwa.post.hidden %}
<div style="color:#ff6b6b; font-size:12px;">[hidden]</div>
{% if let Some(msg) = pwa.post.ban_message %}
<div style="color:#ff6b6b; font-size:10px;">REASON: {{ msg }}</div>
{% else %}
<div style="color:#ff6b6b; font-size:10px;">REASON: admin didn't care enough to give a reason</div>
{% endif %}
{% else %}
<div class="post-body" style="color:#888; font-size:11px; margin-bottom:8px;">by <a href="/profile/{{ pwa.author.username }}">{{ pwa.author.username }}</a> &middot; {{ pwa.post.created_at }}</div>
<div class="post-body markdown-content">{{ pwa.post.body|render_markdown|safe }}</div>
{% endif %}
</div>
{% endfor %}
{% endif %}
{% if let Some(user) = current_user %}
<div style="margin-top:16px;">
<form method="post" action="/threads/{{ thread.thread.id }}/posts">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<div style="margin-bottom:8px;">
<textarea name="body" required rows="4" style="width:100%; padding:6px; background:#1a1a2e; border:1px solid #333; color:#e0e0e0; font-family:'VT323',monospace; font-size:14px; resize:vertical;"></textarea>
<div style="color:#666; font-size:10px; margin-top:4px;">markdown is supported</div>
</div>
<button type="submit" class="btn">reply</button>
</form>
</div>
{% else %}
<div style="margin-top:16px; color:#888; font-size:11px;">
<a href="/auth/login">login</a> to reply
</div>
{% endif %}
{% endblock %}