Add phase 3: comments and cooking mode

- Comments on visible recipes; author and admin may delete; per-user
  hourly rate limit (COMMENT_RATE_LIMIT_PER_HOUR)
- Cooking mode with large text, tick-off checklists, serving scaling and
  Screen Wake Lock to keep the display on
- Serving calculator auto-submits on change
- Privacy tests cover comment and cooking-mode URLs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Kyle Dammann
2026-10-30 21:39:15 +01:00
co-authored by Claude Opus 5.5
parent 6f7e4f92ca
commit 9256e94286
14 changed files with 342 additions and 16 deletions
+35
View File
@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block title %}Kochmodus: {{ recipe.title }}{% endblock %}
{% block content %}
<div class="cook" data-wakelock>
<div class="page-head">
<h1>{{ recipe.title }}</h1>
<a class="button secondary" href="{% url 'recipes:detail' recipe.pk %}">Fertig</a>
</div>
<p class="muted wakelock-status" hidden>Bildschirm bleibt an.</p>
<section class="card">
<div class="section-head">
<h2>Zutaten</h2>
{% include "recipes/_servings.html" %}
</div>
{% for group, items in ingredient_groups %}
{% if group %}<h3>{{ group }}</h3>{% endif %}
<ul class="checklist">
{% for ing in items %}
<li><label><input type="checkbox"> <span><strong>{{ ing.amount }} {{ ing.unit }}</strong> {{ ing.name }}{% if ing.note %}, {{ ing.note }}{% endif %}</span></label></li>
{% endfor %}
</ul>
{% endfor %}
</section>
<section class="card">
<h2>Zubereitung</h2>
<ol class="checklist steps-big">
{% for step in steps %}
<li><label><input type="checkbox"> <span><span class="step-no">{{ forloop.counter }}.</span> {{ step.text|linebreaksbr }}</span></label></li>
{% endfor %}
</ol>
</section>
</div>
{% endblock %}