Skip to content
Merged
37 changes: 25 additions & 12 deletions app/_layouts/product.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,32 @@
{% endif %}
{# List sections (pages with a parent that is the homepage) if homepage has no pagination key set #}
{% elif eleventyNavigation.key == options.homeKey %}
<div class="govuk-grid-column-full">
<h2 class="govuk-heading-l govuk-!-font-size-27">
{{ sections.title or app.sections.title or "Sections" }}
</h2>
</div>
{% for item in collections.all | eleventyNavigation(options.homeKey) %}
<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>

{% set sections = [
{title: "Screening", services:["Bowel screening", "Explore team", "Manage breast screening"]}
] %}

{% 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 %}

{% endif %}
</div>
{% endblock %}
6 changes: 2 additions & 4 deletions app/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
homepage: true
layout: product
title: Screening design history
description: Digital transformation of screening at NHS
sections:
title: Services
title: Digital prevention services design history
description: A record of design and research for NHS digital prevention services
---


10 changes: 10 additions & 0 deletions app/posts/digital-nhs-health-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: collection
title: Digital NHS health check
description: A online check‑up of overall health for people aged 40&nbsp;to&nbsp;74.
pagination:
data: collections.digital-nhs-health-check
reverse: true
size: 50
permalink: "digital-nhs-health-check/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Digital NHS health check"
}
}
10 changes: 10 additions & 0 deletions app/posts/manage-your-appointments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: collection
title: Manage your appointments
description: A service for managing vaccination appointments slots
pagination:
data: collections.manage-your-appointments
reverse: true
size: 50
permalink: "manage-your-appointments/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Manage your appointments"
}
}
10 changes: 10 additions & 0 deletions app/posts/personalised-prevention-platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: collection
title: Personalised prevention platform
description: Helping people at risk of, or living with, health conditions to find appropriate services.
pagination:
data: collections.personalised-prevention-platform
reverse: true
size: 50
permalink: "personalised-prevention-platform/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Personalised prevention platform"
}
}
11 changes: 11 additions & 0 deletions app/posts/record-a-vaccination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: collection
title: Record a vaccination
description: A service for recording vaccinations
area: Vaccinations
pagination:
data: collections.record-a-vaccination
reverse: true
size: 50
permalink: "record-a-vaccination/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
5 changes: 5 additions & 0 deletions app/posts/record-a-vaccination/record-a-vaccination.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Record a vaccination"
}
}
10 changes: 10 additions & 0 deletions app/posts/smoking-cessation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: collection
title: Smoking cessation
description: Helping people stop using niccotine.
pagination:
data: collections.smoking-cessation
reverse: true
size: 50
permalink: "smoking-cessation/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
5 changes: 5 additions & 0 deletions app/posts/smoking-cessation/smoking-cessation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Smoking cessation"
}
}
10 changes: 10 additions & 0 deletions app/posts/talking-therapies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: collection
title: Talking therapies
description: Increasing access to available talking therapy services for underserved communities
pagination:
data: collections.talking-therapies
reverse: true
size: 50
permalink: "talking-therapies/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
5 changes: 5 additions & 0 deletions app/posts/talking-therapies/talking-therapies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eleventyNavigation": {
"parent": "Talking therapies"
}
}
26 changes: 25 additions & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function (eleventyConfig) {
logotype: {
html: `<svg class="app-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 32" height="40" aria-hidden="true" focusable="false"><path fill="currentColor" d="M80 0v32H0V0h80ZM69 2.2c-5.8 0-11.6 2-11.6 8.8 0 7.4 10.2 5.8 10.2 10 0 2.6-3.4 3-5.6 3-2.2 0-5-.6-6.4-1.4L54 28c2.2.8 5.4 1.4 8 1.4 6.2 0 12.8-1.8 12.8-9 0-7.8-10.2-6.6-10.2-10.2 0-2.2 2.2-2.6 5-2.6 2.6 0 4.4.6 5.8 1.2L77 3.4c-1.8-.8-4.8-1.2-8-1.2ZM16.6 3H7.8L2.2 29h6.6l3.6-18h.2L18 29h8.6l5.6-26h-6.6L22 21h-.2L16.6 3Zm25.2 0h-7.2l-5.2 26h6.8l2.4-11.2h8.2L44.6 29h7L57 3h-7l-2.2 9.8h-8l2-9.8Z"/></svg>`,
},
productName: 'Screening design history',
productName: 'Digital prevention services design history',
search: {
indexPath: '/search.json',
sitemapPath: '/sitemap'
Expand Down Expand Up @@ -67,6 +67,30 @@ module.exports = function (eleventyConfig) {
return collection.getFilteredByGlob('app/posts/bowel-screening/**/*.md')
})

eleventyConfig.addCollection('record-a-vaccination', collection => {
return collection.getFilteredByGlob('app/posts/record-a-vaccination/**/*.md')
})

eleventyConfig.addCollection('manage-your-appointments', collection => {
return collection.getFilteredByGlob('app/posts/manage-your-appointments/**/*.md')
})

eleventyConfig.addCollection('digital-nhs-health-check', collection => {
return collection.getFilteredByGlob('app/posts/digital-nhs-health-check/**/*.md')
})

eleventyConfig.addCollection('personalised-prevention-platform', collection => {
return collection.getFilteredByGlob('app/posts/personalised-prevention-platform/**/*.md')
})

eleventyConfig.addCollection('talking-therapies', collection => {
return collection.getFilteredByGlob('app/posts/talking-therapies/**/*.md')
})

eleventyConfig.addCollection('smoking-cessation', collection => {
return collection.getFilteredByGlob('app/posts/smoking-cessation/**/*.md')
})

// Config
return {
dataTemplateEngine: 'njk',
Expand Down
Loading