{% extends "layouts/ap-reader.njk" %} {% from "heading/macro.njk" import heading with context %} {% from "textarea/macro.njk" import textarea with context %} {% from "file-input/macro.njk" import fileInput with context %} {% from "tag-input/macro.njk" import tagInput with context %} {% block readercontent %} {# Reply context — show the post being replied to #} {% if replyContext %}
{{ __("activitypub.reader.replyingTo") }}
{% if replyContext.author %}
{{ replyContext.author.name }}
{% endif %} {% if replyContext.content and (replyContext.content.html or replyContext.content.text) %}
{{ replyContext.content.html | safe if replyContext.content.html else replyContext.content.text | truncate(300) }}
{% endif %} {{ replyTo }}
{% endif %} {% if isDirect %}
🔒 {{ __("activitypub.compose.directNotice") if __("activitypub.compose.directNotice") != "activitypub.compose.directNotice" else "Direct message — reply stays private" }}
{% endif %}
{% if replyTo %} {% endif %} {% if isDirect %} {% endif %} {# Content warning toggle + summary #}
{# Rich content editor (EasyMDE with media browser) #}
{{ textarea({ name: "content", label: "Content", rows: 8, field: { attributes: { editor: true, "editor-endpoint": mediaEndpoint, "editor-id": "ap-compose-content", "editor-locale": application.locale if application else "en", "editor-image-upload": true } } }) }}
{# Featured image #}
{{ fileInput({ name: "photo", label: "Photo", field: { attributes: { endpoint: mediaEndpoint } }, accept: "image/*", attributes: { placeholder: "https://" } }) }}
{# Tags / categories #}
{{ tagInput({ name: "category", label: "Tags", optional: true, hint: "Separate with commas" }) }}
{# Visibility — hidden for direct messages #} {% if not isDirect %}
{{ __("activitypub.compose.visibilityLabel") }}
{% endif %} {# Syndication targets — hidden for direct messages #} {% if syndicationTargets.length > 0 and not isDirect %}
{{ __("activitypub.compose.syndicateLabel") }} {% for target in syndicationTargets %} {% endfor %}
{% endif %}
{{ __("activitypub.compose.cancel") }}
{% endblock %}