1
0
Fork 0
This repository has been archived on 2021-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
dennogumi.org-archive/_includes/gallery

21 lines
577 B
Text

{% assign images = include.images | split:" " %}
{% assign caption = include.caption %}
{% assign cols = include.cols %}
{% case cols %}
{% when 1 %}
{% assign class = "" %}
{% when 2 %}
{% assign class = "half" %}
{% when 3 %}
{% assign class = "third" %}
{% else %}
{% assign class = "" %}
{% endcase %}
<figure {% if class != "" %}class="{{ class }}"{% endif %}>
{% for image in images %}
<a href="{{ image }}"><img src="{{ image }}" alt=""></a>
{% endfor %}
<figcaption>{{ caption }}</figcaption>
</figure>