2
0

bread_page.html 3.0 KB

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