mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-27 21:16:45 +00:00
Add in tags / categories again
This commit is contained in:
parent
f617fcd447
commit
45e0aaa7ad
42
categories.html
Normal file
42
categories.html
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Plugins by Category
|
||||
---
|
||||
|
||||
{% assign all_cats = "" | split: "/" %}
|
||||
{% for plugin in site.repo %}
|
||||
{% for cat in plugin.categories %}
|
||||
{% assign preprocessed = cat | strip | downcase %}
|
||||
{% unless preprocessed == "" %}
|
||||
{% assign all_cats = all_cats | push: preprocessed %}
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% assign all_cats = all_cats | uniq | sort %}
|
||||
|
||||
<i class="fa fa-tag"></i>
|
||||
{% for cat in all_cats %}
|
||||
{% unless tag == "" %}
|
||||
<a class="label" href="{{ '/categories/' | prepend: site.baseurl }}#{{ cat | slugify }}">
|
||||
<span class="badge rounded-pill bg-warning">{{ cat }}</span>
|
||||
</a>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
{% for cat in all_cats %}
|
||||
{% unless cat == "" %}
|
||||
<h2 id="{{ cat | slugify }}">{{ cat }}</h2>
|
||||
|
||||
<div>
|
||||
{% for plugin in site.repo %}
|
||||
{% assign plugin_cats = "" | split: "/" %}
|
||||
{% for cat in plugin.categories %}
|
||||
{% assign lower_cat = cat | downcase %}
|
||||
{% assign plugin_cats = plugin_cats | push: lower_cat %}
|
||||
{% endfor %}
|
||||
{% if plugin_cats contains cat %}
|
||||
{% include plugin_card.html plugin=plugin %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
42
tags.html
Normal file
42
tags.html
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Plugins by Tags
|
||||
---
|
||||
|
||||
{% assign all_tags = "" | split: "/" %}
|
||||
{% for plugin in site.repo %}
|
||||
{% for tag in plugin.tags %}
|
||||
{% assign preprocessed = tag | strip | downcase %}
|
||||
{% unless preprocessed == "" %}
|
||||
{% assign all_tags = all_tags | push: preprocessed %}
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% assign all_tags = all_tags | uniq | sort %}
|
||||
|
||||
<i class="fa fa-tag"></i>
|
||||
{% for tag in all_tags %}
|
||||
{% unless tag == "" %}
|
||||
<a class="label" href="{{ '/tags/' | prepend: site.baseurl }}#{{ tag | slugify }}">
|
||||
<span class="badge rounded-pill bg-info">{{ tag }}</span>
|
||||
</a>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
{% for tag in all_tags %}
|
||||
{% unless tag == "" %}
|
||||
<h2 id="{{ tag | slugify }}">{{ tag }}</h2>
|
||||
|
||||
<div>
|
||||
{% for plugin in site.repo %}
|
||||
{% assign plugin_tags = "" | split: "/" %}
|
||||
{% for tag in plugin.tags %}
|
||||
{% assign lower_tag = tag | downcase %}
|
||||
{% assign plugin_tags = plugin_tags | push: lower_tag %}
|
||||
{% endfor %}
|
||||
{% if plugin_tags contains tag %}
|
||||
{% include plugin_card.html plugin=plugin %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
Loading…
x
Reference in New Issue
Block a user