{% extends "base.html" %} {% block title %}{{ recipe.title }} — {{ site_name|default('KitchenCrate') }}{% endblock %} {% block content %}
{# ── Flag Banner (admins/moderators only) ── #} {% if recipe.is_flagged and current_user.role in ['admin', 'moderator'] %} {% set flag_severity = 'warning' %} {% if flag_data and flag_data.severity == 'critical' %} {% set flag_severity = 'critical' %} {% endif %} {% if flag_severity == 'critical' %} {% else %} {% endif %} {% endif %} {# ══════ HERO CARD: angled image + title ══════ #}
{% if recipe.image_filename %}
{{ recipe.title }}
{% endif %}
Back to Recipes

{{ recipe.title }}

{% if recipe.description %}

{{ recipe.description }}

{% endif %} {% if recipe_tags %}
{% for tag in recipe_tags %} {{ tag.name }} {% endfor %}
{% endif %}
{# Top-right action buttons #}
Edit
{# ══════ STATS BAR ══════ #}
{# Servings scaler #}
batch
{# Prep #}
{% if recipe.prep_time %}{{ recipe.prep_time }}m{% else %}{% endif %}
{# Cook #}
{% if recipe.cook_time %}{{ recipe.cook_time }}m{% else %}{% endif %}
{# Cuisine #}
{{ recipe.cuisine or 'General' }}
{% if recipe.culinary_type %}
{{ recipe.culinary_type }}
{% endif %} {% if recipe.recipe_tags %}
{% for rt in recipe.recipe_tags %} {{ rt.tag.name }} {% endfor %}
{% endif %}
{# Rating #}
{{ avg_rating or 0 }}
{# ══════ INGREDIENTS + INSTRUCTIONS ══════ #}
{# Ingredients column #}
Ingredients {{ ingredients|length }}
{% if ingredients %} {% set ns = namespace(current_group=none) %} {% for ing in ingredients|sort(attribute='group_order')|sort(attribute='order_index') %} {% if ing.group_label and ing.group_label != ns.current_group %} {% set ns.current_group = ing.group_label %}
{{ ing.group_label }}
{% endif %}
{% if ing.quantity %}{{ ing.quantity }} {% endif %} {% if ing.unit %}{{ {"c":"c","tbsp":"tbsp","tsp":"tsp","oz":"oz","lb":"lb","pc":"pc","whole":"whole","cup":"cup","tablespoon":"tbsp","teaspoon":"tsp","pound":"lb","ounce":"oz"}.get(ing.unit, ing.unit) }} {% endif %} {% if ing.color_prefix %}{{ ing.color_prefix }} {% endif %}{{ ing.ingredient.name if ing.ingredient else '(unknown)' }}{% if ing.name_suffix %} {{ ing.name_suffix }}{% endif %} {% set mod_text = ing.modifier_display|default('') %} {% if mod_text or ing.package_size %} · {% if ing.package_size %}({{ ing.package_size }}) {% endif %}{{ mod_text }} {% endif %}
{% endfor %} {% else %}
No ingredients listed
{% endif %}
{# Instructions column #}
Instructions
{% set steps = (recipe.instructions or '')|parse_steps %} {% if steps %} {% for step in steps %}
{{ loop.index }}

{{ step }}

{% endfor %} {% else %}
No instructions yet
{% endif %}
{# /.hero card #} {# ══════ SOCIAL STRIP ══════ #}
{# Favorite #} {# Log Cook #} {# Add to Collection #} {% if user_collections %} {% endif %} {# Personal Note toggle #} Added {{ recipe.created_at.strftime('%b %d, %Y') if recipe.created_at else '—' }} · {{ recipe.source or 'manual' }}
{# Note input — hidden until toggled #}
{# ══════ PHOTO GALLERY + PDF DRAWER ══════ #}
Photo Gallery & PDF {% set photo_count = recipe.photos|list|length %} {% if photo_count %} {{ photo_count }} {% endif %} {% if recipe.pdf_filename %} PDF {% endif %}
{% set photo_list = recipe.photos|list %} {% if photo_list %}
{% for photo in photo_list %}
Recipe photo
{% endfor %}
{% else %}
No photos yet
{% endif %}
{% if recipe.pdf_filename %}
Original Recipe PDF
{% endif %}
{# /.container #} {# ══════ RATING MODAL ══════ #} {# ══════ LIGHTBOX ══════ #} {# ══════ TOOLBOX DRAWER ══════ #} {# Backdrop #} {# Drawer #}
{# Header #}
{{ recipe.title|truncate(30) }}
{# Tab nav #}
{# Tab content #}
{# Steps #}
Step Navigation
Step 1 of 1

{# Timers #} {# Notes #} {# Temperature #} {# Measurement #}
{# /tbContent #}
{# /tbDrawer #} {% endblock %}