A bit of clean up
This commit is contained in:
parent
cb2483eab1
commit
a590d7e1e9
24 changed files with 259 additions and 237 deletions
|
|
@ -1,48 +1,40 @@
|
|||
{% 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>
|
||||
{% macro recipe_item(id, title, is_current) %}
|
||||
<li>
|
||||
<a href="/recipe/view/{{ id }}" class="recipe-item
|
||||
{%~ if is_current %}
|
||||
current
|
||||
{% endif %}" id="recipe-{{ id }}"
|
||||
>
|
||||
{% if title == "" %}
|
||||
{{ tr.t(Sentence::UntitledRecipe) }}
|
||||
{% else %}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<div id="recipes-list">
|
||||
|
||||
{% if !recipes.unpublished.is_empty() %}
|
||||
{{ tr.t(Sentence::UnpublishedRecipes) }}
|
||||
{{ 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>
|
||||
{% call recipe_item(id, title, recipes.is_current(id)) %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{% if !recipes.unpublished.is_empty() %}
|
||||
<hr>
|
||||
<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>
|
||||
{% call recipe_item(id, title, recipes.is_current(id)) %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue