aboutsummaryrefslogtreecommitdiffstats
path: root/_includes/art-menu.html
blob: 08a50d8c66eba49fa31260023f0053a915fe62ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="art-menu">
{%- for page in site.pages -%}
    {%- assign pagedir = page.dir | remove_first: "/" | split: "/" -%}
    {%- capture arts -%}
    {%- for file in site.static_files -%}
        {%- if file.art and file.path contains page.title -%}
            {{ file.path }}
        {%- endif -%}
    {%- endfor -%}
    {%- endcapture -%}
    {% assign artpics = arts | strip_newlines | split: " " %}
    {%- if pagedir.first == "art" and pagedir.size > 1 -%}
    <div class="art-category">
        <a href="{{ page.url }}">
            {{ page.title }}
            <br>
            <img src="{{ artpics.first }}">
        </a> 
    </div>
    {% endif %}
{%- endfor -%}
</div>