Skip to content

Commit 04f7fff

Browse files
Cp regions remove vaccs opt2 (#828)
Co-authored-by: Anna-Sutton <anna.sutton9@nhs.net>
1 parent 8aeb06c commit 04f7fff

30 files changed

Lines changed: 1371 additions & 262 deletions

app/assets/sass/_overrides.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
}
66
}
77

8+
.nhsuk-width-container {
9+
max-width: 1100px;
10+
}
11+
812
.app-pre-footer-banner {
913
border-top: 1px solid #b1b4b6;
1014
}
1115

1216
.app-pre-footer-banner .govuk-phase-banner__content {
1317
display: flex;
14-
flex-wrap: nowrap;
18+
flex-wrap: wrap;
1519
align-items: baseline;
1620
@include nhsuk-font(16);
1721
margin-top: 24px;

app/assets/sass/components/_related-nav.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
list-style: none;
2424
padding-left: 0;
2525
}
26+

app/assets/sass/main.scss

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Import NHS.UK frontend library
22
@import "nhsuk-frontend/dist/nhsuk";
3+
@import "../../../node_modules/@x-govuk/govuk-prototype-components/src/x-govuk";
34

45
// Local override classes
56
@import 'overrides';
@@ -149,3 +150,184 @@ border-radius: 3px;
149150
.nhsuk-checkboxes__item[hidden] {
150151
display: none;
151152
}
153+
154+
.x-govuk-sub-navigation__section-item--current {
155+
background-color: transparent;
156+
}
157+
158+
.app-pharmacy-back-link {
159+
margin-bottom: 24px;
160+
}
161+
162+
.app-pharmacy-page-title {
163+
margin-bottom: nhsuk-spacing(6);
164+
}
165+
166+
@include nhsuk-media-query($from: tablet) {
167+
.app-pharmacy-back-link {
168+
margin-bottom: 48px;
169+
}
170+
}
171+
172+
.app-section-navigation {
173+
margin-bottom: nhsuk-spacing(4);
174+
}
175+
176+
.app-section-navigation__list {
177+
@include nhsuk-font(19);
178+
179+
display: flex;
180+
flex-flow: row nowrap;
181+
gap: nhsuk-spacing(1) nhsuk-spacing(2);
182+
list-style: none;
183+
margin: 0;
184+
padding: 0;
185+
box-shadow: inset 0 -1px $nhsuk-border-colour;
186+
overflow-x: auto;
187+
}
188+
189+
.app-section-navigation__item {
190+
margin: 0;
191+
}
192+
193+
.app-section-navigation__link {
194+
@include nhsuk-link-style-default;
195+
@include nhsuk-link-style-no-visited-state;
196+
197+
display: block;
198+
padding: nhsuk-spacing(2) 2px;
199+
text-decoration: none;
200+
white-space: nowrap;
201+
}
202+
203+
.app-section-navigation__link[aria-current="page"] {
204+
box-shadow: inset 0 -4px $nhsuk-link-colour;
205+
}
206+
207+
.app-section-navigation__link[aria-current="page"]:focus {
208+
box-shadow: inset 0 -4px $nhsuk-text-colour;
209+
}
210+
211+
.app-section-navigation__current {
212+
font-weight: 700;
213+
}
214+
215+
.app-section-navigation--vertical .app-section-navigation__list {
216+
flex-flow: column;
217+
gap: 0;
218+
box-shadow: none;
219+
overflow: visible;
220+
}
221+
222+
.app-section-navigation--vertical .app-section-navigation__item {
223+
border-left: 4px solid transparent;
224+
}
225+
226+
.app-section-navigation--vertical .app-section-navigation__item--current {
227+
border-left-color: $nhsuk-link-colour;
228+
}
229+
230+
.app-section-navigation--vertical .app-section-navigation__link {
231+
padding: nhsuk-spacing(1) nhsuk-spacing(2) nhsuk-spacing(1) calc(#{nhsuk-spacing(2)} + 4px);
232+
}
233+
234+
.app-section-navigation--vertical .app-section-navigation__link[aria-current="page"] {
235+
box-shadow: none;
236+
}
237+
238+
.app-section-navigation--vertical .app-section-navigation__link[aria-current="page"]:focus {
239+
box-shadow: inset 0 -4px $nhsuk-text-colour;
240+
}
241+
242+
.app-pharmacy-users-table-responsive {
243+
container-name: pharmacy-users-table;
244+
container-type: inline-size;
245+
max-width: 100%;
246+
}
247+
248+
.app-pharmacy-users-table {
249+
width: 100%;
250+
}
251+
252+
.app-pharmacy-users-table .app-pharmacy-users-vaccinator {
253+
white-space: nowrap;
254+
width: 1%;
255+
}
256+
257+
.app-pharmacy-users-actions a {
258+
display: block;
259+
}
260+
261+
.app-pharmacy-users-actions a + a {
262+
margin-top: nhsuk-spacing(1);
263+
}
264+
265+
@media (max-width: 1200px) {
266+
.app-pharmacy-layout-nav,
267+
.app-pharmacy-layout-content {
268+
float: none;
269+
width: 100%;
270+
}
271+
272+
.app-pharmacy-layout-nav {
273+
margin-bottom: nhsuk-spacing(4);
274+
}
275+
}
276+
277+
@container pharmacy-users-table (max-width: 700px) {
278+
.app-pharmacy-users-table {
279+
min-width: 0;
280+
}
281+
282+
.app-pharmacy-users-table thead {
283+
display: none;
284+
}
285+
286+
.app-pharmacy-users-table,
287+
.app-pharmacy-users-table tbody,
288+
.app-pharmacy-users-table tr,
289+
.app-pharmacy-users-table td {
290+
display: block;
291+
width: 100%;
292+
}
293+
294+
.app-pharmacy-users-table tr {
295+
box-sizing: border-box;
296+
border-bottom: 1px solid $nhsuk-border-colour;
297+
margin-bottom: nhsuk-spacing(3);
298+
padding-bottom: nhsuk-spacing(2);
299+
}
300+
301+
.app-pharmacy-users-table td {
302+
border-bottom: 0;
303+
min-width: 0;
304+
padding: nhsuk-spacing(1) 0;
305+
}
306+
307+
.app-pharmacy-users-table td::before {
308+
content: attr(data-label);
309+
display: block;
310+
font-weight: 700;
311+
margin-bottom: 2px;
312+
}
313+
314+
.app-pharmacy-users-actions a {
315+
display: inline;
316+
margin-right: nhsuk-spacing(3);
317+
}
318+
319+
.app-pharmacy-users-actions a + a {
320+
margin-top: 0;
321+
}
322+
}
323+
324+
@include nhsuk-media-query($from: tablet) {
325+
.app-pharmacy-users-table {
326+
min-width: 760px;
327+
}
328+
329+
.app-section-navigation--vertical {
330+
margin-right: -#{nhsuk-spacing(2)};
331+
margin-left: -#{nhsuk-spacing(2)};
332+
}
333+
}

app/components/secondary-navigation/_secondary-navigation.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,32 @@
6262
padding-bottom: nhsuk-spacing(4) - $_current-link-border-width;
6363
}
6464
}
65+
66+
.app-secondary-navigation--side {
67+
border-bottom: 0;
68+
border-left: 4px solid $nhsuk-border-colour;
69+
margin-bottom: nhsuk-spacing(6);
70+
padding-left: nhsuk-spacing(3);
71+
}
72+
73+
.app-secondary-navigation--side .app-secondary-navigation__list {
74+
@include nhsuk-font(19);
75+
76+
display: block;
77+
margin-bottom: 0;
78+
}
79+
80+
.app-secondary-navigation--side .app-secondary-navigation__list-item {
81+
margin: 0 0 nhsuk-spacing(2);
82+
padding: 0;
83+
}
84+
85+
.app-secondary-navigation--side .app-secondary-navigation__list-item:not(:last-child) {
86+
margin-right: 0;
87+
}
88+
89+
.app-secondary-navigation--side .app-secondary-navigation__list-item--current {
90+
border-left-width: $_current-link-border-width;
91+
margin-left: ((nhsuk-spacing(2) + $_current-link-border-width) * -1);
92+
padding-left: nhsuk-spacing(2);
93+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% macro xGovukSecondaryNavigation(params) %}
2+
{%- include "./template.njk" -%}
3+
{% endmacro %}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% from "../../../node_modules/nhsuk-frontend/dist/nhsuk/macros/attributes.njk" import nhsukAttributes %}
2+
3+
<nav class="x-govuk-secondary-navigation {%- if params.classes %} {{ params.classes }}{% endif -%}" {% if params.labelledBy %}aria-labelledby="{{ params.labelledBy }}"{% else %}aria-label="{{ params.visuallyHiddenTitle or "Secondary menu" }}"{% endif %}
4+
{{- nhsukAttributes(params.attributes) }}>
5+
<ul class="x-govuk-secondary-navigation__list">
6+
{% for item in params.items %}
7+
{% if item %}
8+
<li class="x-govuk-secondary-navigation__list-item{{ " x-govuk-secondary-navigation__list-item--current" if item.current }}{% if item.classes %} {{ item.classes }}{% endif -%}">
9+
<a class="x-govuk-secondary-navigation__link" href="{{ item.href }}"{{ " aria-current=page" if item.current }}>
10+
{{- item.text -}}
11+
</a>
12+
</li>
13+
{% endif %}
14+
{% endfor %}
15+
</ul>
16+
</nav>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% macro xGovukSubNavigation(params) %}
2+
{%- include "./template.njk" -%}
3+
{% endmacro %}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% from "../../../node_modules/nhsuk-frontend/dist/nhsuk/macros/attributes.njk" import nhsukAttributes -%}
2+
3+
<nav class="x-govuk-sub-navigation{%- if params.classes %} {{ params.classes }}{% endif %}" aria-labelledby="sub-navigation-heading"
4+
{{- nhsukAttributes(params.attributes) }}>
5+
<h2 class="nhsuk-u-visually-hidden" id="sub-navigation-heading">{{ params.visuallyHiddenTitle or "Pages in this section" }}</h2>
6+
{% for theme, items in params.items | groupby("theme") %}
7+
{% if theme != "undefined" %}
8+
<h3 class="x-govuk-sub-navigation__theme">
9+
{{- theme -}}
10+
</h3>
11+
{% endif %}
12+
<ul class="x-govuk-sub-navigation__section">
13+
{% for item in items %}
14+
{% if item %}
15+
<li class="x-govuk-sub-navigation__section-item{% if item.parent or item.current %} x-govuk-sub-navigation__section-item--current{% endif %}">
16+
<a class="x-govuk-sub-navigation__link" href="{{ item.href }}"{% if item.current %} aria-current="true"{% endif %}>{{ item.text }}</a>
17+
{% if item.parent and item.children | length > 0 %}
18+
<ul class="x-govuk-sub-navigation__section x-govuk-sub-navigation__section--nested">
19+
{% for child in item.children %}
20+
<li class="x-govuk-sub-navigation__section-item">
21+
<a class="x-govuk-sub-navigation__link" href="{{ child.href }}"{% if child.current %} aria-current="true"{% endif %}>
22+
{{- child.text -}}
23+
</a>
24+
</li>
25+
{% endfor %}
26+
</ul>
27+
{% endif %}
28+
</li>
29+
{% endif %}
30+
{% endfor %}
31+
</ul>
32+
{% endfor %}
33+
</nav>

app/data/organisations.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ module.exports = [
186186
},
187187
{
188188
id: "RVL",
189-
name: "Barnet and chase farm Hospitals NHS Trust",
189+
name: "Barnet and Chase Farm Hospitals NHS Trust",
190190
address: {
191-
line1: "Barnet General hospital",
191+
line1: "Barnet General Hospital",
192192
town: "Barnet",
193193
postcode: "EN5 3DJ"
194194
},
@@ -222,7 +222,7 @@ module.exports = [
222222
},
223223
{
224224
id: "RRP",
225-
name: "Barnet, enfield and haringey mental Health NHS Trust",
225+
name: "Barnet, Enfield and Haringey Mental Health NHS Trust",
226226
address: {
227227
line1: "Trust headquarters block b2",
228228
town: "London",
@@ -240,7 +240,7 @@ module.exports = [
240240
},
241241
{
242242
id: "RCN",
243-
name: "Barnsley Community and priority services NHS Trust",
243+
name: "Barnsley Community and Priority Services NHS Trust",
244244
address: {
245245
line1: "Kendray hospital",
246246
town: "Barnsley",
@@ -7694,7 +7694,7 @@ module.exports = [
76947694
id: "RDC",
76957695
name: "Wellhouse NHS Trust",
76967696
address: {
7697-
line1: "Barnet hospital",
7697+
line1: "Barnet Hospital",
76987698
town: "Barnet",
76997699
postcode: "EN5 3DJ"
77007700
},

0 commit comments

Comments
 (0)