40 lines
1.7 KiB
HTML
40 lines
1.7 KiB
HTML
{% extends "base_main.html" %}
|
|
{% comment %}
|
|
Barn Web App - A collection of web-apps for my family's personal use,
|
|
including a recipe database.
|
|
Copyright © 2023 Benjamin Stadlbauer
|
|
|
|
This program is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or (at
|
|
your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
General Public License for more details.
|
|
|
|
This program comes with a copy of the GNU Affero General Public License
|
|
file at the root of this project.
|
|
{% endcomment %}
|
|
{% load version_markup %}
|
|
{% block title %}{{ version.recipe.title }}{% if has_multiple_versions %} ({{ version.label }}){% endif %}{% endblock %}
|
|
{% block main %}
|
|
{% if has_multiple_versions %}
|
|
<p><a href="{{ recipe.get_absolute_url }}">Show all versions</a></p>
|
|
{% endif %}
|
|
<p><a href="{% url 'edit-recipe' recipe.slug %}">Edit recipe name</a></p>
|
|
<p><a href="{% url 'add-version' recipe.slug %}">Add version</a></p>
|
|
<p><a href="{% url 'edit-version' recipe.slug version.slug %}">Edit Version</a></p>
|
|
<article>
|
|
<h1>{{ version.recipe.title }}{% if has_multiple_versions %} ({{ version.label }}){% endif %}</h1>
|
|
<ul>
|
|
{% for i in ingredients %}
|
|
<li>{{ i.text }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% if version.body %}{{ version.body|ndash_for_ranges|nbsp_for_amounts|unify_units|vulgar_fractions|to_sections }}{% endif %}
|
|
</article>
|
|
{% if version.img %}<img src="{{ version.img.url }}" alt="">{% endif %}
|
|
{% endblock %}
|