{% extends "base.html" %} {% import "_island.html" as island %} {% block title %}Chat — {{ community_name }} — Multithreaded{% endblock %} {# Chat is ephemeral by design, so there is nothing here worth indexing and a crawler holding an SSE connection open is a connection slot spent on nobody. #} {% block head %}{% endblock %} {% block header %}{% include "partials/site_header.html" %}{% endblock %} {% block content %}
{# The island reads its configuration from data attributes rather than an inline script, so the page needs no script-src exception. Everything inside is server-rendered and stays rendered: the element adds arriving messages and sends without a page load, and adds nothing else. #}
    {% for message in messages %}
  1. {% if let Some(avatar) = message.avatar_url %} {% endif %} {{ message.author_name }} {{ message.body_html|safe }}
  2. {% endfor %}
{% if messages.is_empty() %}
Nothing said yet.
{% endif %} {% if read_only %}
This community is read-only, so chat is too.
{% elif can_send %}
{% if let Some(token) = csrf_token %} {% endif %}
{% elif session_user.is_some() %}
You cannot send messages in this room.
{% else %}
Sign in to join the conversation.
{% endif %}
{% endblock %} {% block scripts %}{% call island::island("chat") %}{% endcall %}{% endblock %}