2016-10-30 01:02:14 +02:00
|
|
|
{% if include.id %}
|
2017-09-28 23:42:38 +02:00
|
|
|
{% assign gallery = page[include.id] %}
|
2016-10-30 01:02:14 +02:00
|
|
|
{% else %}
|
|
|
|
{% assign gallery = page.gallery %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if gallery.size == 2 %}
|
|
|
|
{% assign gallery_layout = 'half' %}
|
|
|
|
{% elsif gallery.size >= 3 %}
|
|
|
|
{% assign gallery_layout = 'third' %}
|
|
|
|
{% else %}
|
|
|
|
{% assign gallery_layout = '' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<figure class="{{ gallery_layout }} {{ include.class }}">
|
|
|
|
{% for img in gallery %}
|
|
|
|
{% if img.url %}
|
|
|
|
<a href=
|
|
|
|
{% if img.url contains "://" %}
|
|
|
|
"{{ img.url }}"
|
|
|
|
{% else %}
|
2016-11-23 02:29:35 +01:00
|
|
|
"{{ img.url | absolute_url }}"
|
2016-10-30 01:02:14 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if img.title %}title="{{ img.title }}"{% endif %}
|
|
|
|
>
|
|
|
|
<img src=
|
|
|
|
{% if img.image_path contains "://" %}
|
|
|
|
"{{ img.image_path }}"
|
|
|
|
{% else %}
|
2016-11-23 02:29:35 +01:00
|
|
|
"{{ img.image_path | absolute_url }}"
|
2016-10-30 01:02:14 +02:00
|
|
|
{% endif %}
|
|
|
|
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<img src=
|
|
|
|
{% if img.image_path contains "://" %}
|
|
|
|
"{{ img.image_path }}"
|
|
|
|
{% else %}
|
2016-11-23 02:29:35 +01:00
|
|
|
"{{ img.image_path | absolute_url }}"
|
2016-10-30 01:02:14 +02:00
|
|
|
{% endif %}
|
|
|
|
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% if include.caption %}
|
|
|
|
<figcaption>{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}</figcaption>
|
|
|
|
{% endif %}
|
2016-11-23 02:29:35 +01:00
|
|
|
</figure>
|