1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 13:49:41 +00:00

Add recipe info page

This commit is contained in:
Emma 2019-06-23 21:53:56 -06:00
parent 5f7639232c
commit e1e7cca663

View file

@ -20,8 +20,104 @@
{% block body %}
<div class="row"><h1>{{ recipe.name }}</h1></div>
{#-
Recipe Details
-#}
<div class="row"><h2>Details</h2></div>
<div class="row"><div class="col">
<dl>
<dd>Batch Efficiency</dd>
<dt>{{ recipe.efficiency|int }}%</dt>
<dd>Batch Volume</dd>
<dt>{{ recipe.volume|float|round(1) }} gal.</dt>
</dl>
</div></div>
{#-
Fermentables
-#}
<div class="row"><h2>Fermentables</h2></div>
<div class="row"><div class="col">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>Name</th>
<th>Amount</th>
<th>PPG</th>
<th>Color</th>
</tr>
</thead>
{%- for fermentable in recipe.fermentables -%}
<tr>
<td>{{ fermentable.name }}</td>
<td>{{ fermentable.amount|float|round(2) }} lb.</td>
<td>{{ fermentable.ppg|float|round }}</td>
<td>{{ fermentable.color|float|round(1) }}°L</td>
</tr>
{%- endfor -%}
</table>
</div></div>
{#-
Hops
-#}
<div class="row"><h2>Hops</h2></div>
<div class="row"><div class="col">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>Name</th>
<th>Amount</th>
<th>Duration</th>
<th>Alpha Acid</th>
<th>Usage</th>
</tr>
</thead>
{%- for hop in recipe.hops -%}
<tr>
<td>{{ hop.name }}</td>
<td>{{ hop.amount|float|round(2) }} oz.</td>
<td>{{ hop.duration|int }} {% if hop.use == 'Dry-Hop' %}days{% else %}min{% endif %}</td>
<td>{{ hop.alpha|float|round(1) }}%</td>
<td>{{ hop.use }}</td>
</tr>
{%- endfor -%}
</table>
</div></div>
{#-
Yeast
-#}
<div class="row"><h2>Yeast</h2></div></div>
<div class="row"><div class="col">
<table class="table table-hover table-sm">
<thead>
<tr>
<th>Name</th>
<th>Lab</th>
<th>Code</th>
<th>Atten.</th>
<th>Temp.</th>
<th>Flocc.</th>
<th>ABV Max</th>
</tr>
</thead>
<tr>
<td>{{ recipe.yeast.name }}</td>
<td>{{ recipe.yeast.lab }}</td>
<td>{{ recipe.yeast.code }}</td>
<td>{{ recipe.yeast.low_attenuation|int }}% - {{ recipe.yeast.high_attenuation|int }}%</td>
<td>{{ recipe.yeast.min_temperature|int }}°F - {{ recipe.yeast.max_temperature|int }}°F</td>
<td>{{ recipe.yeast.flocculation }}</td>
<td>{{ recipe.yeast.abv_tolerance|int }}%</td>
</tr>
</table>
</div></div>
{#-
Buttons to do things
-#}
<div class="row">
{{ render_delete_button('Delete Recipe', 'deleteRecipe', 'btn-sm btn-danger') }}
<a class="btn btn-secondary" href="{{ url_for('recipes.update', id=recipe._id) }}">Update Recipe</a>
{{ render_delete_button('Delete Recipe', 'deleteRecipe', 'btn-danger') }}
</div>
{{ render_delete_modal(url_for('recipes.delete', id=recipe._id), 'deleteRecipe', recipe.name) }}
<div class="row small mt-4">Recipe revision: {{ recipe._rev }}</div>
{% endblock %}