-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcontent-category-row.html
More file actions
13 lines (13 loc) · 1.06 KB
/
content-category-row.html
File metadata and controls
13 lines (13 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
<tr>
{% assign catcon = site.content | where: "category", include.category %}
{% assign poetrycon = catcon | where: "subcat", "poetry" %}
{% assign category = site.categories | find: "slug", include.category %}
<td>{% include_cached content_icon.html category=include.category %} <a href="{{ category.url }}">{{ category.title }}</a>
{% if category.subcats or poetrycon.size > 0 %}<ul>{% if poetrycon.size > 0 %}
<li style="list-style:none;">{% include_cached content_icon.html subcat="poetry" %} <a href="/search/?q=%2Bis%3Apoetry&filter=%2Bin%3A{{ include.category }}">poetry</a> ({{ poetrycon | size }})</li>
{% endif %}{% for subcat in category.subcats %}
<li style="list-style:none;">{% include_cached content_icon.html category=include.category subcat=subcat %} <a href="/search/?q=%2Bis%3A{{ subcat }}">{{ subcat }}</a> ({{ catcon | where: "subcat", subcat | size }})</li>
{% endfor %}</ul>{% endif %}
</td>
<td markdown="span">{{ catcon | size }} {% if include.category == "av" %}<br />(>{{ catcon | map: "minutes" | sum | divided_by: 60 }} hours!){% endif %}</td>
</tr>