@comicrelief/component-library 8.12.1 → 8.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/components/Atoms/SocialIcons/Icon/Icon.js +50 -8
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -1
- package/dist/components/Atoms/SocialIcons/Utils/Links.js +8 -4
- package/dist/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +15 -117
- package/dist/components/Molecules/Logos/Logos.js +37 -15
- package/dist/components/Molecules/ShareButton/ShareButton.js +2 -1
- package/dist/components/Molecules/ShareButton/ShareButton.test.js +2 -2
- package/dist/components/Organisms/Footer/Nav/Nav.js +3 -3
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +155 -189
- package/dist/components/Organisms/Header/Header.md +4 -0
- package/dist/components/Organisms/Header/HeaderNav/HeaderNav.js +163 -0
- package/dist/components/Organisms/Header/HeaderNav/HeaderNav.style.js +237 -0
- package/dist/components/Organisms/Header/HeaderNav/Menu-Group-Icon.svg +3 -0
- package/dist/components/Organisms/Header/HeaderNav/arrow-right.png +0 -0
- package/dist/components/Organisms/Header/HeaderNav/arrow.svg +6 -0
- package/dist/components/Organisms/Header/HeaderNav/chevron-down.svg +3 -0
- package/dist/components/Organisms/Header/Nav/Nav.js +3 -3
- package/dist/components/Organisms/Header/annoying.css +14 -0
- package/dist/components/Organisms/Header/assets/Post.svg +3 -0
- package/dist/components/Organisms/Header/data/data-extended.js +236 -0
- package/dist/components/Organisms/Header/data/data-live.js +126 -0
- package/dist/components/Organisms/Header2025/Burger/BurgerMenu.js +28 -0
- package/dist/components/Organisms/Header2025/Burger/BurgerMenu.style.js +76 -0
- package/dist/components/Organisms/Header2025/Header2025.js +40 -0
- package/dist/components/Organisms/Header2025/Header2025.md +665 -0
- package/dist/components/Organisms/Header2025/Header2025.style.js +72 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +176 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +308 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/HeaderNavItem2025.js +79 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/Menu-Group-Icon.svg +3 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/MoreNav.js +93 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/MoreNav.style.js +108 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/arrow-right.png +0 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/arrow.svg +6 -0
- package/dist/components/Organisms/Header2025/HeaderNav2025/chevron-down.svg +3 -0
- package/dist/components/Organisms/Header2025/annoying.css +14 -0
- package/dist/components/Organisms/Header2025/assets/PayIn.svg +3 -0
- package/dist/components/Organisms/Header2025/assets/Post.svg +3 -0
- package/dist/components/Organisms/Header2025/assets/icon--mail--2023.svg +3 -0
- package/dist/components/Organisms/Header2025/assets/icon--search--2023.svg +3 -0
- package/dist/components/Organisms/Header2025/assets/icon--shop--2023.svg +3 -0
- package/dist/components/Organisms/Header2025/data/data-extended.js +236 -0
- package/dist/components/Organisms/Header2025/data/data-live--minimal.js +70 -0
- package/dist/components/Organisms/Header2025/data/data-live.js +126 -0
- package/dist/components/Organisms/Header2025/data/data.js +156 -0
- package/dist/components/Organisms/Header2025/header2025.test.js +25 -0
- package/dist/index.js +7 -0
- package/dist/styleguide/data/data.js +19 -19
- package/dist/theme/shared/allBreakpoints.js +1 -0
- package/dist/utils/navHelper.js +24 -2
- package/package.json +1 -1
- package/playwright.config.js +13 -6
- package/src/components/Atoms/SocialIcons/Icon/Icon.js +84 -5
- package/src/components/Atoms/SocialIcons/SocialIcons.js +1 -0
- package/src/components/Atoms/SocialIcons/Utils/Links.js +8 -4
- package/src/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +15 -117
- package/src/components/Molecules/Logos/Logos.js +35 -15
- package/src/components/Molecules/ShareButton/ShareButton.js +1 -0
- package/src/components/Molecules/ShareButton/ShareButton.test.js +8 -32
- package/src/components/Organisms/Footer/Nav/Nav.js +2 -2
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +155 -189
- package/src/components/Organisms/Header/Header.md +4 -0
- package/src/components/Organisms/Header/HeaderNav/HeaderNav.js +213 -0
- package/src/components/Organisms/Header/HeaderNav/HeaderNav.style.js +391 -0
- package/src/components/Organisms/Header/HeaderNav/Menu-Group-Icon.svg +3 -0
- package/src/components/Organisms/Header/HeaderNav/arrow-right.png +0 -0
- package/src/components/Organisms/Header/HeaderNav/arrow.svg +6 -0
- package/src/components/Organisms/Header/HeaderNav/chevron-down.svg +3 -0
- package/src/components/Organisms/Header/Nav/Nav.js +1 -1
- package/src/components/Organisms/Header/annoying.css +14 -0
- package/src/components/Organisms/Header/assets/Post.svg +3 -0
- package/src/components/Organisms/Header/data/data-extended.js +280 -0
- package/src/components/Organisms/Header/data/data-live.js +149 -0
- package/src/components/Organisms/Header2025/Burger/BurgerMenu.js +28 -0
- package/src/components/Organisms/Header2025/Burger/BurgerMenu.style.js +99 -0
- package/src/components/Organisms/Header2025/Header2025.js +62 -0
- package/src/components/Organisms/Header2025/Header2025.md +665 -0
- package/src/components/Organisms/Header2025/Header2025.style.js +131 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.js +193 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNav2025.style.js +462 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/HeaderNavItem2025.js +142 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/Menu-Group-Icon.svg +3 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/MoreNav.js +171 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/MoreNav.style.js +190 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/arrow-right.png +0 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/arrow.svg +6 -0
- package/src/components/Organisms/Header2025/HeaderNav2025/chevron-down.svg +3 -0
- package/src/components/Organisms/Header2025/annoying.css +14 -0
- package/src/components/Organisms/Header2025/assets/PayIn.svg +3 -0
- package/src/components/Organisms/Header2025/assets/Post.svg +3 -0
- package/src/components/Organisms/Header2025/assets/icon--mail--2023.svg +3 -0
- package/src/components/Organisms/Header2025/assets/icon--search--2023.svg +3 -0
- package/src/components/Organisms/Header2025/assets/icon--shop--2023.svg +3 -0
- package/src/components/Organisms/Header2025/data/data-extended.js +280 -0
- package/src/components/Organisms/Header2025/data/data-live--minimal.js +79 -0
- package/src/components/Organisms/Header2025/data/data-live.js +149 -0
- package/src/components/Organisms/Header2025/data/data.js +184 -0
- package/src/components/Organisms/Header2025/header2025.test.js +23 -0
- package/src/index.js +1 -0
- package/src/styleguide/data/data.js +19 -19
- package/src/theme/shared/allBreakpoints.js +1 -0
- package/src/utils/navHelper.js +24 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Header',
|
|
3
|
+
menuGroups: [
|
|
4
|
+
{
|
|
5
|
+
title: 'GROUP1',
|
|
6
|
+
id: 'group1',
|
|
7
|
+
links: [
|
|
8
|
+
{
|
|
9
|
+
title: 'Sport Relief',
|
|
10
|
+
path: 'https://www.comicrelief.com/fundraising/pay-in-your-money',
|
|
11
|
+
internal: {
|
|
12
|
+
type: 'ContentfulPageLandingPage'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: 'Run 30 Miles in June',
|
|
17
|
+
path: 'https://www.comicrelief.com/rednoseday',
|
|
18
|
+
internal: {
|
|
19
|
+
type: 'ContentfulPageLandingPage'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Be a Good Sport: Schools',
|
|
24
|
+
path: 'https://www.comicrelief.com/join',
|
|
25
|
+
internal: {
|
|
26
|
+
type: 'ContentfulPageLandingPage'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: 'Win a trip to New York with Major League Baseball',
|
|
31
|
+
path: 'https://www.comicrelief.com/squads',
|
|
32
|
+
internal: {
|
|
33
|
+
type: 'ContentfulPageLandingPage'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: 'GROUP2',
|
|
40
|
+
id: 'group2',
|
|
41
|
+
links: [
|
|
42
|
+
{
|
|
43
|
+
title: 'Red Nose Day',
|
|
44
|
+
path: 'https://www.comicrelief.com/rednoseday/schools',
|
|
45
|
+
internal: {
|
|
46
|
+
type: 'ContentfulPageLandingPage'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: 'The New Red Nose',
|
|
51
|
+
path: 'https://www.comicrelief.com/rednoseday/schools',
|
|
52
|
+
internal: {
|
|
53
|
+
type: 'ContentfulPageLandingPage'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: 'Schools',
|
|
58
|
+
path: 'https://www.comicrelief.com/rednoseday/schools',
|
|
59
|
+
internal: {
|
|
60
|
+
type: 'ContentfulPageLandingPage'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'The Red Nose Day Nosey Awards',
|
|
65
|
+
path: 'https://www.comicrelief.com/rednoseday/schools',
|
|
66
|
+
internal: {
|
|
67
|
+
type: 'ContentfulPageLandingPage'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: 'GROUP3',
|
|
74
|
+
id: 'group3',
|
|
75
|
+
links: [
|
|
76
|
+
{
|
|
77
|
+
title: 'Funding',
|
|
78
|
+
path: 'https://www.comicrelief.com/what-your-money-does',
|
|
79
|
+
internal: {
|
|
80
|
+
type: 'ContentfulPageLandingPage'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: 'Our Funding Practice',
|
|
85
|
+
path: 'https://www.comicrelief.com/our-legacy',
|
|
86
|
+
internal: {
|
|
87
|
+
type: 'ContentfulPageLandingPage'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Funding opportunities',
|
|
92
|
+
path: 'https://www.comicrelief.com/our-legacy',
|
|
93
|
+
internal: {
|
|
94
|
+
type: 'ContentfulPageLandingPage'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: 'Our Funding strategy',
|
|
99
|
+
path: 'https://www.comicrelief.com/our-legacy',
|
|
100
|
+
internal: {
|
|
101
|
+
type: 'ContentfulPageLandingPage'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
title: 'Managing your funding',
|
|
106
|
+
path: 'https://www.comicrelief.com/our-legacy',
|
|
107
|
+
internal: {
|
|
108
|
+
type: 'ContentfulPageLandingPage'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: 'GROUP4',
|
|
115
|
+
id: 'group4',
|
|
116
|
+
links: [
|
|
117
|
+
{
|
|
118
|
+
title: 'What Your Money Does',
|
|
119
|
+
path:
|
|
120
|
+
'https://www.comicrelief.com/rednoseday/schools/primary-schools',
|
|
121
|
+
internal: {
|
|
122
|
+
type: 'ContentfulPageLandingPage'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'Reports & Publications',
|
|
127
|
+
path:
|
|
128
|
+
'https://www.comicrelief.com/rednoseday/schools/secondary-schools',
|
|
129
|
+
internal: {
|
|
130
|
+
type: 'ContentfulPageLandingPage'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: 'GROUP5',
|
|
137
|
+
id: 'group5',
|
|
138
|
+
links: [
|
|
139
|
+
{
|
|
140
|
+
title: 'Get Involved',
|
|
141
|
+
url: 'https://www.comicrelief.com/working-with-us/',
|
|
142
|
+
internal: {
|
|
143
|
+
type: 'ContentfulComponentLink'
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
title: 'Do your own fundraising',
|
|
148
|
+
url: 'https://www.comicrelief.com/404/',
|
|
149
|
+
internal: {
|
|
150
|
+
type: 'ContentfulComponentLink'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: 'Regular Donations',
|
|
155
|
+
url: 'https://www.comicrelief.com/404/',
|
|
156
|
+
internal: {
|
|
157
|
+
type: 'ContentfulComponentLink'
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
title: 'Run for Comic Relief',
|
|
162
|
+
url: 'https://www.comicrelief.com/404/',
|
|
163
|
+
internal: {
|
|
164
|
+
type: 'ContentfulComponentLink'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
title: 'How to pay in your fundraising money',
|
|
169
|
+
url: 'https://www.comicrelief.com/404/',
|
|
170
|
+
internal: {
|
|
171
|
+
type: 'ContentfulComponentLink'
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
title: 'Partners',
|
|
176
|
+
url: 'https://www.comicrelief.com/404/',
|
|
177
|
+
internal: {
|
|
178
|
+
type: 'ContentfulComponentLink'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
title: 'GROUP6',
|
|
185
|
+
id: 'group6',
|
|
186
|
+
links: [
|
|
187
|
+
{
|
|
188
|
+
title: 'Something Here',
|
|
189
|
+
url: 'https://www.comicrelief.com/working-with-us/',
|
|
190
|
+
internal: {
|
|
191
|
+
type: 'ContentfulComponentLink'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
title: 'Do your own fundraising',
|
|
196
|
+
url: 'https://www.comicrelief.com/404/',
|
|
197
|
+
internal: {
|
|
198
|
+
type: 'ContentfulComponentLink'
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: 'Regular Donations',
|
|
203
|
+
url: 'https://www.comicrelief.com/404/',
|
|
204
|
+
internal: {
|
|
205
|
+
type: 'ContentfulComponentLink'
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: 'Run for Comic Relief',
|
|
210
|
+
url: 'https://www.comicrelief.com/404/',
|
|
211
|
+
internal: {
|
|
212
|
+
type: 'ContentfulComponentLink'
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
title: 'How to pay in your fundraising money',
|
|
217
|
+
url: 'https://www.comicrelief.com/404/',
|
|
218
|
+
internal: {
|
|
219
|
+
type: 'ContentfulComponentLink'
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
title: 'Partners',
|
|
224
|
+
url: 'https://www.comicrelief.com/404/',
|
|
225
|
+
internal: {
|
|
226
|
+
type: 'ContentfulComponentLink'
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
title: 'GROUP7',
|
|
233
|
+
id: 'group7',
|
|
234
|
+
links: [
|
|
235
|
+
{
|
|
236
|
+
title: 'Something Else',
|
|
237
|
+
url: 'https://www.comicrelief.com/working-with-us/',
|
|
238
|
+
internal: {
|
|
239
|
+
type: 'ContentfulComponentLink'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
title: 'Do your own fundraising',
|
|
244
|
+
url: 'https://www.comicrelief.com/404/',
|
|
245
|
+
internal: {
|
|
246
|
+
type: 'ContentfulComponentLink'
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
title: 'Regular Donations',
|
|
251
|
+
url: 'https://www.comicrelief.com/404/',
|
|
252
|
+
internal: {
|
|
253
|
+
type: 'ContentfulComponentLink'
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
title: 'Run for Comic Relief',
|
|
258
|
+
url: 'https://www.comicrelief.com/404/',
|
|
259
|
+
internal: {
|
|
260
|
+
type: 'ContentfulComponentLink'
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
title: 'How to pay in your fundraising money',
|
|
265
|
+
url: 'https://www.comicrelief.com/404/',
|
|
266
|
+
internal: {
|
|
267
|
+
type: 'ContentfulComponentLink'
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
title: 'Partners',
|
|
272
|
+
url: 'https://www.comicrelief.com/404/',
|
|
273
|
+
internal: {
|
|
274
|
+
type: 'ContentfulComponentLink'
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Header',
|
|
3
|
+
menuGroups: [
|
|
4
|
+
{
|
|
5
|
+
title: 'GROUP1',
|
|
6
|
+
id: 'group1',
|
|
7
|
+
links: [
|
|
8
|
+
{
|
|
9
|
+
title: 'Winter Appeal 2024',
|
|
10
|
+
path: 'https://www.comicrelief.com/winterappeal/',
|
|
11
|
+
internal: {
|
|
12
|
+
type: 'ContentfulPageLandingPage'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: 'GROUP2',
|
|
19
|
+
id: 'group2',
|
|
20
|
+
links: [
|
|
21
|
+
{
|
|
22
|
+
title: 'Red Nose Day',
|
|
23
|
+
path: 'https://www.comicrelief.com/rednoseday/schools',
|
|
24
|
+
internal: {
|
|
25
|
+
type: 'ContentfulPageLandingPage'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: 'Billy Monger: The Race is On',
|
|
30
|
+
path: 'https://www.comicrelief.com/rednoseday/challenges/billy',
|
|
31
|
+
internal: {
|
|
32
|
+
type: 'ContentfulPageLandingPage'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: 'GROUP3',
|
|
39
|
+
id: 'group3',
|
|
40
|
+
links: [
|
|
41
|
+
{
|
|
42
|
+
title: 'Funding',
|
|
43
|
+
path: 'https://www.comicrelief.com/what-your-money-does',
|
|
44
|
+
internal: {
|
|
45
|
+
type: 'ContentfulPageLandingPage'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: 'Our Funding Practice',
|
|
50
|
+
path: 'https://www.comicrelief.com/our-legacy-two',
|
|
51
|
+
internal: {
|
|
52
|
+
type: 'ContentfulPageLandingPage'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: 'Funding opportunities',
|
|
57
|
+
path: 'https://www.comicrelief.com/our-legacy-three',
|
|
58
|
+
internal: {
|
|
59
|
+
type: 'ContentfulPageLandingPage'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: 'Our Funding strategy',
|
|
64
|
+
path: 'https://www.comicrelief.com/our-legacy-four',
|
|
65
|
+
internal: {
|
|
66
|
+
type: 'ContentfulPageLandingPage'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: 'Managing your funding',
|
|
71
|
+
path: 'https://www.comicrelief.com/our-legacy-five',
|
|
72
|
+
internal: {
|
|
73
|
+
type: 'ContentfulPageLandingPage'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: 'GROUP4',
|
|
80
|
+
id: 'group4',
|
|
81
|
+
links: [
|
|
82
|
+
{
|
|
83
|
+
title: 'What Your Money Does',
|
|
84
|
+
path:
|
|
85
|
+
'https://www.comicrelief.com/rednoseday/schools/primary-schools',
|
|
86
|
+
internal: {
|
|
87
|
+
type: 'ContentfulPageLandingPage'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Reports & Publications',
|
|
92
|
+
path:
|
|
93
|
+
'https://www.comicrelief.com/rednoseday/schools/secondary-schools',
|
|
94
|
+
internal: {
|
|
95
|
+
type: 'ContentfulPageLandingPage'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'GROUP5',
|
|
102
|
+
id: 'group5',
|
|
103
|
+
links: [
|
|
104
|
+
{
|
|
105
|
+
title: 'Get Involved',
|
|
106
|
+
url: 'https://www.comicrelief.com/working-with-us/',
|
|
107
|
+
internal: {
|
|
108
|
+
type: 'ContentfulComponentLink'
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
title: 'Do your own fundraising',
|
|
113
|
+
url: 'https://www.comicrelief.com/one/',
|
|
114
|
+
internal: {
|
|
115
|
+
type: 'ContentfulComponentLink'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: 'Regular Donations',
|
|
120
|
+
url: 'https://www.comicrelief.com/two/',
|
|
121
|
+
internal: {
|
|
122
|
+
type: 'ContentfulComponentLink'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'Run for Comic Relief',
|
|
127
|
+
url: 'https://www.comicrelief.com/three/',
|
|
128
|
+
internal: {
|
|
129
|
+
type: 'ContentfulComponentLink'
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: 'How to pay in your fundraising money',
|
|
134
|
+
url: 'https://www.comicrelief.com/four/',
|
|
135
|
+
internal: {
|
|
136
|
+
type: 'ContentfulComponentLink'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
title: 'Partners',
|
|
141
|
+
url: 'https://www.comicrelief.com/five/',
|
|
142
|
+
internal: {
|
|
143
|
+
type: 'ContentfulComponentLink'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { BurgerBar, BurgerHiddenText, BurgerWrapper } from './BurgerMenu.style';
|
|
6
|
+
|
|
7
|
+
const BurgerMenu = ({ toggle, isExpandable }) => (
|
|
8
|
+
<BurgerWrapper
|
|
9
|
+
href="#"
|
|
10
|
+
role="button"
|
|
11
|
+
aria-haspopup="true"
|
|
12
|
+
aria-label="Open and close Navigation Menu"
|
|
13
|
+
inline
|
|
14
|
+
underline={false}
|
|
15
|
+
onClick={toggle}
|
|
16
|
+
isExpandable={isExpandable}
|
|
17
|
+
>
|
|
18
|
+
<BurgerHiddenText>Open and close nav menu</BurgerHiddenText>
|
|
19
|
+
<BurgerBar />
|
|
20
|
+
</BurgerWrapper>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
BurgerMenu.propTypes = {
|
|
24
|
+
toggle: PropTypes.func.isRequired,
|
|
25
|
+
isExpandable: PropTypes.bool.isRequired
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default BurgerMenu;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import hideVisually from '../../../../theme/shared/hideVisually';
|
|
4
|
+
import Link from '../../../Atoms/Link/Link';
|
|
5
|
+
import Text from '../../../Atoms/Text/Text';
|
|
6
|
+
import zIndex from '../../../../theme/shared/zIndex';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Burger hidden text
|
|
10
|
+
*/
|
|
11
|
+
const BurgerHiddenText = styled(Text)`
|
|
12
|
+
${hideVisually};
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Burger menu bar
|
|
17
|
+
*/
|
|
18
|
+
const BurgerBar = styled.span`
|
|
19
|
+
background-color: ${({ theme }) => theme.color('deep_violet_dark')};
|
|
20
|
+
margin: 0 auto;
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Burger wrapper
|
|
25
|
+
*/
|
|
26
|
+
const BurgerWrapper = styled(Link)`
|
|
27
|
+
${zIndex('medium')};
|
|
28
|
+
order: 50;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
position: relative;
|
|
32
|
+
text-indent: -9999px;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
height: 100%;
|
|
35
|
+
width: 45px;
|
|
36
|
+
left: 5px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition: all 0.2s;
|
|
39
|
+
|
|
40
|
+
:hover {
|
|
41
|
+
border: none;
|
|
42
|
+
font-weight: inherit;
|
|
43
|
+
}
|
|
44
|
+
${BurgerBar} {
|
|
45
|
+
position: relative;
|
|
46
|
+
|
|
47
|
+
&,
|
|
48
|
+
::before,
|
|
49
|
+
::after {
|
|
50
|
+
width: 25px;
|
|
51
|
+
height: 3px;
|
|
52
|
+
border-radius: 3px;
|
|
53
|
+
display: inline-block;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${({ isExpandable }) => isExpandable && ' background-color: transparent'};
|
|
57
|
+
|
|
58
|
+
::before,
|
|
59
|
+
::after {
|
|
60
|
+
content: '';
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: 0;
|
|
63
|
+
background-color: currentColor;
|
|
64
|
+
transition: all 0.2s;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
::before {
|
|
68
|
+
top: -0.5rem;
|
|
69
|
+
${({ isExpandable }) => isExpandable && ' transform:rotate(135deg); top: 0;'};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
::after {
|
|
73
|
+
top: 0.5rem;
|
|
74
|
+
${({ isExpandable }) => isExpandable && ' transform:rotate(-135deg); top: 0;'};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:hover ${BurgerBar} {
|
|
79
|
+
&,
|
|
80
|
+
::before,
|
|
81
|
+
::after {
|
|
82
|
+
background-color: ${({ theme, isExpandable }) => !isExpandable && theme.color('grey')};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
::before {
|
|
86
|
+
${({ isExpandable }) => !isExpandable && 'top: -0.6rem;'};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
::after {
|
|
90
|
+
${({ isExpandable }) => !isExpandable && 'top: 0.6rem;'};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media ${({ theme }) => theme.allBreakpoints('Nav')} {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
export { BurgerHiddenText, BurgerWrapper, BurgerBar };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import Logos from '../../Molecules/Logos/Logos';
|
|
5
|
+
import HeaderNav2025 from './HeaderNav2025/HeaderNav2025';
|
|
6
|
+
import {
|
|
7
|
+
Brand, Header2025Wrapper, InnerWrapper,
|
|
8
|
+
DonateButtonWrapperTop, Header2025MetaIcons, ButtonsAndIcons
|
|
9
|
+
} from './Header2025.style';
|
|
10
|
+
|
|
11
|
+
const Header2025 = ({
|
|
12
|
+
navItems = {}, metaIcons, campaign = 'Comic Relief', donateButton = null, characterLimit = 60, ...rest
|
|
13
|
+
}) => (
|
|
14
|
+
<Header2025Wrapper navItems {...rest}>
|
|
15
|
+
<InnerWrapper>
|
|
16
|
+
<Brand>
|
|
17
|
+
<Logos
|
|
18
|
+
campaign={campaign}
|
|
19
|
+
sizeSm="50px"
|
|
20
|
+
sizeMd="55px"
|
|
21
|
+
animateRotate
|
|
22
|
+
/>
|
|
23
|
+
</Brand>
|
|
24
|
+
<HeaderNav2025
|
|
25
|
+
navItems={navItems}
|
|
26
|
+
metaIcons={metaIcons}
|
|
27
|
+
donateButton={donateButton}
|
|
28
|
+
characterLimit={characterLimit}
|
|
29
|
+
/>
|
|
30
|
+
<ButtonsAndIcons>
|
|
31
|
+
<Header2025MetaIcons isHeader data-testid="meta-icons--desktop">{metaIcons}</Header2025MetaIcons>
|
|
32
|
+
<DonateButtonWrapperTop data-testid="donate-button--desktop">{donateButton}</DonateButtonWrapperTop>
|
|
33
|
+
</ButtonsAndIcons>
|
|
34
|
+
|
|
35
|
+
</InnerWrapper>
|
|
36
|
+
</Header2025Wrapper>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
Header2025.propTypes = {
|
|
40
|
+
navItems: PropTypes.shape({
|
|
41
|
+
title: PropTypes.string.isRequired,
|
|
42
|
+
menuGroups: PropTypes.arrayOf(
|
|
43
|
+
PropTypes.shape({
|
|
44
|
+
id: PropTypes.string.isRequired,
|
|
45
|
+
links: PropTypes.arrayOf(
|
|
46
|
+
PropTypes.shape({
|
|
47
|
+
title: PropTypes.string.isRequired,
|
|
48
|
+
url: PropTypes.string
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
})
|
|
52
|
+
)
|
|
53
|
+
}),
|
|
54
|
+
// NB: metaIcons no longer include the Donate button:
|
|
55
|
+
metaIcons: PropTypes.node.isRequired,
|
|
56
|
+
// ... and is supplied separately to allow more render control:
|
|
57
|
+
donateButton: PropTypes.node,
|
|
58
|
+
campaign: PropTypes.string,
|
|
59
|
+
characterLimit: PropTypes.number
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default Header2025;
|