File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {{ header({
2- account: {
3- items: [
4- {
5- text: "West Berkshire BSO"
6- },
7- {
8- href: "#",
9- text: "Thomas Pynchon",
10- icon: true
11- },
12- {
13- href: "/",
14- text: "Log out"
15- }
16- ]
17- },
18- service: {
19- text: serviceName,
20- href: "/"
21- },
22- navigation: {
23- items: [
24- {
25- href: "#",
26- text: "Dashboard"
27- },
28- {
29- href: "#",
30- text: "Manage batches"
31- },
32- {
33- href: "#",
34- text: "Manage clinics"
35- },
36- {
37- href: "#",
38- text: "Manage other stuff",
39- active: true
40- },
41- {
42- href: "#",
43- text: "Reports"
44- }
45- ]
46- }
47- }) }}
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: "#",
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: "#",
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 %}
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "West Berks mobile screening unit name" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage batches", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 2525 < link rel ="stylesheet " href ="https://unpkg.com/maplibre-gl@5.3.0/dist/maplibre-gl.css " />
2626{% endblock %}
2727
28+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2829{% block header %}
29- {% include "_includes/primary-navigation.html" % }
30+ {{ primaryNavigation("Manage other stuff", serviceName) } }
3031{% endblock %}
3132
3233<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "West Berkshire Screening Service" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "Manage other stuff" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "Units" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 2525 < link rel ="stylesheet " href ="https://unpkg.com/maplibre-gl@5.3.0/dist/maplibre-gl.css " />
2626{% endblock %}
2727
28+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2829{% block header %}
29- {% include "_includes/primary-navigation.html" % }
30+ {{ primaryNavigation("Manage other stuff", serviceName) } }
3031{% endblock %}
3132
3233<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "Camberwell Building" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "West Berks mobile screening unit name" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
Original file line number Diff line number Diff line change 1919-->
2020{% set pageName = "Units" %}
2121
22+ {% from "_includes/primary-navigation.html" import primaryNavigation %}
2223{% block header %}
23- {% include "_includes/primary-navigation.html" % }
24+ {{ primaryNavigation("Manage other stuff", serviceName) } }
2425{% endblock %}
2526
2627<!-- For adding a breadcrumb or back link -->
You can’t perform that action at this time.
0 commit comments