Skip to content

Commit

Permalink
Merge branch 'development' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
John Shields authored and John Shields committed Nov 11, 2021
2 parents e4f5c7d + 5eb6212 commit e3383df
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 41 deletions.
2 changes: 1 addition & 1 deletion server/models/views/national.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/',
Expand Down
5 changes: 2 additions & 3 deletions server/routes/about-levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions server/routes/accessibility-statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions server/routes/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions server/routes/plan-ahead-for-flooding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/routes/privacy-notice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions server/routes/recovering-after-a-flood.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions server/routes/sms-auto-opt-in-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/routes/terms-and-conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 1 addition & 2 deletions server/routes/what-happens-after-a-flood.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions server/routes/what-to-do-in-a-flood.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions server/src/js/components/map/outlook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<span class="defra-map-days__month">${month} </span>${number}${nth(number)}`
return `${number} ${month}`
}

// Create day control
Expand Down
7 changes: 1 addition & 6 deletions server/src/sass/components/map/_map-days.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
cursor:pointer;
background-color: white;
box-sizing: border-box;
color: $govuk-text-colour;
&::-moz-focus-inner {
border: 0;
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions server/views/cookies.html
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
2 changes: 1 addition & 1 deletion server/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
items: [
{
href: "/accessibility-statement",
text: "Accessibility Statement"
text: "Accessibility statement"
},
{
href: "/cookies",
Expand Down
2 changes: 1 addition & 1 deletion server/views/station.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ <h2 class="defra-service-error__title" id="error-summary-title">There's a proble
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<figure class="defra-line-chart" aria-hidden="true" hidden>
<figcaption class="govuk-heading-m govuk-!-margin-bottom-7">Height over the last 5 days {% if model.isFfoi %}and upto 36 hour forecast{% endif %}</figcaption>
<figcaption class="govuk-heading-m govuk-!-margin-bottom-7">Height over the last 5 days {% if model.isFfoi %}and up to 36 hour forecast{% endif %}</figcaption>
<div id="line-chart" class="defra-line-chart__container" role="presentation"></div>
{% if model.isFfoi and not model.forecastOutOfDate %}
<p class="govuk-body-s govuk-!-margin-top-0 govuk-!-margin-bottom-2"> {{ model.forecastDetails }}</p>
Expand Down

0 comments on commit e3383df

Please sign in to comment.