Fix gallery size bug
- Improperly evaluated size of gallery arrays as strings and not integers - Close #402
This commit is contained in:
parent
9a9cbc01e3
commit
2d818cc8d1
1 changed files with 2 additions and 4 deletions
|
@ -6,11 +6,9 @@
|
||||||
{% assign gallery = page.gallery %}
|
{% assign gallery = page.gallery %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% capture gallery_size %}{{ gallery | size }}{% endcapture %}
|
{% if gallery.size == 2 %}
|
||||||
|
|
||||||
{% if gallery_size == '2' %}
|
|
||||||
{% assign gallery_layout = 'half' %}
|
{% assign gallery_layout = 'half' %}
|
||||||
{% elsif gallery_size >= '3' %}
|
{% elsif gallery.size >= 3 %}
|
||||||
{% assign gallery_layout = 'third' %}
|
{% assign gallery_layout = 'third' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign gallery_layout = '' %}
|
{% assign gallery_layout = '' %}
|
||||||
|
|
Loading…
Reference in a new issue