@newskit-render/mock 0.35.0

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.
@@ -0,0 +1,522 @@
1
+ const getContentLandingLead = {
2
+ id: "123a4567-e89b-12d3-a456-426655440001",
3
+ type: "collection",
4
+ attributes: {
5
+ title: "Landing Lead",
6
+ link: {
7
+ type: "hyperlink",
8
+ attributes: {
9
+ text: "See more",
10
+ url: "/section-one",
11
+ },
12
+ },
13
+ },
14
+ children: [
15
+ {
16
+ type: "slice",
17
+ attributes: {
18
+ name: "LEAD_1_FULL_WIDTH",
19
+ },
20
+ children: [
21
+ {
22
+ type: "article-reference-demo",
23
+ attributes: {
24
+ id: "17842504",
25
+ },
26
+ }
27
+ ],
28
+ },
29
+ {
30
+ type: "slice",
31
+ attributes: {
32
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
33
+ },
34
+ children: [
35
+ {
36
+ type: "article-reference-demo",
37
+ attributes: {
38
+ id: "17856463",
39
+ },
40
+ },
41
+ {
42
+ type: "article-reference-demo",
43
+ attributes: {
44
+ id: "17851099",
45
+ },
46
+ },
47
+ {
48
+ type: "article-reference-demo",
49
+ attributes: {
50
+ id: "17842387",
51
+ },
52
+ },
53
+ {
54
+ type: "article-reference-demo",
55
+ attributes: {
56
+ id: "17862461",
57
+ },
58
+ },
59
+ {
60
+ type: "article-reference-demo",
61
+ attributes: {
62
+ id: "17397556",
63
+ },
64
+ }
65
+ ],
66
+ },
67
+ {
68
+ type: "slice",
69
+ attributes: {
70
+ name: "SECONDARY_4",
71
+ },
72
+ children: [
73
+ {
74
+ type: "article-reference-demo",
75
+ attributes: {
76
+ id: "17861129",
77
+ },
78
+ },
79
+ {
80
+ type: "article-reference-demo",
81
+ attributes: {
82
+ id: "17814872",
83
+ },
84
+ },
85
+ {
86
+ type: "article-reference-demo",
87
+ attributes: {
88
+ id: "17867694",
89
+ },
90
+ },
91
+ {
92
+ type: "article-reference-demo",
93
+ attributes: {
94
+ id: "17863493",
95
+ },
96
+ }
97
+ ],
98
+ },
99
+ ],
100
+ };
101
+
102
+ const getContentSectionOne = {
103
+ id: "123a4567-e89b-12d3-a456-426655440002",
104
+ type: "collection",
105
+ attributes: {
106
+ title: "Section One",
107
+ link: {
108
+ type: "hyperlink",
109
+ attributes: {
110
+ text: "See more",
111
+ url: "/section-one",
112
+ },
113
+ },
114
+ },
115
+ children: [
116
+ {
117
+ type: "slice",
118
+ attributes: {
119
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
120
+ },
121
+ children: [
122
+ {
123
+ type: "article-reference-demo",
124
+ attributes: {
125
+ id: "18032190",
126
+ },
127
+ },
128
+ {
129
+ type: "article-reference-demo",
130
+ attributes: {
131
+ id: "18028215",
132
+ },
133
+ },
134
+ {
135
+ type: "article-reference-demo",
136
+ attributes: {
137
+ id: "17892378",
138
+ },
139
+ },
140
+ {
141
+ type: "article-reference-demo",
142
+ attributes: {
143
+ id: "18017648",
144
+ },
145
+ },
146
+ {
147
+ type: "article-reference-demo",
148
+ attributes: {
149
+ id: "18026705",
150
+ },
151
+ },
152
+ ],
153
+ },
154
+ {
155
+ type: "slice",
156
+ attributes: {
157
+ name: "SECONDARY_4",
158
+ },
159
+ children: [
160
+ {
161
+ type: "article-reference-demo",
162
+ attributes: {
163
+ id: "17861129",
164
+ },
165
+ },
166
+ {
167
+ type: "article-reference-demo",
168
+ attributes: {
169
+ id: "17814872",
170
+ },
171
+ },
172
+ {
173
+ type: "article-reference-demo",
174
+ attributes: {
175
+ id: "17867694",
176
+ },
177
+ },
178
+ {
179
+ type: "article-reference-demo",
180
+ attributes: {
181
+ id: "17863493",
182
+ },
183
+ },
184
+ ],
185
+ },
186
+ ],
187
+ };
188
+
189
+ const getContentSectionTwo = {
190
+ id: "123a4567-e89b-12d3-a456-426655440003",
191
+ type: "collection",
192
+ attributes: {
193
+ title: "Section Two",
194
+ link: {
195
+ type: "hyperlink",
196
+ attributes: {
197
+ text: "See more",
198
+ url: "/section-two",
199
+ },
200
+ },
201
+ },
202
+ children: [
203
+ {
204
+ type: "slice",
205
+ attributes: {
206
+ name: "SECONDARY_2_AND_2",
207
+ },
208
+ children: [
209
+ {
210
+ type: "article-reference-demo",
211
+ attributes: {
212
+ id: "17397556",
213
+ },
214
+ },
215
+ {
216
+ type: "article-reference-demo",
217
+ attributes: {
218
+ id: "17862461",
219
+ },
220
+ }
221
+ ],
222
+ },
223
+ {
224
+ type: "slice",
225
+ attributes: {
226
+ name: "SECONDARY_3",
227
+ },
228
+ children: [
229
+ {
230
+ type: "article-reference-demo",
231
+ attributes: {
232
+ id: "17856463",
233
+ },
234
+ },
235
+ {
236
+ type: "article-reference-demo",
237
+ attributes: {
238
+ id: "17851099",
239
+ },
240
+ },
241
+ {
242
+ type: "article-reference-demo",
243
+ attributes: {
244
+ id: "17842387",
245
+ },
246
+ }
247
+ ],
248
+ },
249
+ ],
250
+ };
251
+
252
+ const getContentSectionThree = {
253
+ id: "123a4567-e89b-12d3-a456-426655440004",
254
+ type: "collection",
255
+ attributes: {
256
+ title: "Section Three",
257
+ link: {
258
+ type: "hyperlink",
259
+ attributes: {
260
+ text: "See more",
261
+ url: "/section-three",
262
+ },
263
+ },
264
+ },
265
+ children: [
266
+ {
267
+ type: "slice",
268
+ attributes: {
269
+ name: "SECONDARY_4",
270
+ },
271
+ children: [
272
+ {
273
+ type: "article-reference-demo",
274
+ attributes: {
275
+ id: "17397556",
276
+ },
277
+ },
278
+ {
279
+ type: "article-reference-demo",
280
+ attributes: {
281
+ id: "17842504",
282
+ },
283
+ },
284
+ {
285
+ type: "article-reference-demo",
286
+ attributes: {
287
+ id: "17861129",
288
+ },
289
+ },
290
+ {
291
+ type: "article-reference-demo",
292
+ attributes: {
293
+ id: "17814872",
294
+ },
295
+ },
296
+ ],
297
+ },
298
+ {
299
+ type: "slice",
300
+ attributes: {
301
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
302
+ },
303
+ children: [
304
+ {
305
+ type: "article-reference-demo",
306
+ attributes: {
307
+ id: "18032190",
308
+ },
309
+ },
310
+ {
311
+ type: "article-reference-demo",
312
+ attributes: {
313
+ id: "17863493",
314
+ },
315
+ },
316
+ {
317
+ type: "article-reference-demo",
318
+ attributes: {
319
+ id: "17867694",
320
+ },
321
+ },
322
+ {
323
+ type: "article-reference-demo",
324
+ attributes: {
325
+ id: "17814872",
326
+ },
327
+ },
328
+ {
329
+ type: "article-reference-demo",
330
+ attributes: {
331
+ id: "17861129",
332
+ },
333
+ }
334
+ ],
335
+ },
336
+ {
337
+ type: "slice",
338
+ attributes: {
339
+ name: "SECONDARY_4",
340
+ },
341
+ children: [
342
+ {
343
+ type: "article-reference-demo",
344
+ attributes: {
345
+ id: "18026705",
346
+ },
347
+ },
348
+ {
349
+ type: "article-reference-demo",
350
+ attributes: {
351
+ id: "18017648",
352
+ },
353
+ },
354
+ {
355
+ type: "article-reference-demo",
356
+ attributes: {
357
+ id: "17892378",
358
+ },
359
+ },
360
+ {
361
+ type: "article-reference-demo",
362
+ attributes: {
363
+ id: "18028215",
364
+ },
365
+ },
366
+ ],
367
+ },
368
+ ],
369
+ };
370
+
371
+ const getContentLandingTwo = {
372
+ id: "123a4567-e89b-12d3-a456-426655440005",
373
+ type: "collection",
374
+ attributes: {
375
+ title: "Landing Lead Two",
376
+ link: {
377
+ type: "hyperlink",
378
+ attributes: {
379
+ text: "See more",
380
+ url: "/section-two",
381
+ },
382
+ },
383
+ },
384
+ children: [
385
+ {
386
+ type: "slice",
387
+ attributes: {
388
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
389
+ },
390
+ children: [
391
+ {
392
+ type: "article-reference-demo",
393
+ attributes: {
394
+ id: "17867694",
395
+ },
396
+ },
397
+ {
398
+ type: "article-reference-demo",
399
+ attributes: {
400
+ id: "17863493",
401
+ },
402
+ },
403
+ {
404
+ type: "article-reference-demo",
405
+ attributes: {
406
+ id: "17856463",
407
+ },
408
+ },
409
+ ],
410
+ },
411
+ {
412
+ type: "slice",
413
+ attributes: {
414
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
415
+ },
416
+ children: [
417
+ {
418
+ type: "article-reference-demo",
419
+ attributes: {
420
+ id: "17851099",
421
+ },
422
+ },
423
+ {
424
+ type: "article-reference-demo",
425
+ attributes: {
426
+ id: "17842387",
427
+ },
428
+ },
429
+ {
430
+ type: "article-reference-demo",
431
+ attributes: {
432
+ id: "17862461",
433
+ },
434
+ },
435
+ ],
436
+ },
437
+ ],
438
+ };
439
+
440
+ const getContentSectionFour = {
441
+ id: "123a4567-e89b-12d3-a456-426655440096",
442
+ type: "collection",
443
+ attributes: {
444
+ title: "Section Four",
445
+ link: {
446
+ type: "hyperlink",
447
+ attributes: {
448
+ text: "See more",
449
+ url: "/section-three",
450
+ },
451
+ },
452
+ },
453
+ children: [
454
+ {
455
+ type: "slice",
456
+ attributes: {
457
+ name: "SECONDARY_4",
458
+ },
459
+ children: [
460
+ {
461
+ type: "article-reference-demo",
462
+ attributes: {
463
+ id: "17397556",
464
+ },
465
+ },
466
+ {
467
+ type: "article-reference-demo",
468
+ attributes: {
469
+ id: "17842504",
470
+ },
471
+ },
472
+ {
473
+ type: "article-reference-demo",
474
+ attributes: {
475
+ id: "17861129",
476
+ },
477
+ },
478
+ {
479
+ type: "article-reference-demo",
480
+ attributes: {
481
+ id: "17814872",
482
+ },
483
+ },
484
+ ],
485
+ },
486
+ {
487
+ type: "slice",
488
+ attributes: {
489
+ name: "SUPPLEMENT_LEAD_AND_4_STACK",
490
+ },
491
+ children: [
492
+ {
493
+ type: "article-reference-demo",
494
+ attributes: {
495
+ id: "17867694",
496
+ },
497
+ },
498
+ {
499
+ type: "article-reference-demo",
500
+ attributes: {
501
+ id: "17863493",
502
+ },
503
+ },
504
+ {
505
+ type: "article-reference-demo",
506
+ attributes: {
507
+ id: "17856463",
508
+ },
509
+ },
510
+ ],
511
+ },
512
+ ],
513
+ };
514
+
515
+ module.exports = {
516
+ getContentLandingLead,
517
+ getContentSectionOne,
518
+ getContentSectionTwo,
519
+ getContentSectionThree,
520
+ getContentLandingTwo,
521
+ getContentSectionFour,
522
+ };
@@ -0,0 +1,206 @@
1
+ const {
2
+ getContentLandingLead,
3
+ getContentSectionOne,
4
+ getContentSectionTwo,
5
+ getContentSectionThree,
6
+ getContentLandingTwo,
7
+ getContentSectionFour,
8
+ } = require("./body-genarator");
9
+
10
+ const pages = [
11
+ {
12
+ data: {
13
+ id: "123e4567-e89b-12d3-a456-426655440000",
14
+ type: "page",
15
+ attributes: {
16
+ title: "Mock Site Homepage",
17
+ slug: "homepage",
18
+ titleSeo: "Homepage",
19
+ description: "Site One description",
20
+ image: {
21
+ type: "image",
22
+ attributes: {
23
+ url: "https://www.newskit.co.uk/static/templates.png",
24
+ caption: "Site One Logo",
25
+ credit: "Site One Logo",
26
+ alt: "Site One Logo",
27
+ },
28
+ },
29
+ datePublished: "2020-01-01T17:32:28.000Z",
30
+ dateUpdated: "2020-01-01T17:38:28.000Z",
31
+ body: [
32
+ getContentLandingLead,
33
+ getContentSectionOne,
34
+ getContentSectionTwo,
35
+ getContentSectionThree,
36
+ ],
37
+ },
38
+ },
39
+ },
40
+ {
41
+ data: {
42
+ id: "223e4567-e89b-12d3-a456-426655440000",
43
+ type: "page",
44
+ attributes: {
45
+ title: "Section One",
46
+ slug: "section-one",
47
+ titleSeo: "Section One",
48
+ description: "Section One description",
49
+ image: {
50
+ type: "image",
51
+ attributes: {
52
+ url: "https://www.newskit.co.uk/static/templates.png",
53
+ caption: "An image for the section",
54
+ credit: "credit text",
55
+ alt: "An image for the section",
56
+ },
57
+ },
58
+ datePublished: "2020-01-01T17:32:28.000Z",
59
+ dateUpdated: "2020-01-01T17:38:28.000Z",
60
+ body: [
61
+ {
62
+ type: "image",
63
+ attributes: {
64
+ url: "https://www.newskit.co.uk/static/templates.png",
65
+ caption: "An image for the section - body",
66
+ credit: "credit text",
67
+ alt: "An image for the section - body",
68
+ },
69
+ },
70
+ {
71
+ type: "paragraph",
72
+ attributes: {
73
+ dropCap: true,
74
+ },
75
+ children: [
76
+ {
77
+ type: "text",
78
+ attributes: {
79
+ bold: false,
80
+ text:
81
+ "Your section can have Paragraphs maybe some type of introduction",
82
+ },
83
+ },
84
+ {
85
+ type: "hyperlink",
86
+ attributes: {
87
+ url: "http://content.api/api/v1/times-radio/posts?id=abc",
88
+ text: "It can also have links",
89
+ },
90
+ },
91
+ ],
92
+ },
93
+ {
94
+ type: "tweet",
95
+ attributes: {
96
+ id: "tweet-id",
97
+ },
98
+ },
99
+ getContentLandingLead,
100
+ getContentSectionTwo,
101
+ getContentLandingTwo,
102
+ getContentSectionOne,
103
+ ],
104
+ },
105
+ },
106
+ },
107
+ {
108
+ data: {
109
+ id: "323e4567-e89b-12d3-a456-426655440000",
110
+ type: "page",
111
+ attributes: {
112
+ title: "Section Two",
113
+ slug: "section-two",
114
+ titleSeo: "Section Two",
115
+ description: "Section Two description",
116
+ image: {
117
+ type: "image",
118
+ attributes: {
119
+ url: "https://www.newskit.co.uk/static/templates.png",
120
+ caption: "An image for the section",
121
+ credit: "credit text",
122
+ alt: "An image for the section",
123
+ },
124
+ },
125
+ datePublished: "2020-01-01T17:32:28.000Z",
126
+ dateUpdated: "2020-01-01T17:38:28.000Z",
127
+ body: [
128
+ {
129
+ type: "image",
130
+ attributes: {
131
+ url: "https://www.newskit.co.uk/static/templates.png",
132
+ caption: "An image for the section - body",
133
+ credit: "credit text",
134
+ alt: "An image for the section - body",
135
+ },
136
+ },
137
+ {
138
+ type: "paragraph",
139
+ attributes: {
140
+ dropCap: true,
141
+ },
142
+ children: [
143
+ {
144
+ type: "text",
145
+ attributes: {
146
+ bold: false,
147
+ text:
148
+ "Your section can have Paragraphs maybe some type of introduction",
149
+ },
150
+ },
151
+ {
152
+ type: "hyperlink",
153
+ attributes: {
154
+ url: "http://content.api/api/v1/times-radio/posts?id=abc",
155
+ text: "It can also have links",
156
+ },
157
+ },
158
+ ],
159
+ },
160
+ {
161
+ type: "tweet",
162
+ attributes: {
163
+ id: "tweet-id",
164
+ },
165
+ },
166
+ getContentLandingLead,
167
+ getContentSectionTwo,
168
+ getContentLandingTwo,
169
+ getContentSectionFour,
170
+ ],
171
+ },
172
+ },
173
+ },
174
+ {
175
+ data: {
176
+ id: "423e4567-e89b-12d3-a456-426655440000",
177
+ type: "page",
178
+ attributes: {
179
+ title: "Section Three",
180
+ slug: "section-three",
181
+ titleSeo: "Section Three",
182
+ description: "Section Three description",
183
+ image: {
184
+ type: "image",
185
+ attributes: {
186
+ url: "https://www.newskit.co.uk/static/templates.png",
187
+ caption: "Site One Logo",
188
+ credit: "Site One Logo",
189
+ alt: "Site One Logo",
190
+ },
191
+ },
192
+ datePublished: "2020-01-01T17:32:28.000Z",
193
+ dateUpdated: "2020-01-01T17:38:28.000Z",
194
+ body: [
195
+ getContentLandingLead,
196
+ getContentSectionOne,
197
+ getContentSectionTwo,
198
+ getContentSectionThree,
199
+ getContentLandingTwo,
200
+ ],
201
+ },
202
+ },
203
+ },
204
+ ];
205
+
206
+ module.exports = pages;