49 lines
No EOL
1.4 KiB
HTML
49 lines
No EOL
1.4 KiB
HTML
{% macro recipe_item(id, title, class) %}
|
|
<a href="/recipe/view/{{ id }}" class="{{ class }}" id="recipe-{{ id }}">
|
|
{% if title == "" %}
|
|
{{ tr.t(Sentence::UntitledRecipe) }}
|
|
{% else %}
|
|
{{ title }}
|
|
{% endif %}
|
|
</a>
|
|
{% endmacro %}
|
|
|
|
|
|
<div id="recipes-list">
|
|
|
|
{% if !recipes.unpublished.is_empty() %}
|
|
{{ tr.t(Sentence::UnpublishedRecipes) }}
|
|
{% endif %}
|
|
|
|
<nav class="recipes-list-unpublished">
|
|
<ul>
|
|
{% for (id, title) in recipes.unpublished %}
|
|
<li>
|
|
{% if recipes.is_current(id) %}
|
|
{% call recipe_item(id, title, "recipe-item-current") %}
|
|
{% else %}
|
|
{% call recipe_item(id, title, "recipe-item") %}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</nav>
|
|
|
|
{% if !recipes.unpublished.is_empty() %}
|
|
<hr>
|
|
{% endif %}
|
|
|
|
<nav class="recipes-list-published">
|
|
<ul>
|
|
{% for (id, title) in recipes.published %}
|
|
<li>
|
|
{% if recipes.is_current(id) %}
|
|
{% call recipe_item(id, title, "recipe-item-current") %}
|
|
{% else %}
|
|
{% call recipe_item(id, title, "recipe-item") %}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</nav>
|
|
</div> |