{#- Copyright 2019 Mike Shoup Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -#} {% import '_macros.html' as macros %} {% extends '_base.html' %} {% block title %}{{ recipe.name }}{% endblock %} {% block body %}

{{ recipe.name }}

{% if style %}

{{ style._id }} {{ style.name }}

{% endif %} {#- Recipe Details -#}

Details

Recipe Type
{{ recipe.type }}
Batch Efficiency
{{ recipe.efficiency|int }}%
Batch Volume
{{ recipe.volume|float|round(1) }} gal.
{% if 'created' in recipe %}
Created
{{ macros.moment(recipe.created) }}
{% endif %} {% if 'updated' in recipe %}
Updated
{{ macros.moment(recipe.updated) }}
{% endif %}

Estimated Specifications

Original Gravity
{% if style %} {{ macros.render_progressbar(recipe|recipe_og|float, style.og.low|float, style.og.high|float, class='spec-progress') }} {% else %} {{ recipe|recipe_og }} {% endif %}
Final Gravity
{% if style %} {{ macros.render_progressbar(recipe|recipe_fg|float, style.fg.low|float, style.fg.high|float, class='spec-progress') }} {% else %} {{ recipe|recipe_fg }} {% endif %}
Alcohol
{% if style %} {{ macros.render_progressbar(recipe|recipe_abv|float, style.abv.low|float, style.abv.high|float, unit=' %/vol', class='spec-progress') }} {% else %} {{ recipe|recipe_abv }} %/vol. {% endif %}
Color
{% if style %} {{ macros.render_progressbar(recipe|recipe_srm|float, style.srm.low|float, style.srm.high|float, unit=' SRM', class='spec-progress') }} {% else %} {{ recipe|recipe_srm }} SRM {% endif %}
Bitterness
{% if style %} {{ macros.render_progressbar(recipe|recipe_ibu|float, style.ibu.low|float, style.ibu.high|float, unit=' IBU', class='spec-progress') }} {% else %} {{ recipe|recipe_ibu }} IBU {% endif %}
Bitterness Ratio
{{ recipe|recipe_ibu_ratio }} IBU/OG
{#- Fermentables -#}

Fermentables

{%- for fermentable in recipe.fermentables|ferm_pct|sort(attribute='amount', reverse=True) -%} {%- endfor -%}
Name Amount PPG Color %
{{ fermentable.name }} {{ fermentable.amount|float|round(2) }} lb. {{ fermentable.ppg|float|round }} {{ fermentable.color|float|round(1) }}°L {{ fermentable.pct|float|round(1) }}%
{#- Hops -#}

Hops

{%- for hop in recipe.hops|sort_hops -%} {%- endfor -%}
Name Amount Duration Alpha Acid Usage
{{ hop.name }} {{ hop.amount|float|round(2) }} oz. {{ hop.duration|int }} {% if hop.use == 'Dry-Hop' %}days{% else %}min{% endif %} {{ hop.alpha|float|round(1) }}% {{ hop.use }}
{#- Yeast -#} {% if 'yeast' in recipe %}

Yeast

Name Lab Code Atten. Temp. Flocc. ABV Max
{{ recipe.yeast.name }} {{ recipe.yeast.lab }} {{ recipe.yeast.code }} {% if 'low_attenuation' in recipe.yeast %}{{ recipe.yeast.low_attenuation|int }}%{% endif %} {% if 'low_attenuation' in recipe.yeast and 'high_attenuation' in recipe.yeast %} - {% endif %} {% if 'high_attenuation' in recipe.yeast %}{{ recipe.yeast.high_attenuation|int }}%{% endif %} {% if 'min_temperature' in recipe.yeast %}{{ recipe.yeast.min_temperature|int }}°F{% endif %} {% if 'min_temperature' in recipe.yeast and 'max_temperature' in recipe.yeast %} - {% endif %} {% if 'max_temperature' in recipe.yeast %}{{ recipe.yeast.max_temperature|int }}°F{% endif %} {% if 'flocculation' in recipe.yeast %}{{ recipe.yeast.flocculation }}{% endif %} {% if 'abv_tolerance' in recipe.yeast %}{{ recipe.yeast.abv_tolerance|int }}%{% endif %}
{% endif %} {% if recipe.mash and recipe.mash.name %}

Mash

{{ recipe.mash.name }}
{% for step in recipe.mash.steps %} {% endfor %}
# Step Name Type Temp Time Amount
{{ loop.index }} {{ step.name }} {{ step.type }} {% if step.temp %}{{ step.temp }} °F{% endif %} {% if step.time %}{{ step.time }} min.{% endif %} {% if step.amount %}{{ step.amount }} gal.{% endif %}
{% endif %} {#- Recipe Notes -#} {% if recipe.notes %}

Recipe Notes

{{ recipe.notes }}
{% endif %} {#- Buttons to do things -#} {% if session.logged_in %}
Update Recipe {{ macros.render_delete_button('Delete Recipe', 'deleteRecipe', 'btn-danger') }}
{{ macros.render_delete_modal(url_for('recipes.delete', id=recipe._id), 'deleteRecipe', recipe.name) }} {% endif %}
Export JSON
Recipe revision: {{ recipe._rev }}
{% endblock %}