forked from kittv/web
1
0
Fork 0

Možnost nastavení náhledu pro galerii

Closes: #25
content
Emil Miler 4 years ago
parent ec4fe7c173
commit 15a6b6221d

@ -218,13 +218,17 @@
<div class="gallery index"> <div class="gallery index">
{% for gallery in section.pages %} {% for gallery in section.pages %}
<a href="{{ gallery.permalink }}"> <a href="{{ gallery.permalink }}">
{% set_global img = "../static/placeholder-avatar.jpg" %} {% if gallery.extra.thumbnail %}
{% for asset in gallery.assets %} {% set_global img = "." ~ gallery.path ~ gallery.extra.thumbnail %}
{% if asset is matching("[.](jpg|png)$") %} {% else %}
{% set_global img = asset %} {% set_global img = "../static/placeholder-avatar.jpg" %}
{% break %} {% for asset in gallery.assets %}
{% endif %} {% if asset is matching("[.](jpg|png)$") %}
{% endfor %} {% set_global img = asset %}
{% break %}
{% endif %}
{% endfor %}
{% endif %}
<img src="{{ resize_image(path=img, width=300, height=200, op="fill") }}" alt="{{ gallery.title }}"> <img src="{{ resize_image(path=img, width=300, height=200, op="fill") }}" alt="{{ gallery.title }}">
<div class="info"> <div class="info">

Loading…
Cancel
Save