recipe-site/_includes/recipes.html
Lynne c159385433
big rework of the main page
- display stats (recipe count, recipe with the most ingredients, etc)
- display difficulty on recipes with difficulties
- minor style changes
- limit to 15 recipes (pagination coming soon™)
2020-03-04 02:54:37 +10:00

21 lines
672 B
HTML

<div id='recipes'>
{% for recipe in site.recipes | limit: 15 -%}
<a href='{{ recipe.url }}' class='recipe-listing'>
<h3>{{ recipe.name }}</h3>
<p>
By {{ recipe.author }} -
{% if recipe.difficulty %}Difficulty: {% include difficulty_stars.html %} - {%- endif %}
{{ recipe.method | size }} steps {%- if recipe.time %} -
{%- if recipe.time > 59 %} {{ recipe.time | divided_by: 60}}h {% endif -%}
{% assign mins = recipe.time | modulo: 60 -%}
{%- if mins > 0 %}{{ mins }}m{% endif %}
{%- endif -%}
</p>
<ol class='excerpt'>
{% for step in recipe.method | limit: 4 %}
<li>{{ step }}</li>
{% endfor %}
</ol>
</a>
{% endfor %}
</div>