home_page.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {% extends "base.html" %}
  2. {% load wagtailimages_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. <a href="{{ page.hero_cta_link }}" class="hero-cta-link hvr-icon-forward">{{ page.hero_cta }}</a>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="container">
  19. <div class="row promo-row">
  20. <div class="col-sm-5 promo">
  21. {% if page.promo_image or page.promo_title or page.promo_text %}
  22. <figure>{% image page.promo_image fill-200x200-c100 %}</figure>
  23. <div class="promo-text">
  24. <h3>{{ page.promo_title }}</h3>
  25. {{ page.promo_text|safe }}
  26. </div>
  27. {% endif %}
  28. </div>
  29. <div class="col-sm-6 col-sm-offset-1 feature-1">
  30. {% if page.featured_section_1 %}
  31. <h2>{{ page.featured_section_1_title }}</h2>
  32. <div class="featured-children">
  33. {% for childpage in page.featured_section_1.specific.children|slice:"4" %}
  34. <li>
  35. <div class="row">
  36. <div class="col-xs-4">
  37. <a href="{{childpage.url}}">
  38. <figure>
  39. {% image childpage.image fill-180x140-c100 %}
  40. </figure>
  41. </a>
  42. </div>
  43. <div class="col-xs-8">
  44. <h3><a href="{{childpage.url}}">{{childpage.title}}</a></h3>
  45. </div>
  46. </div>
  47. </li>
  48. {% endfor %}
  49. </div>
  50. {% endif %}
  51. </div>
  52. </div>
  53. </div>
  54. {% if page.body %}
  55. <div class="container-fluid streamfield">
  56. <div class="container">
  57. <div class="row">
  58. <div class="col-md-7 streamfield-column">
  59. {{ page.body }}
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. {% endif %}
  65. <div class="container">
  66. <div class="row">
  67. <div class="col-md-12 feature-2">
  68. {% if page.featured_section_2 %}
  69. <h2>{{ page.featured_section_2_title }}</h2>
  70. <div class="featured-children row">
  71. {% for childpage in page.featured_section_2.specific.children|slice:"3" %}
  72. <li class="col-md-4">
  73. {% image childpage.image height-210 %}
  74. <h3><a href="{{childpage.url}}">{{childpage.title}}</a></h3>
  75. <p>{{ childpage.introduction|truncatewords:15 }}</p>
  76. </li>
  77. {% endfor %}
  78. </div>
  79. {% endif %}
  80. </div>
  81. </div>
  82. </div>
  83. <div class="container">
  84. <div class="row">
  85. <div class="col-md-12 feature-3">
  86. {% if page.featured_section_3 %}
  87. <h2>{{ page.featured_section_3_title }}</h2>
  88. <div class="featured-children row">
  89. {% for childpage in page.featured_section_3.specific.children|slice:"6" %}
  90. <li class="col-md-4">
  91. <a href="{{childpage.url}}">
  92. {% image childpage.image width-380 %}
  93. <h3>{{childpage.title}}</h3>
  94. </a>
  95. </li>
  96. {% endfor %}
  97. </div>
  98. {% endif %}
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. {% endblock content %}
  104. HERO
  105. ----
  106. promo | bread
  107. -----
  108. Blog x3
  109. -----
  110. Location x 6