@dcodegroup-au/page-builder 0.2.1 → 0.2.3
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/dist/page-builder.css +1 -1
- package/dist/page-builder.es.js +5900 -5600
- package/dist/page-builder.umd.js +50 -50
- package/example/src/App.vue +274 -4
- package/package.json +1 -1
- package/src/components/ItemEdit.vue +1 -1
- package/src/components/PageBuilder.vue +3 -1
- package/src/components/PageRender.vue +2 -0
- package/src/components/builders/VCollectionCarousel.vue +58 -0
- package/src/components/presenters/components/VCarouselPresenter.vue +156 -0
- package/src/components/presenters/modules/CollectionCarousel.vue +35 -0
- package/tailwind.config.js +5 -0
package/example/src/App.vue
CHANGED
|
@@ -99,7 +99,7 @@ const page = {
|
|
|
99
99
|
{
|
|
100
100
|
name: "Links",
|
|
101
101
|
type: "links",
|
|
102
|
-
supportive_text: "Manage the
|
|
102
|
+
supportive_text: "Manage the links.",
|
|
103
103
|
max_items: 7,
|
|
104
104
|
data: [
|
|
105
105
|
{
|
|
@@ -254,7 +254,7 @@ const page = {
|
|
|
254
254
|
{
|
|
255
255
|
url: "/",
|
|
256
256
|
logo: "https://beta-frontend.elaa.org.au/img/logos/hesta.png",
|
|
257
|
-
},{
|
|
257
|
+
}, {
|
|
258
258
|
url: "/",
|
|
259
259
|
logo: "",
|
|
260
260
|
}
|
|
@@ -281,16 +281,286 @@ const page = {
|
|
|
281
281
|
{
|
|
282
282
|
title: "Collection carousel",
|
|
283
283
|
type: "collection_carousel",
|
|
284
|
+
has_background: true,
|
|
284
285
|
components: [
|
|
285
286
|
{
|
|
286
287
|
name: "Section header",
|
|
287
288
|
type: "header",
|
|
288
|
-
title: '
|
|
289
|
-
|
|
289
|
+
title: 'Upcoming Events',
|
|
290
|
+
dark: true,
|
|
291
|
+
supporting_text: 'Don\'t Miss Our Upcoming Activities and Gatherings in Early Education.',
|
|
290
292
|
},
|
|
291
293
|
{
|
|
292
294
|
name: "Carousel",
|
|
293
295
|
type: "carousel",
|
|
296
|
+
button: {
|
|
297
|
+
title: 'View all events',
|
|
298
|
+
url: 'google.com', // external could be an url
|
|
299
|
+
type: 'external-page',
|
|
300
|
+
is_new_tab: true,
|
|
301
|
+
},
|
|
302
|
+
content: {
|
|
303
|
+
label: 'Content',
|
|
304
|
+
supportive_text: 'This carousel will be automatically populated with all upcoming events. This section will be hidden if there’s no upcoming events.',
|
|
305
|
+
items: [
|
|
306
|
+
{
|
|
307
|
+
type: 'event',
|
|
308
|
+
title: 'Change Management – Drop in session',
|
|
309
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services.',
|
|
310
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_1.jpg',
|
|
311
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
312
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
313
|
+
line_2: 'Free',
|
|
314
|
+
primary_button: {
|
|
315
|
+
icon: 'plus',
|
|
316
|
+
title: 'Register',
|
|
317
|
+
url: 'google.com'
|
|
318
|
+
},
|
|
319
|
+
secondary_button: {
|
|
320
|
+
title: 'Learn more',
|
|
321
|
+
url: 'google.com'
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
type: 'event',
|
|
326
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play',
|
|
327
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
328
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_2.jpg',
|
|
329
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
330
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
331
|
+
line_2: '$395 <span style="font-weight: lighter;">(Members)</span> <br> $495 <span style="font-weight: lighter;">(Non-Members)</span>',
|
|
332
|
+
primary_button: {
|
|
333
|
+
icon: 'plus',
|
|
334
|
+
title: 'Register',
|
|
335
|
+
url: 'google.com'
|
|
336
|
+
},
|
|
337
|
+
secondary_button: {
|
|
338
|
+
title: 'Learn more',
|
|
339
|
+
url: 'google.com'
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
type: 'event',
|
|
344
|
+
title: 'DE Regional Governance Training Session',
|
|
345
|
+
description: 'Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
346
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_3.jpg',
|
|
347
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
348
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
349
|
+
line_2: 'Free',
|
|
350
|
+
button_title: 'Free',
|
|
351
|
+
primary_button: {
|
|
352
|
+
icon: 'plus',
|
|
353
|
+
title: 'Register',
|
|
354
|
+
url: 'google.com'
|
|
355
|
+
},
|
|
356
|
+
secondary_button: {
|
|
357
|
+
title: 'Learn more',
|
|
358
|
+
url: 'google.com'
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
type: 'event',
|
|
363
|
+
title: 'Change Management – Drop in session 2',
|
|
364
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services.',
|
|
365
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_1.jpg',
|
|
366
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
367
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
368
|
+
line_2: 'Free',
|
|
369
|
+
primary_button: {
|
|
370
|
+
icon: 'plus',
|
|
371
|
+
title: 'Register',
|
|
372
|
+
url: 'google.com'
|
|
373
|
+
},
|
|
374
|
+
secondary_button: {
|
|
375
|
+
title: 'Learn more',
|
|
376
|
+
url: 'google.com'
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
type: 'event',
|
|
381
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 2',
|
|
382
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
383
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_2.jpg',
|
|
384
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
385
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
386
|
+
line_2: '$395 <span style="font-weight: lighter;">(Members)</span> <br> $495 <span style="font-weight: lighter;">(Non-Members)</span>',
|
|
387
|
+
primary_button: {
|
|
388
|
+
icon: 'plus',
|
|
389
|
+
title: 'Register',
|
|
390
|
+
url: 'google.com'
|
|
391
|
+
},
|
|
392
|
+
secondary_button: {
|
|
393
|
+
title: 'Learn more',
|
|
394
|
+
url: 'google.com'
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
type: 'event',
|
|
399
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 3',
|
|
400
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
401
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_2.jpg',
|
|
402
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
403
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
404
|
+
line_2: '$395 <span style="font-weight: lighter;">(Members)</span> <br> $495 <span style="font-weight: lighter;">(Non-Members)</span>',
|
|
405
|
+
primary_button: {
|
|
406
|
+
icon: 'plus',
|
|
407
|
+
title: 'Register',
|
|
408
|
+
url: 'google.com'
|
|
409
|
+
},
|
|
410
|
+
secondary_button: {
|
|
411
|
+
title: 'Learn more',
|
|
412
|
+
url: 'google.com'
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
type: 'event',
|
|
417
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 4',
|
|
418
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
419
|
+
image: 'https://beta-frontend.elaa.org.au/img/events/event_2.jpg',
|
|
420
|
+
tags: ['Governance', 'CEO&Leadership', 'Zoom webinar'],
|
|
421
|
+
line_1: 'June 20 @ 12:30 pm - 1:15 pm AEST',
|
|
422
|
+
line_2: '$395 <span style="font-weight: lighter;">(Members)</span> <br> $495 <span style="font-weight: lighter;">(Non-Members)</span>',
|
|
423
|
+
primary_button: {
|
|
424
|
+
icon: 'plus',
|
|
425
|
+
title: 'Register',
|
|
426
|
+
url: 'google.com'
|
|
427
|
+
},
|
|
428
|
+
secondary_button: {
|
|
429
|
+
title: 'Learn more',
|
|
430
|
+
url: 'google.com'
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
title: "Collection carousel",
|
|
440
|
+
type: "collection_carousel",
|
|
441
|
+
has_background: false,
|
|
442
|
+
components: [
|
|
443
|
+
{
|
|
444
|
+
name: "Section header",
|
|
445
|
+
type: "header",
|
|
446
|
+
title: 'Our Submission',
|
|
447
|
+
dark: true,
|
|
448
|
+
supporting_text: null,
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: "Carousel",
|
|
452
|
+
type: "carousel",
|
|
453
|
+
button: {
|
|
454
|
+
title: 'View all submissions',
|
|
455
|
+
url: 'google.com', // external could be an url
|
|
456
|
+
type: 'external-page',
|
|
457
|
+
is_new_tab: true,
|
|
458
|
+
},
|
|
459
|
+
content: {
|
|
460
|
+
label: 'Content',
|
|
461
|
+
supportive_text: 'This carousel will be automatically populated with all upcoming events. This section will be hidden if there’s no upcoming events.',
|
|
462
|
+
items: [
|
|
463
|
+
{
|
|
464
|
+
type: 'submission',
|
|
465
|
+
title: 'Change Management – Drop in session',
|
|
466
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector. This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
467
|
+
primary_button: {
|
|
468
|
+
icon: 'plus',
|
|
469
|
+
title: 'Read submmission',
|
|
470
|
+
url: 'google.com'
|
|
471
|
+
},
|
|
472
|
+
secondary_button: {
|
|
473
|
+
title: 'Learn more',
|
|
474
|
+
url: 'google.com'
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
type: 'submission',
|
|
479
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play',
|
|
480
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
481
|
+
primary_button: {
|
|
482
|
+
icon: 'plus',
|
|
483
|
+
title: 'Read submmission',
|
|
484
|
+
url: 'google.com'
|
|
485
|
+
},
|
|
486
|
+
secondary_button: {
|
|
487
|
+
title: 'Learn more',
|
|
488
|
+
url: 'google.com'
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
type: 'submission',
|
|
493
|
+
title: 'DE Regional Governance Training Session',
|
|
494
|
+
description: 'Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
495
|
+
button_title: 'Free',
|
|
496
|
+
primary_button: {
|
|
497
|
+
icon: 'plus',
|
|
498
|
+
title: 'Read submmission',
|
|
499
|
+
url: 'google.com'
|
|
500
|
+
},
|
|
501
|
+
secondary_button: {
|
|
502
|
+
title: 'Learn more',
|
|
503
|
+
url: 'google.com'
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
type: 'submission',
|
|
508
|
+
title: 'Change Management – Drop in session 2',
|
|
509
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services.',
|
|
510
|
+
primary_button: {
|
|
511
|
+
icon: 'plus',
|
|
512
|
+
title: 'Read submmission',
|
|
513
|
+
url: 'google.com'
|
|
514
|
+
},
|
|
515
|
+
secondary_button: {
|
|
516
|
+
title: 'Learn more',
|
|
517
|
+
url: 'google.com'
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
type: 'submission',
|
|
522
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 2',
|
|
523
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
524
|
+
primary_button: {
|
|
525
|
+
icon: 'plus',
|
|
526
|
+
title: 'Read submmission',
|
|
527
|
+
url: 'google.com'
|
|
528
|
+
},
|
|
529
|
+
secondary_button: {
|
|
530
|
+
title: 'Learn more',
|
|
531
|
+
url: 'google.com'
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
type: 'submission',
|
|
536
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 3',
|
|
537
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
538
|
+
primary_button: {
|
|
539
|
+
icon: 'plus',
|
|
540
|
+
title: 'Read submmission',
|
|
541
|
+
url: 'google.com'
|
|
542
|
+
},
|
|
543
|
+
secondary_button: {
|
|
544
|
+
title: 'Learn more',
|
|
545
|
+
url: 'google.com'
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
type: 'submission',
|
|
550
|
+
title: 'Let’s start making sense of OHS: Safety – not child’s play 4',
|
|
551
|
+
description: 'This face to face event is specifically designed for those responsible for the management of OHS in early childhood services. Guidance on how to manage risks by addressing the most common hazards faced by the early childhood sector.',
|
|
552
|
+
primary_button: {
|
|
553
|
+
icon: 'plus',
|
|
554
|
+
title: 'Read submmission',
|
|
555
|
+
url: 'google.com'
|
|
556
|
+
},
|
|
557
|
+
secondary_button: {
|
|
558
|
+
title: 'Learn more',
|
|
559
|
+
url: 'google.com'
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
]
|
|
563
|
+
}
|
|
294
564
|
}
|
|
295
565
|
]
|
|
296
566
|
},
|
package/package.json
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
110
|
<slot>
|
|
111
|
-
<div class="flex justify-between space-x-xsSpace pt-xsSpace gap-4
|
|
111
|
+
<div class="flex justify-between space-x-xsSpace pt-xsSpace gap-4 sticky bottom-0 w-full bg-gray-200 py-2 px-6">
|
|
112
112
|
<a @click="close"
|
|
113
113
|
class="w-[200px] py-[9px] bg-white rounded-full border border-gray-300 shadow-xs text-md font-semibold hover:bg-gray-100 text-gray-700 text-center cursor-pointer">
|
|
114
114
|
Cancel
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="page-builder">
|
|
2
|
+
<div class="page-builder overflow-auto">
|
|
3
3
|
<div class="flex gap-4 px-6 overflow-auto">
|
|
4
4
|
<div class="flex w-[356px] flex-col gap-2 pb-10">
|
|
5
5
|
<div v-for="(parent, sectionIndex) in modelValue.sections" class="border-b border-gray-200 pb-2">
|
|
@@ -71,6 +71,7 @@ import VItems from "@/components/builders/VItems.vue";
|
|
|
71
71
|
import VLinks from "@/components/builders/VLinks.vue";
|
|
72
72
|
import VHeader from "@/components/builders/VHeader.vue";
|
|
73
73
|
import VLogos from "@/components/builders/VLogos.vue";
|
|
74
|
+
import VCollectionCarousel from "@/components/builders/VCollectionCarousel.vue";
|
|
74
75
|
|
|
75
76
|
const emit = defineEmits(["save", "close"]);
|
|
76
77
|
const props = defineProps({
|
|
@@ -96,6 +97,7 @@ const componentMaps = ref({
|
|
|
96
97
|
header: markRaw(VHeader),
|
|
97
98
|
link_grid: markRaw(VLinks),
|
|
98
99
|
logos: markRaw(VLogos),
|
|
100
|
+
carousel: markRaw(VCollectionCarousel),
|
|
99
101
|
});
|
|
100
102
|
|
|
101
103
|
if (!openStates.value) {
|
|
@@ -15,6 +15,7 @@ import HeroHeader from "@/components/presenters/modules/HeroHeader.vue";
|
|
|
15
15
|
import QuickLinks from "@/components/presenters/modules/QuickLinks.vue";
|
|
16
16
|
import VTabs from "@/components/presenters/modules/VTabs.vue";
|
|
17
17
|
import LogoCloud from "@/components/presenters/modules/LogoCloud.vue";
|
|
18
|
+
import CollectionCarousel from "@/components/presenters/modules/CollectionCarousel.vue";
|
|
18
19
|
|
|
19
20
|
const props = defineProps({
|
|
20
21
|
page: {
|
|
@@ -28,6 +29,7 @@ const componentMaps = ref({
|
|
|
28
29
|
quick_links: markRaw(QuickLinks),
|
|
29
30
|
tabs: markRaw(VTabs),
|
|
30
31
|
logo: markRaw(LogoCloud),
|
|
32
|
+
collection_carousel: markRaw(CollectionCarousel),
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
const currentComponent = (section) => {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col">
|
|
3
|
+
<div class="flex flex-col gap-4 mb-4 border-b border-gray-200 pb-4">
|
|
4
|
+
<p class="text-lg font-semibold text-gray-900 border-b border-gray-200 pb-4">
|
|
5
|
+
Carousel
|
|
6
|
+
</p>
|
|
7
|
+
<div class="flex flex-col gap-6">
|
|
8
|
+
<div class="flex flex-col gap-1.5">
|
|
9
|
+
<input-wrapper
|
|
10
|
+
v-if="componentData.button"
|
|
11
|
+
is-vertical
|
|
12
|
+
field="title"
|
|
13
|
+
label-text="Button label *"
|
|
14
|
+
class="w-full mb-4"
|
|
15
|
+
:value="componentData.button.title"
|
|
16
|
+
:limit="51"
|
|
17
|
+
>
|
|
18
|
+
<input
|
|
19
|
+
v-model="componentData.button.title"
|
|
20
|
+
name="title"
|
|
21
|
+
type="text"
|
|
22
|
+
placeholder="Title"
|
|
23
|
+
:maxlength="51"
|
|
24
|
+
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
25
|
+
/>
|
|
26
|
+
</input-wrapper>
|
|
27
|
+
<linked-to
|
|
28
|
+
v-if="componentData?.button"
|
|
29
|
+
label="Link to"
|
|
30
|
+
name="button"
|
|
31
|
+
v-model:type="componentData.button.type"
|
|
32
|
+
v-model:url="componentData.button.url"
|
|
33
|
+
v-model:openInNewTab="componentData.button.open_in_new_tab"
|
|
34
|
+
:sites="sites"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<h3 v-if="componentData.content?.label" class="text-base text-gray-900 font-semibold">{{ componentData.data.content.label }}</h3>
|
|
41
|
+
<p v-if="componentData.content?.supportive_text" class="text-gray-600 text-base font-normal mt-2">{{ componentData.data.content.supportive_text }}</p>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
<script setup>
|
|
46
|
+
import {ref} from "vue";
|
|
47
|
+
import {defaultProps} from "@/components/helpers/defaultProps";
|
|
48
|
+
import LinkedTo from "@/components/common/LinkedTo.vue";
|
|
49
|
+
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
50
|
+
|
|
51
|
+
const emit = defineEmits(["update"]);
|
|
52
|
+
|
|
53
|
+
const props = defineProps({
|
|
54
|
+
...defaultProps,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const componentData = ref(props.data.component);
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative">
|
|
3
|
+
<!-- Slider Wrapper -->
|
|
4
|
+
<div
|
|
5
|
+
class="slider-wrapper flex transition-transform duration-500 gap-0 mb-6"
|
|
6
|
+
:style="{ transform: `translateX(-${currentSlide * (480 + 24)}px)` }"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
v-for="(slide, index) in slides"
|
|
10
|
+
:key="index"
|
|
11
|
+
class="slider-item flex-shrink-0 flex-1 mr-6 min-w-[480px]"
|
|
12
|
+
:class="{'h-[309px]': !hasBackground, 'h-full': hasBackground}"
|
|
13
|
+
>
|
|
14
|
+
<div class="w-full p-4 rounded-[16px]" :class="{'bg-gray-50 h-full flex flex-col justify-between': !hasBackground, 'bg-white': hasBackground}">
|
|
15
|
+
<div>
|
|
16
|
+
<div class="mb-4">
|
|
17
|
+
<img
|
|
18
|
+
v-if="slide.image"
|
|
19
|
+
:src="slide.image"
|
|
20
|
+
alt="Slide Image"
|
|
21
|
+
class="rounded-[8px] h-[220px] w-full object-cover"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
<div v-if="slide.tags && slide.tags.length" class="flex gap-2">
|
|
25
|
+
<span
|
|
26
|
+
v-for="tag in slide.tags"
|
|
27
|
+
:key="tag"
|
|
28
|
+
class="bg-navy-50 border border-navy-200 text-navy-700 px-2 py-0.5 rounded-[6px] text-sm"
|
|
29
|
+
>
|
|
30
|
+
{{ tag }}
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
<h3 class="text-[24px] font-semibold text-gray-900 mb-3 leading-[23px] mt-3">
|
|
34
|
+
{{ slide?.title }}
|
|
35
|
+
</h3>
|
|
36
|
+
<p
|
|
37
|
+
class="text-base font-normal text-gray-600 leading-[24px] multiline-ellipsis"
|
|
38
|
+
v-html="slide?.description"
|
|
39
|
+
></p>
|
|
40
|
+
<div v-if="slide?.type === 'event'" class="flex gap-2 text-gray-600 mt-6 font-semibold">
|
|
41
|
+
<Clock class="w-4 h-4 mt-[3px]"></Clock>
|
|
42
|
+
<div class="text-sm" v-html="slide?.line_1"></div>
|
|
43
|
+
</div>
|
|
44
|
+
<div v-if="slide.type === 'event'" class="flex gap-2 text-gray-600 mt-2 font-semibold">
|
|
45
|
+
<Ticket class="w-4 h-4 mt-[3px]"></Ticket>
|
|
46
|
+
<div class="text-sm" v-html="slide?.line_2"></div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="border-t border-gray-200 mt-4 pt-[17px] flex justify-between items-center">
|
|
50
|
+
<a
|
|
51
|
+
v-if="slide.primary_button?.url"
|
|
52
|
+
:href="formatUrl(slide.primary_button.url)"
|
|
53
|
+
target="_blank"
|
|
54
|
+
class="hover:bg-brand-600 bg-brand-500 text-white h-[40px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center shadow-xs text-sm"
|
|
55
|
+
>
|
|
56
|
+
<Plus v-if="slide.primary_button?.icon === 'plus'" class="w-4 h-4" />
|
|
57
|
+
<ShoppingCart
|
|
58
|
+
v-if="slide.primary_button?.icon === 'shopping-cart-01'"
|
|
59
|
+
class="w-4 h-4"
|
|
60
|
+
/>
|
|
61
|
+
{{ slide.primary_button.title }}
|
|
62
|
+
</a>
|
|
63
|
+
<a
|
|
64
|
+
v-if="slide.secondary_button"
|
|
65
|
+
target="_blank"
|
|
66
|
+
:href="formatUrl(slide.secondary_button.url)"
|
|
67
|
+
class="text-sm text-gray-600 hover:text-gray-800"
|
|
68
|
+
>
|
|
69
|
+
{{ slide.secondary_button.title ?? 'Learn more' }}
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Control Buttons -->
|
|
77
|
+
<div class="absolute top-[-65px] right-4 flex gap-4">
|
|
78
|
+
<button
|
|
79
|
+
@click="prevSlide"
|
|
80
|
+
class="p-2.5 bg-white text-navy-800 rounded-full hover:opacity-100 opacity-50"
|
|
81
|
+
>
|
|
82
|
+
<ChevronLeft class="w-6 h-6" />
|
|
83
|
+
</button>
|
|
84
|
+
<button
|
|
85
|
+
@click="nextSlide"
|
|
86
|
+
class="p-2.5 bg-white text-navy-800 rounded-full hover:opacity-100 opacity-50"
|
|
87
|
+
>
|
|
88
|
+
<ChevronRight class="w-6 h-6" />
|
|
89
|
+
</button>
|
|
90
|
+
</div>
|
|
91
|
+
<div v-if="component?.button" class="flex justify-center mb-[40px]">
|
|
92
|
+
<a
|
|
93
|
+
class="border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base"
|
|
94
|
+
:href="component.button.url"
|
|
95
|
+
:target="component.button.is_new_tab ? '_blank' : ''">
|
|
96
|
+
{{ component.button.title }}
|
|
97
|
+
<ArrowUpRight class="w-5 h-5"></ArrowUpRight>
|
|
98
|
+
</a>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<script setup>
|
|
104
|
+
import { ref } from "vue";
|
|
105
|
+
import Clock from "@/assets/img/icons/clock.svg";
|
|
106
|
+
import Plus from "@/assets/img/icons/plus.svg";
|
|
107
|
+
import ShoppingCart from "@/assets/img/icons/shopping-cart-01.svg";
|
|
108
|
+
import ChevronRight from "@/assets/img/icons/chevron-right.svg";
|
|
109
|
+
import ChevronLeft from "@/assets/img/icons/chevron-left.svg";
|
|
110
|
+
import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
|
|
111
|
+
import Ticket from "@/assets/img/icons/ticket-02.svg";
|
|
112
|
+
|
|
113
|
+
const props = defineProps({
|
|
114
|
+
component: {
|
|
115
|
+
required: true,
|
|
116
|
+
type: Object,
|
|
117
|
+
},
|
|
118
|
+
hasBackground: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: true,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const currentSlide = ref(0); // Start at 0
|
|
125
|
+
const itemsToShow = 4; // Number of items to show at a time
|
|
126
|
+
const slides = [...props.component.content?.items || []];
|
|
127
|
+
|
|
128
|
+
// Format URL
|
|
129
|
+
const formatUrl = (url) => {
|
|
130
|
+
return url.startsWith("http") ? url : `//${url}`;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// Navigate to the next slide
|
|
134
|
+
const nextSlide = () => {
|
|
135
|
+
if (currentSlide.value <= slides.length - itemsToShow) {
|
|
136
|
+
currentSlide.value++;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// Navigate to the previous slide
|
|
141
|
+
const prevSlide = () => {
|
|
142
|
+
if (currentSlide.value > 0) {
|
|
143
|
+
currentSlide.value--;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
<style>
|
|
148
|
+
.multiline-ellipsis {
|
|
149
|
+
height: 100%;
|
|
150
|
+
display: -webkit-box; /* Use a flex-like box model */
|
|
151
|
+
-webkit-box-orient: vertical; /* Set the box orientation to vertical */
|
|
152
|
+
overflow: hidden; /* Hide overflowing content */
|
|
153
|
+
text-overflow: ellipsis; /* Add ellipsis (...) for overflowed text */
|
|
154
|
+
-webkit-line-clamp: 4; /* Limit the text to 3 lines */
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="overflow-hidden" :class="{'rounded-br-[48px] rounded-tl-[48px] bg-aqua-100': section?.has_background}">
|
|
3
|
+
<div class="max-w-[1400px] mx-auto w-full">
|
|
4
|
+
<div class="max-md:mx-[30px] max-1xl:mx-[120px] 1xl:mx-0 rounded-[48px] pt-[40px]">
|
|
5
|
+
<VHeaderPresenter :component="headerComponent" />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="max-w-[1400px] mx-auto w-full" :class="{'mt-0': !section?.has_background, 'mt-6': section?.has_background}">
|
|
9
|
+
<VCarousel :component="carouselComponent" :has-background="section?.has_background" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { ref, computed } from "vue";
|
|
16
|
+
import VHeaderPresenter from "@/components/presenters/components/VHeaderPresenter.vue";
|
|
17
|
+
import VCarousel from "@/components/presenters/components/VCarouselPresenter.vue";
|
|
18
|
+
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
section: {
|
|
21
|
+
required: true,
|
|
22
|
+
type: Object,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const section = ref(props.section);
|
|
27
|
+
const headerComponent = computed(() => {
|
|
28
|
+
return section.value.components.find((component) => component.type === "header");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const carouselComponent = computed(() => {
|
|
32
|
+
return section.value.components.find((component) => component.type === "carousel");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
</script>
|
package/tailwind.config.js
CHANGED
|
@@ -19,8 +19,10 @@ module.exports = {
|
|
|
19
19
|
navy: {
|
|
20
20
|
900: '#182E43',
|
|
21
21
|
800: '#203E5A',
|
|
22
|
+
700: '#284D70',
|
|
22
23
|
600: '#3E5F7E',
|
|
23
24
|
400: '#69829B',
|
|
25
|
+
200: '#94A6B8',
|
|
24
26
|
50: '#DFE5EC',
|
|
25
27
|
25: '#EFF2F5',
|
|
26
28
|
},
|
|
@@ -38,6 +40,9 @@ module.exports = {
|
|
|
38
40
|
900: '#58113A',
|
|
39
41
|
950: '#3B0B27',
|
|
40
42
|
},
|
|
43
|
+
aqua: {
|
|
44
|
+
100: '#EEF2F2',
|
|
45
|
+
},
|
|
41
46
|
success: {
|
|
42
47
|
50: 'rgba(236, 253, 243, 1)',
|
|
43
48
|
200: 'rgba(171, 239, 198, 1)',
|