Files
CS361-Portfolio-Project/templates/recipe.html
2022-05-26 21:22:59 -07:00

57 lines
1.4 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>
<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>
<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>
<form name="photo upload" id="photo upload" method="post" enctype="multipart/form-data">
<label for="photo">Upload a Photo: </label>
<input id="photo" type="file" name="photo">
<input type="submit">
</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>
<div>
<!--<p>Photos: {{photos}}</p>-->
{% for photo in photos %}
<!-- <p>{{photo}}</p>-->
<img src="{{ url_for('static', filename=photo) }}" width="250" alt="bread photo">
{% endfor %}
</div>
{% endblock %}