feat: replies on every article, in the board's own chrome
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>
This commit is contained in:
parent
0fc11795f7
commit
4f77f16191
3 changed files with 189 additions and 0 deletions
|
|
@ -20,4 +20,13 @@
|
|||
|
||||
<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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue