This commit is contained in:
Greg Burri 2023-04-10 09:35:10 +02:00
parent e7d2f8f6c7
commit 57d7e7a3ce
17 changed files with 608 additions and 500 deletions

View file

@ -5,12 +5,14 @@
{% endmacro %}
{% block main_container %}
<div class="list">
<nav class="list">
<ul>
{% for (id, title) in recipes %}
<li>
{% match current_recipe_id %}
{# 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.
{# 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.
See: https://github.com/djc/askama/issues/752 #}
{% when Some (current_id) %}
{% if current_id == id %}
@ -24,7 +26,7 @@
</li>
{% endfor %}
</ul>
</div>
</nav>
<div class="content">
{% block content %}{% endblock %}
</div>