{% extends "base.html" %}
{% block title %}{{ note.slug }} - StarPunk{% endblock %}
{% block content %}
{# Detect if note has explicit title (starts with # heading) - per Q22 #}
{% set has_explicit_title = note.content.strip().startswith('#') %}
{# p-name only if note has explicit title (per Q22) #}
{% if has_explicit_title %}
{{ note.title }}
{% endif %}
{# Media display at TOP (v1.2.0 Phase 3, per ADR-057) #}
{% if note.media %}
{% for item in note.media %}
{% if item.caption %}
{{ item.caption }}
{% endif %}
{% endfor %}