From 5eb6212aefad1b07b67f717f23d16acb84fa06d1 Mon Sep 17 00:00:00 2001 From: John Shields Date: Thu, 11 Nov 2021 09:40:02 +0000 Subject: [PATCH] FSR-477: Content changes and corrections. (#268) Co-authored-by: John Shields --- server/models/views/national.js | 2 +- server/routes/about-levels.js | 5 ++--- server/routes/accessibility-statement.js | 5 ++--- server/routes/cookies.js | 3 +-- server/routes/plan-ahead-for-flooding.js | 3 +-- server/routes/privacy-notice.js | 4 ++-- server/routes/recovering-after-a-flood.js | 3 +-- server/routes/sms-auto-opt-in-info.js | 3 +-- server/routes/terms-and-conditions.js | 4 ++-- server/routes/what-happens-after-a-flood.js | 3 +-- server/routes/what-to-do-in-a-flood.js | 3 +-- server/src/js/components/map/outlook.js | 8 ++------ server/src/sass/components/map/_map-days.scss | 7 +------ server/views/cookies.html | 4 ---- server/views/layout.html | 2 +- server/views/station.html | 2 +- 16 files changed, 20 insertions(+), 41 deletions(-) diff --git a/server/models/views/national.js b/server/models/views/national.js index f3b43ce33..a675293e1 100644 --- a/server/models/views/national.js +++ b/server/models/views/national.js @@ -15,7 +15,7 @@ class ViewModel { const outlookOutOfDate = (now - issueDate) > hours48 Object.assign(this, { - pageTitle: 'Flood warnings in England', + pageTitle: 'Check for flooding in England', metaDescription: 'View current flood warnings and alerts for England and the national flood forecast for the next 5 days. Also check river, sea, groundwater and rainfall levels.', metaCanonical: '/', diff --git a/server/routes/about-levels.js b/server/routes/about-levels.js index 6a5558259..db3b94280 100644 --- a/server/routes/about-levels.js +++ b/server/routes/about-levels.js @@ -2,13 +2,12 @@ module.exports = { method: 'GET', path: '/how-we-measure-river-sea-groundwater-levels', options: { - description: 'How we measure river, sea and groundwater levels - Flood information service - GOV.UK', + description: 'How we measure river, sea and groundwater levels', handler: { view: { template: 'about-levels', context: { - pageTitle: 'How we measure river, sea and groundwater levels', - heading: 'Flood information service' + pageTitle: 'How we measure river, sea and groundwater levels - Check for flooding' } } } diff --git a/server/routes/accessibility-statement.js b/server/routes/accessibility-statement.js index 9f1245917..eb59d3d3f 100644 --- a/server/routes/accessibility-statement.js +++ b/server/routes/accessibility-statement.js @@ -2,13 +2,12 @@ module.exports = { method: 'GET', path: '/accessibility-statement', options: { - description: 'Accessibility Statement - Flood information service - GOV.UK', + description: 'Accessibility statement', handler: { view: { template: 'accessibility-statement', context: { - pageTitle: 'Accessibility Statement - Flood information service - GOV.UK', - heading: 'Flood information service' + pageTitle: 'Accessibility statement - Check for flooding' } } } diff --git a/server/routes/cookies.js b/server/routes/cookies.js index 1e5caa4ef..8b25cf21e 100644 --- a/server/routes/cookies.js +++ b/server/routes/cookies.js @@ -17,8 +17,7 @@ module.exports = { } return h.view('cookies', { - pageTitle: 'Cookies - Flood information service - GOV.UK', - heading: 'Flood information service', + pageTitle: 'Cookies - Check for flooding', metaDescription: description, analyticsCookiesSet: analyticsCookiesSet, referer: requestHeadersReferer diff --git a/server/routes/plan-ahead-for-flooding.js b/server/routes/plan-ahead-for-flooding.js index bab30f807..1d24a4964 100644 --- a/server/routes/plan-ahead-for-flooding.js +++ b/server/routes/plan-ahead-for-flooding.js @@ -7,8 +7,7 @@ module.exports = { view: { template: 'plan-ahead-for-flooding', context: { - pageTitle: 'How to plan ahead for flooding', - heading: 'Flood information service' + pageTitle: 'How to plan ahead for flooding - Check for flooding' } } } diff --git a/server/routes/privacy-notice.js b/server/routes/privacy-notice.js index 75d970037..16b68efa5 100644 --- a/server/routes/privacy-notice.js +++ b/server/routes/privacy-notice.js @@ -4,12 +4,12 @@ module.exports = { method: 'GET', path: '/privacy-notice', options: { - description: 'Privacy notice - Flood information service - GOV.UK', + description: 'Privacy notice', handler: { view: { template: 'privacy-notice', context: { - pageTitle: 'Privacy notice - Flood information service - GOV.UK', + pageTitle: 'Privacy notice - Check for flooding', metaDescription: description, ogDescription: description } diff --git a/server/routes/recovering-after-a-flood.js b/server/routes/recovering-after-a-flood.js index 07ae33a41..8aeff92b3 100644 --- a/server/routes/recovering-after-a-flood.js +++ b/server/routes/recovering-after-a-flood.js @@ -7,8 +7,7 @@ module.exports = { view: { template: 'recovering-after-a-flood', context: { - pageTitle: 'How to recover after a flood', - heading: 'Flood information service' + pageTitle: 'How to recover after a flood - Check for flooding' } } } diff --git a/server/routes/sms-auto-opt-in-info.js b/server/routes/sms-auto-opt-in-info.js index 791909c63..0cfc9b52c 100644 --- a/server/routes/sms-auto-opt-in-info.js +++ b/server/routes/sms-auto-opt-in-info.js @@ -6,8 +6,7 @@ module.exports = { view: { template: 'sms-auto-opt-in-info', context: { - pageTitle: 'This phone number has been automatically opted-in to receive flood warnings', - heading: 'Flood information service' + pageTitle: 'This phone number has been automatically opted-in to receive flood warnings' } } } diff --git a/server/routes/terms-and-conditions.js b/server/routes/terms-and-conditions.js index bf8bc9a27..c60028b30 100644 --- a/server/routes/terms-and-conditions.js +++ b/server/routes/terms-and-conditions.js @@ -4,12 +4,12 @@ module.exports = { method: 'GET', path: '/terms-and-conditions', options: { - description: 'Terms and conditions - Flood information service - GOV.UK', + description: 'Terms and conditions', handler: { view: { template: 'terms-and-conditions', context: { - pageTitle: 'Terms and conditions - Flood information service - GOV.UK', + pageTitle: 'Terms and conditions - Check for flooding', metaDescription: description, ogDescription: description } diff --git a/server/routes/what-happens-after-a-flood.js b/server/routes/what-happens-after-a-flood.js index 088da8e2e..30e43234d 100644 --- a/server/routes/what-happens-after-a-flood.js +++ b/server/routes/what-happens-after-a-flood.js @@ -7,8 +7,7 @@ module.exports = { view: { template: 'what-happens-after-a-flood', context: { - pageTitle: 'What happens after a flood', - heading: 'Flood information service' + pageTitle: 'What happens after a flood - Check for flooding' } } } diff --git a/server/routes/what-to-do-in-a-flood.js b/server/routes/what-to-do-in-a-flood.js index 46804268e..c52386a10 100644 --- a/server/routes/what-to-do-in-a-flood.js +++ b/server/routes/what-to-do-in-a-flood.js @@ -6,8 +6,7 @@ module.exports = { view: { template: 'what-to-do-in-a-flood', context: { - pageTitle: 'What to do in a flood', - heading: 'Flood information service' + pageTitle: 'What to do in a flood - Check for flooding' } } } diff --git a/server/src/js/components/map/outlook.js b/server/src/js/components/map/outlook.js index d959dae46..9f0a84b9a 100644 --- a/server/src/js/components/map/outlook.js +++ b/server/src/js/components/map/outlook.js @@ -56,15 +56,11 @@ function OutlookMap (mapId, options) { } } - // Format date as 4th or 23rd etc + // Format date e.g. '12 Nov' const formatDate = (date) => { const number = date.getDate() - const nth = (number) => { - if (number > 3 && number < 21) return 'th' - switch (number % 10) { case 1: return 'st'; case 2: return 'nd'; case 3: return 'rd'; default: return 'th' } - } const month = date.toLocaleString('en-GB', { month: 'short' }) - return `${month} ${number}${nth(number)}` + return `${number} ${month}` } // Create day control diff --git a/server/src/sass/components/map/_map-days.scss b/server/src/sass/components/map/_map-days.scss index a06897b27..9520d677a 100644 --- a/server/src/sass/components/map/_map-days.scss +++ b/server/src/sass/components/map/_map-days.scss @@ -29,6 +29,7 @@ cursor:pointer; background-color: white; box-sizing: border-box; + color: $govuk-text-colour; &::-moz-focus-inner { border: 0; } @@ -71,12 +72,6 @@ text-decoration: none; } } -.defra-map-days__month { - display:none; - @include mq ($from: tablet) { - display: inline; - } -} .defra-map-days__icon { position:absolute; width:18px; diff --git a/server/views/cookies.html b/server/views/cookies.html index 004ed6699..c052f44e5 100644 --- a/server/views/cookies.html +++ b/server/views/cookies.html @@ -1,9 +1,5 @@ {% extends 'layout.html' %} -{% block pageTitle %} - Set cookie preferences - Flood warning information service - GOV.UK -{% endblock %} - {% block header %} {{ govukHeader({ homepageUrl: "https://www.gov.uk/", diff --git a/server/views/layout.html b/server/views/layout.html index c69283f97..260111eee 100644 --- a/server/views/layout.html +++ b/server/views/layout.html @@ -99,7 +99,7 @@ items: [ { href: "/accessibility-statement", - text: "Accessibility Statement" + text: "Accessibility statement" }, { href: "/cookies", diff --git a/server/views/station.html b/server/views/station.html index ebf0d4924..90e5c04b2 100644 --- a/server/views/station.html +++ b/server/views/station.html @@ -184,7 +184,7 @@

There's a proble