{% extends "base.html" %} {% from "partials/media.html" import display_media %} {% from "partials/reaction.html" import reaction %} {% block title %}{% if note.content.strip().startswith('#') %}{{ note.title }}{% elif note.excerpt.strip() %}{{ note.excerpt|truncate(60) }}{% elif note.repost_of %}Repost{% elif note.like_of %}Like{% elif note.in_reply_to %}Reply{% else %}Photo{% endif %} · {{ config.SITE_NAME }}{% 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 %} {# Reply context (v1.6.0 Phase 4) - displayed if this is a reply post #} {% if note.in_reply_to %}
In reply to: {# u-in-reply-to on the h-cite itself makes it the entry's property (Post Type Discovery) #}
{% if reply_context and reply_context.fetch_status == 'fetched' %} {% if reply_context.content_snippet %}

{{ reply_context.content_snippet }}

{% endif %} {% if reply_context.author_name %}{{ reply_context.author_name }}{% endif %} {% if reply_context.site_name %} on {{ reply_context.site_name }}{% endif %} {% if not reply_context.author_name and not reply_context.site_name %}{{ note.in_reply_to }}{% endif %} {% else %} {{ note.in_reply_to }} {% endif %}
{% endif %} {{ reaction(note) }} {# u-photo placement: Per draft spec, u-photo must be direct child of h-entry, #} {# NOT inside e-content. Media is rendered ABOVE e-content to meet this requirement. #} {{ display_media(note.media, note.excerpt|truncate(150)) }} {# e-content: note content BELOW media (per ADR-057) #}
{{ note.body_html|safe }}
{# Webmentions section (v1.6.0 Phase 5) - only shown if approved webmentions exist #} {% if webmentions %}

Responses

{% if replies %}

{{ replies|length }} {{ 'Reply' if replies|length == 1 else 'Replies' }}

{% for reply in replies %} {% endfor %}
{% endif %} {% if likes %}

{{ likes|length }} {{ 'Like' if likes|length == 1 else 'Likes' }}

{% for wm in likes[:8] %} {% if wm.author_photo %} {{ wm.author_name or '' }} {% else %} {{ (wm.author_name or '?')[0]|upper }} {% endif %} {% endfor %} {% if likes|length > 8 %} +{{ likes|length - 8 }} others {% endif %}
{% endif %} {% if reposts %}

{{ reposts|length }} {{ 'Repost' if reposts|length == 1 else 'Reposts' }}

{% for wm in reposts[:8] %} {% if wm.author_photo %} {{ wm.author_name or '' }} {% else %} {{ (wm.author_name or '?')[0]|upper }} {% endif %} {% endfor %} {% if reposts|length > 8 %} +{{ reposts|length - 8 }} others {% endif %}
{% endif %} {% if bookmarks %}

{{ bookmarks|length }} {{ 'Bookmark' if bookmarks|length == 1 else 'Bookmarks' }}

{% for wm in bookmarks[:8] %} {% if wm.author_photo %} {{ wm.author_name or '' }} {% else %} {{ (wm.author_name or '?')[0]|upper }} {% endif %} {% endfor %} {% if bookmarks|length > 8 %} +{{ bookmarks|length - 8 }} others {% endif %}
{% endif %} {% if mentions %}

{{ mentions|length }} {{ 'Mention' if mentions|length == 1 else 'Mentions' }}

{% for mention in mentions %}
{{ mention.author_name or mention.source_url }} {% if mention.content_snippet %}

{{ mention.content_snippet|striptags|truncate(200) }}

{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endblock %}