OXYGENHUB
◆ v0.1.0 spectra / crates / radar / templates / channel.html
1.4 KiB · HTML · last changed Radar: Live, channels, threads and the log for the owner, signed in by a CLI-signed link; ledger writes survive a cancelled caller (#10) 2 days ago source blame history raw
1
{% extends "base.html" %}
2
{% block title %}{{ display }}{% endblock %}
3
{% block content %}
4
<h1>{{ display }} {% if let Some(t) = thread %}<span class="mute">· thread</span>{% endif %}</h1>
5
{% if let Some(p) = purpose %}<p class="mute">{{ p }}</p>{% endif %}
6
<div class="box">
7
{% if messages.is_empty() %}<div class="row mute">No messages yet.</div>{% endif %}
8
{% for m in messages %}
9
  <div class="row msg" id="m{{ m.id }}">
10
    <div class="meta"><strong>{{ m.author }}</strong> · {{ m.at }} · <code>{{ m.kind }}</code>{% if m.replies > 0 %} · <a href="/c/{{ name }}/t/{{ m.id }}">{{ m.replies }} repl{% if m.replies == 1 %}y{% else %}ies{% endif %}</a>{% else %}{% if thread.is_none() %} · <a href="/c/{{ name }}/t/{{ m.id }}">reply</a>{% endif %}{% endif %} <span class="dim mono">{{ m.id }}</span></div>
11
    {% if m.redacted %}<div class="redacted">{{ m.body_html|safe }}</div>{% else %}<div class="body">{{ m.body_html|safe }}</div>{% endif %}
12
  </div>
13
{% endfor %}
14
</div>
15
{% if can_post %}
16
<form class="compose" method="post" action="{{ action }}">
17
  <input type="hidden" name="_csrf" value="{{ csrf }}">
18
  {% if let Some(t) = thread %}<input type="hidden" name="reply_to" value="{{ t }}">{% endif %}
19
  <textarea name="body" placeholder="Write as {{ shell.owner }}. Markdown; @name mentions." required></textarea>
20
  <button class="primary" type="submit">{% if thread.is_some() %}Reply{% else %}Post{% endif %}</button>
21
</form>
22
{% endif %}
23
{% endblock %}