forked from clarklab/chowdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
categories.html
46 lines (44 loc) · 1.41 KB
/
categories.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
layout: default
title: Recipes Listed By Tag
---
{% assign recipes_tags = site.recipes | map: 'tags' | join: ',' | split: ',' | uniq | sort %}
{% assign components_tags = site.components | map: 'tags' | join: ',' | split: ',' | uniq | sort %}
{% assign sorted_recipes = site.recipes | sort: 'title' %}
{% assign sorted_components = site.components | sort: 'title' %}
<h2 class="ml4 preffered-color">Recipes</h2>
<div id="tags">
{% for tag in recipes_tags %}
{% if tag == '' %}
{% continue %}
{% endif %}
<h3 class="ml4">{{ tag }}</h3>
<ul class="ml4">
{% for recipe in sorted_recipes %}
{% assign tags_array = recipe.tags | join: ',' | split: ',' %}
{% if tags_array contains tag %}
<li><a href="{{ site.baseurl }}{{ recipe.url }}">{{ recipe.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
<!--
<h2 class="ml4 preffered-color">Components</h2>
<div id="tags">
{% for tag in components_tags %}
{% if tag == '' %}
{% continue %}
{% endif %}
<h3 class="ml4">{{ tag }}</h3>
<ul class="ml4">
{% for component in sorted_components %}
{% assign tags_array = component.tags | join: ',' | split: ',' %}
{% if tags_array contains tag %}
<li><a href="{{ site.baseurl }}{{ component.url }}">{{ component.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
-->