You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.5 KiB
55 lines
1.5 KiB
{# NIP-68 Picture Event (kind 20) #} |
|
<div class="picture-event"> |
|
{# Title tag #} |
|
{% set title = null %} |
|
{% for tag in event.tags %} |
|
{% if tag[0] == 'title' %} |
|
{% set title = tag[1] %} |
|
{% endif %} |
|
{% endfor %} |
|
|
|
{% set isEmbed = false %} |
|
{% if embed is defined and embed %} |
|
{% set isEmbed = true %} |
|
{% endif %} |
|
|
|
|
|
{% include 'partial/_gallery.html.twig' with {event: event, isEmbed: isEmbed} %} |
|
|
|
{# Location data #} |
|
{% set location = null %} |
|
{% set geohash = null %} |
|
{% for tag in event.tags %} |
|
{% if tag[0] == 'location' %} |
|
{% set location = tag[1] %} |
|
{% elseif tag[0] == 'g' %} |
|
{% set geohash = tag[1] %} |
|
{% endif %} |
|
{% endfor %} |
|
|
|
{% if location or geohash %} |
|
<div class="picture-location"> |
|
<span class="location-icon">📍</span> |
|
{% if location %}{{ location }}{% endif %} |
|
{% if geohash %}<span class="geohash" title="{{ geohash }}">{{ geohash[:6] }}...</span>{% endif %} |
|
</div> |
|
{% endif %} |
|
|
|
{# Hashtags #} |
|
{% if not isEmbed %} |
|
{% set hashtags = [] %} |
|
{% for tag in event.tags %} |
|
{% if tag[0] == 't' %} |
|
{% set hashtags = hashtags|merge([tag[1]]) %} |
|
{% endif %} |
|
{% endfor %} |
|
|
|
{% if hashtags|length > 0 %} |
|
<div class="tags"> |
|
{% for hashtag in hashtags %} |
|
<span class="tag">#{{ hashtag }}</span> |
|
{% endfor %} |
|
</div> |
|
{% endif %} |
|
{% endif %} |
|
</div>
|
|
|