-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecipes.html
33 lines (27 loc) · 877 Bytes
/
recipes.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
---
title: Recipes
image_view: true
---
<h1>Recipes</h1>
{% assign cat_string = "" %}
{% for category in site.categories %}
{% assign cat_string = cat_string | append: category[0] | append: ", " %}
{% endfor %}
{% assign cat_array = cat_string | split: ", " %}
{% assign cat_array_sorted = cat_array | sort %}
{% for category in cat_array_sorted %}
<span class="taglink"><a href="#{{ category }}">{{ category }}</a></span>
{% endfor %}
{% if page.image_view %}
{% for category in site.categories %}
<a name="{{ category[0] }}"></a> <br /><br />
<h2>{{ category[0] }}</h2>
<div class="recipes">
{% for recipe in category[1] %}
<div class="recipe" style="background-image: url('{{ recipe.featured_image }}')">
<a href="{{ site.baseurl }}{{ recipe.url }}"><span>{{ recipe.title }}</span></a>
</div>
{% endfor %}
</div>
{% endfor %}
{% endif %}