Files
2022-06-01 20:08:58 -07:00

73 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}{{content.get_name()}}{% endblock %}
{% block html_head %}
{% endblock %}
{% block content %}
<h1>{{ content.get_name() }} Recipe</h1>
<p>Number of loaves: {{ content.get_num_loaves() }}</p>
<table>
<tr>
<td>
<table>
<tr>
<th>Ingredient</th>
<th>Grams</th>
</tr>
{% for item in content.get_ingredients() %}
<tr>
<td>{{ item }}</td>
<td>{{ content.get_ingredients()[item] }}</td>
</tr>
{% endfor %}
</table>
</td>
<td>
<div style="padding-left: 50px">
{% for photo in photos %}
<img src="{{ url_for('static', filename=photo) }}" width="250" alt="bread photo">
{% endfor %}
</div>
</td>
</tr>
</table>
<h2>Scaling</h2>
<form method="post">
<label for="scale_btn">How many loaves do you want: </label>
<input required name="scale" id="scale_btn" type="number">
<button type="submit">Go!</button>
</form>
{% if content._ingredients['Starter'] == 0 %}
<form method="post">
<input type="text" hidden name="convert">
<button type="submit" value="convert">Convert to SD</button>
</form>
{% endif %}
<form name="photo upload" id="photo upload" method="post" enctype="multipart/form-data">
<label for="photo">Upload a Photo: </label>
<input required id="photo" type="file" name="photo">
<button type="submit">Upload</button>
</form>
<input type="button" onclick="location.href='/recipes/{{_id}}/delete'" value=Delete />
<form name="download" id="download" method="post">
<button type="submit">Download</button>
</form>
<a href="/recipes/{{_id}}/email">Email me!</a>
{% endblock %}