- Recipe model with ingredients (amount/range, unit, group, note), steps, lowercase tags, author notes, source URL and private/public visibility - Central RecipeQuerySet.visible_to() used by every read path; edit only by owner, delete by owner or admin (visible recipes only) - Text-based editing: ingredient/step parser with roundtrip and scaling - Photo upload (JPEG/PNG/WebP/HEIC), re-encoded to WebP without EXIF, thumbnails, cover image, served only through permission-checked view - Search across title, description, ingredients, tags; ingredient and tag filters; "mine" and favourites views - Admin can delete all recipes of a deactivated user - Acceptance tests: private recipes unreachable for others and admins in list, search, tags, favourites, detail, edit, delete and image URLs Co-Authored-By: Claude Opus 5.5 <[email protected]>
44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
{% load static %}<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="theme-color" content="#b4532a">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>{% block title %}Kochbuch{% endblock %} · Kochbuch</title>
|
|
<link rel="stylesheet" href="{% static 'css/app.css' %}">
|
|
<script src="{% static 'js/app.js' %}" defer></script>
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<a class="brand" href="{% url 'recipes:list' %}">Kochbuch</a>
|
|
{% if user.is_authenticated %}
|
|
<details class="menu">
|
|
<summary aria-label="Menü">☰</summary>
|
|
<nav>
|
|
<a href="{% url 'recipes:list' %}">Rezepte</a>
|
|
<a href="{% url 'accounts:profile' %}">Mein Konto</a>
|
|
{% if user.is_admin %}
|
|
<a href="{% url 'accounts:admin_users' %}">Nutzer verwalten</a>
|
|
<a href="{% url 'accounts:admin_invitations' %}">Einladungen</a>
|
|
{% endif %}
|
|
<form method="post" action="{% url 'accounts:logout' %}">
|
|
{% csrf_token %}
|
|
<button type="submit" class="linklike">Abmelden</button>
|
|
</form>
|
|
</nav>
|
|
</details>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<main class="container">
|
|
{% if messages %}
|
|
<ul class="messages">
|
|
{% for message in messages %}<li class="msg msg-{{ message.tags }}">{{ message }}</li>{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html>
|