1 {% extends "base_with_header.html" %}
3 {% macro recipe_item(id, title, class) %}
4 <a href=
"/recipe/view/{{ id }}" class=
"{{ class }}">{{ title }}
</a>
7 {% block main_container %}
10 {% for (id, title) in recipes %}
12 {% match current_recipe_id %}
13 {# Don't know how to avoid repetition: comparing (using '==' or .eq()) current_recipe_id.unwrap() and id doesn't work. Guards for match don't exist.
14 See: https://github.com/djc/askama/issues/
752 #}
15 {% when Some (current_id) %}
16 {% if current_id == id %}
17 {% call recipe_item(id, title, "recipe-item-current") %}
19 {% call recipe_item(id, title, "recipe-item") %}
22 {% call recipe_item(id, title, "recipe-item") %}
29 {% block content %}{% endblock %}