{% extends "base.html" %} {% block title %}{{ capsule.title or user.username + "'s capsule" }}{% endblock %} {% block content %}

{{ capsule.title or user.username + "'s capsule" }}

by {{ user.username }} — last updated {{ capsule.updated_at.strftime('%Y-%m-%d') }} — raw .gmi

{# Render gemtext as HTML — minimal: links, headings, lists, quotes, pre #} {% set in_pre = namespace(open=False) %} {% for line in (capsule.content or '').splitlines() %} {% if line.startswith('```') %} {% if in_pre.open %}{% set in_pre.open = False %} {% else %}
{% set in_pre.open = True %}{% endif %}
    {% elif in_pre.open %}{{ line }}
    {% elif line.startswith('=> ') %}
        {% set parts = line[3:].split(None, 1) %}
        
{{ parts[1] if parts|length > 1 else parts[0] }}
{% elif line.startswith('### ') %}

{{ line[4:] }}

{% elif line.startswith('## ') %}

{{ line[3:] }}

{% elif line.startswith('# ') %}

{{ line[2:] }}

{% elif line.startswith('* ') %}
• {{ line[2:] }}
{% elif line.startswith('> ') %}
{{ line[2:] }}
{% elif line.strip() == '' %}
{% else %}
{{ line }}
{% endif %} {% endfor %} {% if in_pre.open %}
{% endif %}
← All capsules
{% endblock %}