Skip to content
Merged
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Design history for NHS.UK screening
# Digital prevention services design history

A place for services within screening to document their design decisions and research learnings.
A place for services within digital prevention services to document their design decisions and research learnings.

## Installation and getting started

Expand All @@ -12,7 +12,20 @@ A place for services within screening to document their design decisions and res

## Adding a new service

For new services in screening, [follow this guide to get yourself added](https://x-govuk.github.io/govuk-design-history/divide-a-design-history-into-sections/).
To add a new service, there is some set up involved.

You will need to create some files and folders based on the name of your service, using lowercase and hypens. For example `your-service-name`.

You’ll need to:

* create a folder for your service within `app/posts/`, for example `app/posts/your-service-name/`
* create a folder with the same name in `app/images/`, for example `app/images/your-service-name/`
* create a `your-service-name.js` file within `app/posts/` that adds the eleventyNavigation parent name as the name of your service (copy an existing example)
* create a Markdown file in `app/posts/`, for example `app/posts/your-service-name.md`. Copy an existing example and update any references to match your service.
* update `eleventy.config.js` to create a new 'collection' for your service (copy one of the existing examples)
* update `app/_layouts/_product.njk` to list your new service in the `sections` variable

See [Divide a design history into different sections](https://x-govuk.github.io/govuk-design-history/divide-a-design-history-into-sections/).

## Adding a new post

Expand Down Expand Up @@ -49,7 +62,7 @@ Once it is merged the updated design history will automatically deploy with your

## Support

For issues relating to the NHS Screening design history, [contact Ed Horsford](https://github.com/edwardhorsford).
For issues relating to the NHS Digtal prevention services design history, contact [Ed Horsford](https://github.com/edwardhorsford), [Frankie Roberto](https://github.com/frankieroberto) or [Ralph Hawkins](https://github.com/ralph-hawkins).

The [GOV.UK design history project](https://x-govuk.github.io/govuk-design-history/) is maintained by a small number of volunteers working across government.

Expand Down
41 changes: 29 additions & 12 deletions app/_layouts/product.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,36 @@
{% 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"
}
}
29 changes: 28 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 @@ -55,6 +55,7 @@ module.exports = function (eleventyConfig) {
// Passthrough
eleventyConfig.addPassthroughCopy({ './app/images': '.' })

// Screening collections
eleventyConfig.addCollection('explore-team', collection => {
return collection.getFilteredByGlob('app/posts/explore-team/**/*.md')
})
Expand All @@ -67,6 +68,32 @@ module.exports = function (eleventyConfig) {
return collection.getFilteredByGlob('app/posts/bowel-screening/**/*.md')
})

// Vaccination collections
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')
})

// Personalised prevention collections
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