{% extends "base.html" %} {% block title %}Admin · News — {{ instance_name or "AI Data Analyst" }}{% endblock %} {% block head_extra %}
{% endblock %} {% block content %}

# News editor

## Currently published

{% if news_current %}
Version {{ news_current.version }} · published {{ news_current.published_at.strftime('%Y-%m-%d %H:%M UTC') if news_current.published_at else '' }} {% if news_current.published_by %} by {{ news_current.published_by }}{% endif %}

View live at /news.

{% else %}

No version published yet — write a draft below and click Publish.

{% endif %}

## {% if news_draft %}Draft (v{{ news_draft.version }}){% else %}New draft{% endif %}

Intro / perex (shown on /home) {{ news_draft.intro if news_draft else '' }} Full content (shown on /news) {{ news_draft.content if news_draft else '' }}
Format help — what HTML and classes are allowed

Tags allowed: `p, h1–h6, ul, ol, li, strong, em, code, pre, blockquote, a, img, span, div, section, table, thead, tbody, tr, th, td, details, summary, figure, figcaption, iframe`. Anything else is stripped.

Use these documented classes for consistent styling:

    <div class="callout callout-warn"><strong>Heads up:</strong> rolling restart 14:00 UTC.</div>

    <div class="video-embed">
      <iframe src="https://www.youtube.com/embed/abc123"></iframe>
    </div>

    <section class="news-section">
      <h2>Big news</h2>
      <div class="news-grid-2">
        <div>Column 1</div>
        <div>Column 2</div>
      </div>
    </section>

    <a class="news-cta" href="/setup-advanced">Open advanced setup</a>

Iframe `src` must be on YouTube, Vimeo, or Loom — anything else has the iframe stripped on save.

Preview (sanitized)

## Versions

{% if news_versions %}

v | Status | Created | By | Published | Intro preview |
--- | --- | --- | --- | --- | --- | ---
{% for v in news_versions %}
{{ v.version }} | {{ v.status }} | {{ v.created_at.strftime('%Y-%m-%d %H:%M') if v.created_at else '' }} | {{ v.created_by or '' }} | {{ v.published_at.strftime('%Y-%m-%d %H:%M') if v.published_at else '' }} | {{ v.intro_preview }} | {% if v.published %} {% endif %}
{% endfor %}

{% else %}

No versions yet.

{% endif %}
{% endblock %}