-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
home.html.twig
27 lines (19 loc) · 1.18 KB
/
home.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{% extends 'partials/base.html.twig' %}
{# set some section identifiers we don't want to repeat as literals ... #}
{% set intro_section_id = 'intro' %}
{% set key_points_section_id = 'points' %}
{% block banner %}
{% include 'partials/sections/banner.html.twig' with { id: 'banner', next_id: intro_section_id } %}
{% endblock banner %}
{% block body %}
{% set featured_pages = page.collection('features') %}
{% set first_feature = featured_pages|first %}
{% include 'partials/sections/intro.html.twig' with { id: intro_section_id, next_id: (first_feature ? first_feature.slug) } %}
{% set next_section_id = windows_section_id %} {# set this to null if there are no more spotlights in this home template #}
{% for feature in featured_pages %}
{% set next_feature = featured_pages.nth(loop.index0 + 1) %}
{% include 'partials/sections/feature.html.twig' with { f: feature, placing: loop.index, next_id: (loop.last ? next_section_id : next_feature.slug) } %}
{% endfor %}
{% include 'partials/sections/key_points.html.twig' with { id: key_points_section_id } %}
{% include 'partials/sections/signup.html.twig' with { id: 'signup' } %}
{% endblock body %}