display info when there are no recipes

This commit is contained in:
Lynne Megido 2020-03-06 23:20:21 +10:00
parent f088650669
commit 68763c6fe7
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -2,11 +2,11 @@
title: Home
layout: default
---
{%- if site.recipes.size > 1 %}
<h2 class='no-bg'>Recipes</h2>
<p class='subtle'>Showing {% if site.recipes_per_page > site.recipes.size %}{{ site.recipes_per_page}}{% else %}{{ site.recipes.size }}{% endif %} results.</p>
{% include recipes.html %}
{%- if site.recipes.size > 1 %}
<h2 class='no-bg'>Stats</h2>
{%- assign steps_total = 0 -%}
{%- assign longest_recipe = site.recipes | first -%}
@ -51,4 +51,11 @@ layout: default
</tr>
</table>
{%- else -%}
{%- comment -%} 0 recipes {%- endcomment -%}
<h2>No recipes</h2>
<p>
No recipes found. Ensure that there is at least one recipe file in the <tt>_recipes</tt> directory. See <a class='dark' href='/help.html'>the help page</a> for more information.
</p>
{% endif %}