recipe-site/_includes/recipes.html

20 lines
565 B
HTML
Raw Normal View History

<div id='recipes'>
{% for recipe in site.recipes -%}
<a href='{{ recipe.url }}' class='recipe-listing'>
<h2>{{ recipe.name }}</h2>
<p>
2020-03-03 14:16:30 +00:00
By {{ recipe.author }} - {{ 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 %}
2020-03-03 14:16:30 +00:00
{%- endif -%}
</p>
<ol class='excerpt'>
{% for step in recipe.method | limit: 4 %}
<li>{{ step }}</li>
{% endfor %}
</ol>
</a>
{% endfor %}
</div>