aboutsummaryrefslogtreecommitdiff
path: root/_includes/category-list.html
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@gmail.com>2019-10-27 09:57:37 -0400
committerAndrew Lee <alee14498@gmail.com>2019-10-27 09:57:37 -0400
commite62e7bb6b14555c9bbe5d40d217103984f4f80e6 (patch)
tree21887d847dccacb47644eb6f74ce31326172303c /_includes/category-list.html
parent716ea6ed2b64c921a799d872a07bfbd53b2a3e58 (diff)
downloadpokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.gz
pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.tar.bz2
pokeworld-website-e62e7bb6b14555c9bbe5d40d217103984f4f80e6.zip
Rewrite progress
Diffstat (limited to '_includes/category-list.html')
-rw-r--r--_includes/category-list.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/_includes/category-list.html b/_includes/category-list.html
new file mode 100644
index 0000000..d684a28
--- /dev/null
+++ b/_includes/category-list.html
@@ -0,0 +1,26 @@
+{% case site.category_archive.type %}
+ {% when "liquid" %}
+ {% assign path_type = "#" %}
+ {% when "jekyll-archives" %}
+ {% assign path_type = nil %}
+{% endcase %}
+
+{% if site.category_archive.path %}
+ {% comment %}
+ <!-- Sort alphabetically regardless of case e.g. a B c d E -->
+ <!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
+ {% endcomment %}
+ {% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}|{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
+ {% assign category_hashes = page_categories | split: ',' | sort %}
+
+ <p class="page__taxonomy">
+ <strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
+ <span itemprop="keywords">
+ {% for hash in category_hashes %}
+ {% assign keyValue = hash | split: '|' %}
+ {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
+ <a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
+ {% endfor %}
+ </span>
+ </p>
+{% endif %} \ No newline at end of file