A message base is a thing people answer, and until now this one could only be read. The site already calls its articles messages in areas, so replies are the feature the metaphor was asking for rather than a comment box bolted onto it. Talks to the comment server's API directly instead of loading its widget. The widget is a React app in an iframe and would arrive with its own fonts, spacing and avatars; an iframe cannot inherit the page's font in any case. Rules are drawn the way the guestbook draws them, padded to exactly 80 cells, so a reply is indistinguishable from any other row on the board. All five pre elements in the section measure 80 in a real browser. Two things this surfaced, both verified by driving a browser rather than curl: The command handler took every letter key as a command, which was harmless when there was nothing on the board to type into. With a message box, typing `i` navigated to the index mid-sentence. It now ignores keys aimed at an input or textarea. bbs.js already says the bracket chrome is a promise rather than decoration, and [P]ost was drawn without wiring P to anything. P now focuses the message box. Handles are checked here as well as at the server, since remark42 wants three or more characters and only letters, numbers, underscores and spaces; failing in the page is better than a refusal with no explanation. Without JS the section is simply absent, which is honest, and the capsule never sees it since Gemini has no way to render it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 lines
2.4 KiB
HTML
32 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ article.title|striptags }} · {{ SITENAME }}{% endblock %}
|
|
{% block content %}
|
|
<pre class="rule">════════════════════════════════════════════════════════════════════════════════</pre>
|
|
<pre class="msghdr desktop-only"> Msg : <b>{{ "%-44s"|format(article.slug) }}</b> Area : <b>{{ article.category }}</b>
|
|
From : <b>{{ "%-44s"|format(article.author|default(AUTHOR, true)|string) }}</b> Date : <b>{{ article.date.strftime('%d %b %Y') }}</b>
|
|
Subj : <span class="subj">{{ article.title|striptags }}</span>{% if article.tags %}
|
|
Keys : {% for t in article.tags %}<a href="{{ SITEURL }}/{{ t.url }}">{{ t }}</a>{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}</pre>
|
|
<pre class="msghdr mobile-only"> Msg : <b>{{ article.slug }}</b></pre>
|
|
<pre class="msghdr mobile-only"> Area : <b>{{ article.category }}</b></pre>
|
|
<pre class="msghdr mobile-only"> From : <b>{{ article.author|default(AUTHOR, true)|string }}</b></pre>
|
|
<pre class="msghdr mobile-only"> Date : <b>{{ article.date.strftime('%d %b %Y') }}</b></pre>
|
|
<pre class="msghdr mobile-only"> Subj : <span class="subj">{{ article.title|striptags }}</span></pre>
|
|
{%- if article.tags %}
|
|
<pre class="msghdr mobile-only"> Keys : {% for t in article.tags %}<a href="{{ SITEURL }}/{{ t.url }}">{{ t }}</a>{% if not loop.last %}, {% endif %}{% endfor %}</pre>
|
|
{%- endif %}
|
|
<pre class="rule">════════════════════════════════════════════════════════════════════════════════</pre>
|
|
|
|
<div class="msgbody">{{ article.content }}</div>
|
|
|
|
<pre class="tagline">--- {{ SITENAME }} BBS
|
|
<span class="origin">* Origin:</span> randogoth.com <span class="origin">(1:1/1)</span></pre>
|
|
|
|
{#- Replies. A message base is a thing people answer, which is the one feature
|
|
the metaphor was missing. Filled by bbs.js from the comment server; without
|
|
JS the section simply is not there, which is honest, and the capsule never
|
|
sees it at all since Gemini has no way to render it. -#}
|
|
{%- if COMMENTS_HOST %}
|
|
<div id="replies" data-host="{{ COMMENTS_HOST }}" data-site="{{ COMMENTS_SITE }}"
|
|
data-url="{{ SITEURL }}/{{ article.url }}"></div>
|
|
{%- endif %}
|
|
{% endblock %}
|