-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathproduct.njk
More file actions
94 lines (85 loc) · 3.07 KB
/
Copy pathproduct.njk
File metadata and controls
94 lines (85 loc) · 3.07 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{% extends "layouts/product.njk" %}
{% block content %}
{{ content }}
<div class="govuk-grid-row">
{# Paginate posts if front matter includes the pagination key #}
{% if pagination %}
<section class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-l govuk-!-font-size-27">
{{ posts.title or app.posts.title or "Posts" }}
</h2>
{{ appDocumentList({
classes: "app-document-list--large",
items: pagination.items
}) }}
{{ govukPagination({
previous: {
href: pagination.href.previous
},
next: {
href: pagination.href.next
},
items: pagination | itemsFromPagination
}) if pagination.pages.length > 1 }}
</section>
{% if aside or related %}
<div class="govuk-grid-column-one-third">
{% include "layouts/shared/related.njk" %}
</div>
{% endif %}
{# List sections (pages with a parent that is the homepage) if homepage has no pagination key set #}
{% elif eleventyNavigation.key == options.homeKey %}
{% set sections = [
{ title: "Screening", services: [
"Bowel screening",
"Cohort manager",
"Explore team",
"HPV Self-Sampling",
"Manage breast screening",
"Manage your screening"
] },
{ title: "Vaccinations", services: [
"Book a vaccination",
"Manage vaccinations in schools",
"Manage your appointments",
"Record a vaccination",
"Select people for invitation"
] },
{ title: "Personalised prevention", services: [
"Personalised prevention platform",
"Smoking cessation"
] }
] %}
{% for section in sections %}
<div class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-l">
{{ section.title }}
</h2>
</div>
{% for service in section.services %}
{% for item in collections.all | eleventyNavigation(options.homeKey) %}
{% if (service == item.title) %}
<section class="govuk-grid-column-one-half govuk-!-margin-bottom-6">
<h3 class="govuk-heading-m govuk-!-margin-bottom-1">
<a href="{{ item.url | pretty }}">{{ item.title }}</a>
</h3>
<p class="govuk-body">{{ item.excerpt }}</p>
</section>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
<div class="govuk-grid-column-full">
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
{% for item in collections.all | eleventyNavigation(options.homeKey) %}
{% if ("Guide" == item.title) %}
<h3 class="govuk-heading-m govuk-!-margin-bottom-1">
<a href="{{ item.url | pretty }}">{{ item.title }}</a>
</h3>
<p class="govuk-body">{{ item.excerpt }}</p>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}