Separate items with/without video

This commit is contained in:
Donghao Ren 2018-10-05 19:50:52 -07:00
Родитель 66f483a0d5
Коммит 7882a2f3fd
1 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -4,12 +4,31 @@ title: Gallery
permlink: gallery/index.html
---
## Chart & Video
<div class="gallery">
{% assign gallery_ordered = site.gallery | stable_sort: "order" %}
{% for item in gallery_ordered %}
{% if item.video %}
<a class="gallery-item" href="{{ item.url | relativize_url }}">
<div class="el-image" style="background-image: url({{ item.image | thumbnail_image: '540x360^' | relativize_url }})"></div>
<span class="el-description">{{ item.description | markdownify }}</span>
</a>
{% endif %}
{% endfor %}
</div>
## Chart Only
<div class="gallery">
{% assign gallery_ordered = site.gallery | stable_sort: "order" %}
{% for item in gallery_ordered %}
{% if item.video %}
{% else %}
<a class="gallery-item" href="{{ item.url | relativize_url }}">
<div class="el-image" style="background-image: url({{ item.image | thumbnail_image: '540x360^' | relativize_url }})"></div>
<span class="el-description">{{ item.description | markdownify }}</span>
</a>
{% endif %}
{% endfor %}
</div>