bread_page.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {% extends "base.html" %}
  2. {% block content %}
  3. {% include "base/include/header-hero.html" %}
  4. <div class="container bread-detail">
  5. <div class="row">
  6. <div class="col-md-12">
  7. <div class="col-md-7">
  8. <div class="row">
  9. {% if page.introduction %}
  10. <p class="bread-detail__introduction">
  11. {{ page.introduction }}
  12. </p>
  13. {% endif %}
  14. <div class="hidden-md-down">
  15. {{ page.body }}
  16. </div>
  17. </div>
  18. </div>
  19. <div class="col-md-4 col-md-offset-1">
  20. <div class="row">
  21. <div class="bread-detail__meta">
  22. {% if page.origin %}
  23. <p class="bread-detail__meta-title">Origin</p>
  24. <p class="bread-detail__meta-content">{{ page.origin }}</p>
  25. {% endif %}
  26. {% if page.bread_type %}
  27. <p class="bread-detail__meta-title">Type</p>
  28. <p class="bread-detail__meta-content">{{ page.bread_type }}</p>
  29. {% endif %}
  30. {% with ingredients=page.ingredients.all() %}
  31. {% if ingredients %}
  32. <h4>Ingredients</h4>
  33. <ul>
  34. {% for ingredient in ingredients %}
  35. <li>
  36. {% if ingredient.live %}
  37. {# If it's live, show as-is #}
  38. {{ ingredient.name }}
  39. {% else %}
  40. {# EXAMPLE: we can show a placeholder element for instances that are not live #}
  41. <span class="bread-detail__meta-ingredient--draft">
  42. Draft ingredient
  43. </span>
  44. (draft)
  45. {% endif %}
  46. </li>
  47. {% endfor %}
  48. </ul>
  49. {% endif %}
  50. {% endwith %}
  51. </div>
  52. </div>
  53. </div>
  54. <div class="col-md-7">
  55. <div class="row hidden-md-up">
  56. {{ page.body }}
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. {% endblock content %}