aboutsummaryrefslogtreecommitdiffstats
path: root/_includes
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-02-23 14:23:15 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-02-23 14:23:15 +0300
commit97c19c29cd3b9d7d69e103b6b78cd299a6428086 (patch)
treefb05035181fd025be40340ff75afe9798a589312 /_includes
parent25843593a10da466a1e769b8fdf17284e24d37e6 (diff)
downloadaaoth.xyz-97c19c29cd3b9d7d69e103b6b78cd299a6428086.tar.gz
aaoth.xyz-97c19c29cd3b9d7d69e103b6b78cd299a6428086.zip
add categories to art page
whooah! there is some tough liquid-tagging involved.
Diffstat (limited to '_includes')
-rw-r--r--_includes/art-menu.html22
-rw-r--r--_includes/pic-path.html8
2 files changed, 30 insertions, 0 deletions
diff --git a/_includes/art-menu.html b/_includes/art-menu.html
new file mode 100644
index 0000000..08a50d8
--- /dev/null
+++ b/_includes/art-menu.html
@@ -0,0 +1,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>
diff --git a/_includes/pic-path.html b/_includes/pic-path.html
new file mode 100644
index 0000000..fed2367
--- /dev/null
+++ b/_includes/pic-path.html
@@ -0,0 +1,8 @@
+{%- 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 | split: " " %}