{# Shared author "header" + about (no article list). Expects: author, npub, profile_*; show_nip05: true on full /p/ profile only #} {% set author_pic = null %} {% if author.picture is defined and author.picture %} {% set author_pic = author.picture %} {% elseif author.image is defined and author.image %} {% set author_pic = author.image %} {% endif %} {% set author_label = author.display_name|default(author.name|default(npub|shortenNpub)) %} {% if author_pic %}
{{ author_label }}
{% endif %} {% set header_tag = header_tag|default('h1') %} <{{ header_tag }} class="author-profile__title">
{% if profile_websites is not empty %}
Website
{% endif %} {% if show_nip05|default(false) and profile_nip05 is not empty %}
NIP-05
{% endif %} {% if profile_payment_links is not empty %} {# Group payment rows by display_type_label so each type (Lightning, Monero, …) appears once. #} {% set payment_groups = {} %} {% for row in profile_payment_links %} {% set k = row.display_type_label|default('')|trim %} {% set payment_groups = payment_groups|merge({(k): (payment_groups[k] is defined ? payment_groups[k] : [])|merge([row])}) %} {% endfor %}
Payment
{% endif %}
{% if author.about is defined %} {{ author.about|markdown_to_html|mentionify|linkify }} {% endif %}