aboutsummaryrefslogtreecommitdiffstats
path: root/_includes/pic-path.liquid
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-09-19 18:24:05 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-09-19 18:24:05 +0300
commit8d69c4656ada9b63390e218951de641d58062d15 (patch)
tree0269c6ba49f53b86de28ae59fcb7afc7aed6d4b9 /_includes/pic-path.liquid
parent102e9dac35c5390fa34b5eb5ec7a0a410d385d20 (diff)
downloadaaoth.xyz-8d69c4656ada9b63390e218951de641d58062d15.tar.gz
aaoth.xyz-8d69c4656ada9b63390e218951de641d58062d15.zip
rename pic-path.html to pic-path.liquid
'cause it contains only liquid script and not a single line of html.
Diffstat (limited to '_includes/pic-path.liquid')
-rw-r--r--_includes/pic-path.liquid26
1 files changed, 26 insertions, 0 deletions
diff --git a/_includes/pic-path.liquid b/_includes/pic-path.liquid
new file mode 100644
index 0000000..810f227
--- /dev/null
+++ b/_includes/pic-path.liquid
@@ -0,0 +1,26 @@
+{% comment %}
+ the purpose of this file is to provide arrays to use for art browsing
+{% endcomment %}
+
+{%- capture arts -%}
+{%- for file in site.static_files -%}
+ {%- if file.art and file.path contains page.title and file.thumbnail != true -%}
+ {{ file.path }}
+ {% endif %}
+{%- endfor -%}
+{%- endcapture -%}
+{% assign artpics = arts | split: " " %}
+
+{%- capture arts_thumbs -%}
+{%- for art in artpics -%}
+ {%- assign art_ext = art | split: "." | last -%}
+ {%- assign art_basepath = art | split: "." | first -%}
+ {%- assign art_name = art_basepath | split: "/" | last -%}
+ {%- assign art_thumbpath = art_basepath \
+ | remove: art_name | append: "thumbs/" \
+ | append: art_name | append: "_thumb." | append: art_ext \
+ | append: " " -%}
+ {{ art_thumbpath }}
+{%- endfor -%}
+{%- endcapture -%}
+{% assign artthumbs = arts_thumbs | split: " " %}