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