{# vars #} {% set image_page = page.permalink|setpath(rootpath)|e('html') %} {% set preview_image_url = assetspath ~ preview_image|trim('.') %} {% set image_ratio = (myimage.height/myimage.width * 100) %} {% set date = myimage.exif["date_taken"] %} {# Image nav #} {% if parent_images|length > 1 %} {% endif %} {# Fotomoto #} {% set fotomoto = '' %} {% set fotomoto_collection = '' %} {% if parent.plugins.fotomoto.enabled and parent.plugins.fotomoto.store_id and parent.plugins.fotomoto.enabled_page %} {% if parent.plugins.fotomoto.buy_button %} {% set fotomoto = ' file-fotomoto file-fotomoto-buybutton' %} {% else %} {% set fotomoto = ' file-fotomoto' %} {% endif %} {% if parent.plugins.fotomoto.collection|trim %} {% set fotomoto_collection = ' data-fotomoto-collection="' ~ parent.plugins.fotomoto.collection|trim ~ '"' %} {% endif %} {% endif %} {# EXIF and GEO #} {% set data_exif = '' %} {% set meta = '' %} {% set data_geo = '' %} {% if myimage.exif %} {# caption and meta EXIF #} {% if parent.popup.caption.exif %} {% set exif_items = parent.popup.caption.exif_items|split(',') %} {% if exif_items|length > 0 %} {#{% for key in exif_items if myimage.exif[key] %} {% set exif = exif ~ key ~ ':' ~ myimage.exif[key] ~ ';' %} {% set meta = meta ~ '
' ~ key|title|replace({'_':' '}) ~ '
' ~ myimage.exif[key] ~ '
' %} {% endfor %} {% if exif %}{% set exif = ' data-exif="' ~ exif ~ '"' %}{% endif %}#} {% set exif_array = [] %} {% for key in exif_items if myimage.exif[key] %} {% set exif_array = exif_array|merge({ (key): myimage.exif[key] }) %} {% set meta = meta ~ '
' ~ key|title|replace({'_':' '}) ~ '
' ~ myimage.exif[key] ~ '
' %} {% endfor %} {% if exif_array|length %}{% set data_exif = ' data-exif="' ~ exif_array|json_encode()|e('html_attr') ~ '"' %}{% endif %} {% endif %} {% endif %} {# caption map button #} {% if myimage.exif.latitude and myimage.exif.longitude %} {% set geo = myimage.exif.latitude ~ ',' ~ myimage.exif.longitude %} {% set map_embed_src = 'https://www.google.com/maps/embed/v1/place?q=' ~ geo ~ '&key=AIzaSyDRp6xla9SxUmTBu6l_kprhjjI9e5-EVZk' %} {% set map_link_src = 'https://www.google.com/maps/search/?api=1&query=' ~ geo %} {#{% set map_embed_button_item = '' %}#} {% set map_embed_button_item = '' %} {% set map_button_popup = '' %} {% set map_link_popup = '' %} {% set map_button = '' %} {% set map_link = '' %} {% if parent.popup.caption.map %}{% set data_geo = ' data-geo="' ~ geo ~ '"' %}{% endif %} {% endif %} {% endif %} {# replace geo links in title and description #} {% if geo %} {% set page_title = page_title|replace({'{latitude}': image.exif.latitude, '{longitude}': image.exif.longitude, '{map_embed_src}': map_embed_src, '{map_link_src}': map_link_src, '{map_button_popup}': map_button_popup, '{map_link_popup}': map_link_popup, '{map_button}': map_button, '{map_link}': map_link}) %} {% if image_description is not empty %} {% set image_description = image_description|replace({'{latitude}': image.exif.latitude, '{longitude}': image.exif.longitude, '{map_embed_src}': map_embed_src, '{map_link_src}': map_link_src, '{map_button_popup}': map_button_popup, '{map_link_popup}': map_link_popup, '{map_button}': map_button, '{map_link}': map_link}) %} {% endif %} {% endif %} {# File template #}
{# Comments icon with comments count #}

{{ page_title }}

{% if image_description is not empty %}

{{ image_description }}

{% endif %} {% if date is not empty %}
{% endif %} {# close (back) button #} {# Image element #} {# EXIF #} {% if meta %}
{{ meta }}
{% endif %} {# Disqus comments? #} {% if page.accounts.disqus_shortname and page.plugins.disqus.image %}
{% include 'partials/module.disqus.html' %} {% endif %}