-
Notifications
You must be signed in to change notification settings - Fork 0
/
illustration.html
54 lines (49 loc) · 2.05 KB
/
illustration.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
layout: wide-page
title: illustration
---
{% assign images = "" %}
{% for image in site.static_files %}
{% if image.path contains 'illustration/' %}
<!-- don't display serial images on art/design page (_1, _2, etc.),
don't display full images (_full) -->
{% if image.path contains '_' %}
{% assign do_not_include = true %}
{% endif %}
<!-- except, actually display thumbnails (_thumb) -->
{% if image.path contains '_thumb' %}
{% assign do_not_include = false %}
{% endif %}
{% unless do_not_include == true %}
<!-- get image path -->
{% assign imagepath = image.path | split: "/" %}
<!-- get image name from image path -->
{% for subpath in imagepath %}
{% if forloop.index0 == 3 %}
{% assign imagename = subpath | replace: "-", " " | replace: ".png", "" | replace: ".jpg", "" %}
{% capture url %}img={{ subpath | uri_escape }}{% endcapture %}
{% endif %}
{% endfor %}
{% capture img_display %}
<!-- slightly modify file names for display in case of different thumb / full images -->
{% if imagename contains '_thumb' %}
{% assign url = url | replace: "thumb", "full" %}
{% assign imagename = imagename | replace: "_thumb", "" %}
{% endif %}
<div class="flex-item">
<a class="art-image" href="image?{{ url }}">
<div class="img-wrapper" title="{{ imagename }}">
<img src="{{ image.path }}" alt="{{ imagename }}">
</div>
</a>
</div>
{% endcapture %}
{% assign images = images | append: img_display %}
{% endunless %}
<!-- reset do not include flag -->
{% assign do_not_include = false %}
{% endif %}
{% endfor %}
<div class="flex-container">
{{ images }}
</div>