Skip to content

Commit 57793bc

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/nhsuk-frontend-10.4.1
2 parents 3295b54 + 3594fd7 commit 57793bc

19 files changed

Lines changed: 1214 additions & 382 deletions

app/assets/sass/main.scss

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Import NHS.UK frontend library
22
@forward "nhsuk-frontend/dist/nhsuk/nhsuk";
3+
@use "nhsuk-frontend/dist/nhsuk/core" as *;
34

45
// Stolen Manage prototype components :P
56
// https://github.com/NHSDigital/manage-breast-screening-prototype
@@ -12,3 +13,99 @@
1213
justify-content: space-between;
1314
align-items: baseline;
1415
}
16+
17+
// Batch (for now) view bar charts and legends
18+
19+
:root {
20+
--generic-chart-hatch: repeating-linear-gradient(45deg, #005eb8, #005eb8 1px, #ccdff1 1px, #ccdff1 12px);
21+
--standard-chart-hatch: repeating-linear-gradient(45deg, #004c23, #004c23 1px, #cce5d8 1px, #cce5d8 12px);
22+
--special-chart-hatch: repeating-linear-gradient(-45deg, #4d3708, #4d3708 1px, #ffdc8e 1px, #ffdc8e 12px);
23+
--vhr-chart-hatch-1: repeating-linear-gradient(-45deg, #6b140e, #6b140e 1px, transparent 1px, transparent 12px);
24+
--vhr-chart-hatch-2: repeating-linear-gradient(45deg, #6b140e, #6b140e 1px, #f7d4d1 1px, #f7d4d1 12px);
25+
}
26+
27+
.hatching--standard {
28+
background: var(--standard-chart-hatch)
29+
}
30+
.hatching--special {
31+
background: var(--special-chart-hatch),
32+
}
33+
.hatching--high-risk {
34+
background: var(--vhr-chart-hatch-1), var(--vhr-chart-hatch-2)
35+
}
36+
37+
.app-chart-bar-segmented-horizontal {
38+
margin: 0;
39+
/* Turn the table tbody into a single horizontal bar */
40+
tbody {
41+
display: flex;
42+
width: 100%;
43+
height: 3rem;
44+
overflow: hidden;
45+
}
46+
/* Each row becomes a segment, sized by its proportion of the total */
47+
tbody tr {
48+
display: flex;
49+
align-items: center;
50+
justify-content: left;
51+
overflow: hidden;
52+
}
53+
}
54+
.app-chart-bar-segmented-horizontal--legend {
55+
@include nhsuk-media-query($from: tablet) {
56+
display: flex;
57+
flex-direction: row;
58+
flex-wrap: wrap;
59+
gap: 1.5rem;
60+
align-items: flex-start;
61+
62+
li {
63+
display: flex;
64+
flex-direction: row;
65+
align-items: flex-start;
66+
gap: 8px;
67+
}
68+
}
69+
.swatch {
70+
display: inline-block;
71+
width: 2rem;
72+
height: 2rem;
73+
flex-shrink: 0;
74+
margin-right: 6px;
75+
vertical-align: middle;
76+
}
77+
}
78+
79+
.app-batch-overview-sparkline {
80+
background-color: #fff;
81+
}
82+
.app-u-one-left-one-right {
83+
display: flex;
84+
justify-content: space-between;
85+
align-items: center;
86+
width: 100%;
87+
}
88+
89+
.app-simple-progress-bar {
90+
width: 100%;
91+
min-width: 200px;
92+
height: 3rem;
93+
94+
&.--thin {
95+
height: auto;
96+
}
97+
98+
&.--generic {
99+
background: var(--generic-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff;
100+
}
101+
102+
&.--standard {
103+
background: var(--standard-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff;
104+
}
105+
&.--special {
106+
background: var(--special-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff;
107+
}
108+
&.--vhr {
109+
background: var(--vhr-chart-hatch-1) 0 0 / var(--percentage) 100% no-repeat, var(--vhr-chart-hatch-2) 0 0 / var(--percentage) 100% no-repeat,#fff;
110+
}
111+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{% from 'header/macro.njk' import header %}
2+
3+
{% macro primaryNavigation(activeItem, serviceName) %}
4+
{{ header({
5+
account: {
6+
items: [
7+
{
8+
text: "West Berkshire BSO"
9+
},
10+
{
11+
href: "#",
12+
text: "Thomas Pynchon",
13+
icon: true
14+
},
15+
{
16+
href: "/",
17+
text: "Log out"
18+
}
19+
]
20+
},
21+
service: {
22+
text: serviceName,
23+
href: "/"
24+
},
25+
navigation: {
26+
items: [
27+
{
28+
href: "#",
29+
text: "Dashboard",
30+
active: activeItem === "Dashboard"
31+
},
32+
{
33+
href: "/batches/",
34+
text: "Manage batches",
35+
active: activeItem === "Manage batches"
36+
},
37+
{
38+
href: "#",
39+
text: "Manage clinics",
40+
active: activeItem === "Manage clinics"
41+
},
42+
{
43+
href: "/bso-objects/",
44+
text: "Manage other stuff",
45+
active: activeItem === "Manage other stuff"
46+
},
47+
{
48+
href: "#",
49+
text: "Reports",
50+
active: activeItem === "Reports"
51+
}
52+
]
53+
}
54+
}) }}
55+
{% endmacro %}

0 commit comments

Comments
 (0)