2
0

home_page.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {% extends "base.html" %}
  2. {% load wagtailimages_tags wagtailcore_tags %}
  3. {% block content %}
  4. <div class="homepage">
  5. <div class="container-fluid hero">
  6. {% picture page.image format-{avif,webp,jpeg} fill-{800x650,1920x900} sizes="100vw" class="hero-image" alt="" %}
  7. <div class="hero-gradient-mask"></div>
  8. <div class="container">
  9. <div class="row">
  10. <div class="col-md-6 col-md-offset-1 col-lg-5 home-hero">
  11. <h1>{{ page.title }}</h1>
  12. <p class="lead">{{ page.hero_text }}</p>
  13. {% if page.hero_cta_link %}
  14. <a href="{% pageurl page.hero_cta_link %}" class="hero-cta-link">
  15. {{ page.hero_cta }}
  16. </a>
  17. {% else %}
  18. {{ page.hero_cta }}
  19. {% endif %}
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="container">
  25. <div class="row promo-row">
  26. <div class="featured-cards col-sm-5 col-sm-offset-1">
  27. {% if page.featured_section_1 %}
  28. <h2 class="featured-cards__title">{{ page.featured_section_1_title }}</h2>
  29. <ul class="featured-cards__list">
  30. {% for childpage in page.featured_section_1.specific.children|slice:"3" %}
  31. <li>
  32. {% include "includes/card/listing-card.html" with page=childpage %}
  33. </li>
  34. {% endfor %}
  35. </ul>
  36. <a class="featured-cards__link" href="/breads">
  37. <span>View more of our breads</span>
  38. {% include "includes/chevron-icon.html" with class="featured-cards__chevron-icon" %}
  39. </a>
  40. {% endif %}
  41. </div>
  42. <div class="col-sm-6 promo">
  43. {% if page.promo_image or page.promo_title or page.promo_text %}
  44. <div class="col-lg-10 promo-text">
  45. {% if page.promo_title %}
  46. <h2>{{ page.promo_title }}</h2>
  47. {% endif %}
  48. {% if page.promo_text %}
  49. {{ page.promo_text|richtext }}
  50. {% endif %}
  51. </div>
  52. {% endif %}
  53. {% if page.promo_image %}
  54. <figure>{% picture page.promo_image format-{avif,webp,jpeg} fill-590x413-c100 %}</figure>
  55. {% endif %}
  56. </div>
  57. </div>
  58. </div>
  59. {% if page.body %}
  60. <div class="container-fluid streamfield">
  61. <div class="row">
  62. <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 streamfield-column">
  63. {{ page.body }}
  64. </div>
  65. </div>
  66. </div>
  67. {% endif %}
  68. <div class="container">
  69. <div class="row">
  70. <div class="col-md-12 locations-section">
  71. {% if page.featured_section_2 %}
  72. <h2 class="locations-section__title">{{ page.featured_section_2_title }}</h2>
  73. {% for childpage in page.featured_section_2.specific.children|slice:"3" %}
  74. {% include "includes/card/location-card.html" with page=childpage %}
  75. {% endfor %}
  76. {% endif %}
  77. </div>
  78. </div>
  79. </div>
  80. {% if page.featured_section_3 %}
  81. <div class="blog-section__background">
  82. <div class="container">
  83. <div class="row">
  84. <div class="col-md-12 blog-section">
  85. <h2 class="blog-section__title">{{ page.featured_section_3_title }}</h2>
  86. <div class="blog-section__grid">
  87. {% for childpage in page.featured_section_3.specific.children|slice:"6" %}
  88. {% include "includes/card/picture-card.html" with page=childpage portrait=True %}
  89. {% endfor %}
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. {% endif %}
  96. </div>
  97. {% endblock content %}