home_page.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {% extends "base.html" %}
  2. {% load wagtailimages_tags wagtailcore_tags %}
  3. {% block content %}
  4. <div class="homepage">
  5. {% image page.image fill-1920x600 as image %}
  6. <div class="container-fluid hero" style="background-image:url('{{ image.url }}')">
  7. <div class="hero-gradient-mask"></div>
  8. <div class="container">
  9. <div class="row">
  10. <div class="col-md-8 col-md-offset-2 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 hvr-icon-forward">
  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="col-sm-5 promo">
  27. {% if page.promo_image or page.promo_title or page.promo_text %}
  28. <figure>{% image page.promo_image fill-200x200-c100 %}</figure>
  29. <div class="promo-text">
  30. <h3>{{ page.promo_title }}</h3>
  31. {{ page.promo_text|safe }}
  32. </div>
  33. {% endif %}
  34. </div>
  35. <div class="col-sm-6 col-sm-offset-1 feature-1">
  36. {% if page.featured_section_1 %}
  37. <h2>{{ page.featured_section_1_title }}</h2>
  38. <div class="featured-children">
  39. {% for childpage in page.featured_section_1.specific.children|slice:"4" %}
  40. <li>
  41. <div class="row">
  42. <div class="col-xs-4">
  43. <a href="{{childpage.url}}">
  44. <figure>
  45. {% image childpage.image fill-180x140-c100 %}
  46. </figure>
  47. </a>
  48. </div>
  49. <div class="col-xs-8">
  50. <h3><a href="{{childpage.url}}">{{childpage.title}}</a></h3>
  51. </div>
  52. </div>
  53. </li>
  54. {% endfor %}
  55. </div>
  56. {% endif %}
  57. </div>
  58. </div>
  59. </div>
  60. {% if page.body %}
  61. <div class="container-fluid streamfield">
  62. <div class="container">
  63. <div class="row">
  64. <div class="col-md-7 streamfield-column">
  65. {{ page.body }}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. {% endif %}
  71. <div class="container">
  72. <div class="row">
  73. <div class="col-md-12 feature-2">
  74. {% if page.featured_section_2 %}
  75. <h2>{{ page.featured_section_2_title }}</h2>
  76. <div class="featured-children row feature-2-row">
  77. {% for childpage in page.featured_section_2.specific.children|slice:"3" %}
  78. <li class="col-sm-4 feature-2-item">
  79. <a href="{{childpage.url}}">
  80. <figure>
  81. {% image childpage.image fill-430x210-c100 %}
  82. </figure>
  83. </a>
  84. <div class="feature-2-text">
  85. <h3><a href="{{childpage.url}}">{{childpage.title}}</a></h3>
  86. <p>{{ childpage.introduction|truncatewords:15 }}</p>
  87. </div>
  88. </li>
  89. {% endfor %}
  90. </div>
  91. {% endif %}
  92. </div>
  93. </div>
  94. </div>
  95. <div class="container">
  96. <div class="row">
  97. <div class="col-md-12 feature-3">
  98. {% if page.featured_section_3 %}
  99. <h2>{{ page.featured_section_3_title }}</h2>
  100. <div class="featured-children row">
  101. {% for childpage in page.featured_section_3.specific.children|slice:"6" %}
  102. <li class="col-md-4">
  103. <a href="{{childpage.url}}">
  104. <figure>
  105. {% image childpage.image fill-430x254-c100 %}
  106. </figure>
  107. <h3>{{childpage.title}}</h3>
  108. </a>
  109. </li>
  110. {% endfor %}
  111. </div>
  112. {% endif %}
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. {% endblock content %}