{% extends 'layout.html.twig' %}
{% block body %}
{% if author.image is defined %}
{% endif %}
{% if author.nip05 is defined %}
{% if author.nip05 is iterable %}
{% for nip05Value in author.nip05 %}
{% endfor %}
{% else %}
{% endif %}
{% endif %}
{% if author.about is defined %}
{{ author.about|markdown_to_html|mentionify|linkify }}
{% endif %}
{# Extract title #}
{% set title = null %}
{% for tag in event.tags %}
{% if tag[0] == 'title' %}
{% set title = tag[1] %}
{% endif %}
{% endfor %}
{# Extract first image from imeta tags #}
{% set firstImageUrl = null %}
{% set imageAlt = null %}
{% for tag in event.tags %}
{% if tag[0] == 'imeta' and firstImageUrl is null %}
{% for i in 1..(tag|length - 1) %}
{% set param = tag[i] %}
{% if param starts with 'url ' and firstImageUrl is null %}
{% set firstImageUrl = param[4:] %}
{% elseif param starts with 'alt ' %}
{% set imageAlt = param[4:] %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{# Generate nevent for linking #}
{% set eventId = event.id %}
{% set noteId = event.noteId %}
{% if firstImageUrl %}