Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gallery « _includes - github.com/dldx/hpstr-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4091c84db5449029384a066884afd4aa11bfa8e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{% 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>