@dcodegroup-au/page-builder 0.0.6 → 0.0.7
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 +4615 -4487
- package/dist/page-builder.umd.js +47 -47
- package/example/src/App.vue +50 -14
- package/package.json +1 -1
- package/src/assets/css/style.css +22 -20
- package/src/assets/svg/header_right_vector.svg +3 -0
- package/src/components/PageBuilder.vue +8 -14
- package/src/components/PageRender.vue +10 -6
- package/src/components/SlideEdit.vue +3 -3
- package/src/components/builders/VHeader.vue +53 -0
- package/src/components/builders/VLinks.vue +3 -3
- package/src/components/builders/VSliders.vue +4 -4
- package/src/components/common/LinkedTo.vue +1 -1
- package/src/components/helpers/pageBuilderFactory.js +3 -3
- package/src/components/presenters/components/VHeaderPresenter.vue +19 -0
- package/src/components/presenters/components/VLinkPresenter.vue +12 -8
- package/src/components/presenters/components/VSliderPresenter.vue +9 -8
- package/src/components/presenters/modules/HeroHeader.vue +1 -1
- package/src/components/presenters/modules/QuickLinks.vue +43 -0
- package/tailwind.config.js +1 -0
package/example/src/App.vue
CHANGED
|
@@ -24,14 +24,14 @@ const page = {
|
|
|
24
24
|
primary_button: {
|
|
25
25
|
show: true,
|
|
26
26
|
label: 'Join ELAA',
|
|
27
|
-
|
|
27
|
+
url: '/google.com', // external could be an url
|
|
28
28
|
type: 'site-content',
|
|
29
29
|
is_new_tab: true,
|
|
30
30
|
},
|
|
31
31
|
secondary_button: {
|
|
32
32
|
show: true,
|
|
33
33
|
label: 'Learn about ELAA',
|
|
34
|
-
|
|
34
|
+
url: '/admin', // external could be an url
|
|
35
35
|
type: 'site-content',
|
|
36
36
|
open_in_new_tab: true,
|
|
37
37
|
},
|
|
@@ -44,14 +44,14 @@ const page = {
|
|
|
44
44
|
primary_button: {
|
|
45
45
|
show: false,
|
|
46
46
|
label: 'Apply now ELAA',
|
|
47
|
-
|
|
47
|
+
url: '/admin', // external could be an url
|
|
48
48
|
type: 'site-content',
|
|
49
49
|
is_new_tab: true,
|
|
50
50
|
},
|
|
51
51
|
secondary_button: {
|
|
52
52
|
show: true,
|
|
53
53
|
label: 'Construct ELAA',
|
|
54
|
-
|
|
54
|
+
url: '/admin', // external could be an url
|
|
55
55
|
type: 'site-content',
|
|
56
56
|
open_in_new_tab: true,
|
|
57
57
|
},
|
|
@@ -64,14 +64,14 @@ const page = {
|
|
|
64
64
|
primary_button: {
|
|
65
65
|
show: true,
|
|
66
66
|
label: 'Apply To Dcodegroup',
|
|
67
|
-
|
|
67
|
+
url: '/admin', // external could be an url
|
|
68
68
|
type: 'site-content',
|
|
69
69
|
is_new_tab: true,
|
|
70
70
|
},
|
|
71
71
|
secondary_button: {
|
|
72
72
|
show: true,
|
|
73
73
|
label: 'Construct Dcodegroup',
|
|
74
|
-
|
|
74
|
+
url: '/admin', // external could be an url
|
|
75
75
|
type: 'site-content',
|
|
76
76
|
open_in_new_tab: true,
|
|
77
77
|
},
|
|
@@ -84,14 +84,14 @@ const page = {
|
|
|
84
84
|
primary_button: {
|
|
85
85
|
show: true,
|
|
86
86
|
label: 'Apply To Image Credits',
|
|
87
|
-
|
|
87
|
+
url: '/admin', // external could be an url
|
|
88
88
|
type: 'site-content',
|
|
89
89
|
is_new_tab: true,
|
|
90
90
|
},
|
|
91
91
|
secondary_button: {
|
|
92
92
|
show: true,
|
|
93
93
|
label: 'Construct Image Credits',
|
|
94
|
-
|
|
94
|
+
url: '/admin', // external could be an url
|
|
95
95
|
type: 'site-content',
|
|
96
96
|
open_in_new_tab: true,
|
|
97
97
|
},
|
|
@@ -107,13 +107,13 @@ const page = {
|
|
|
107
107
|
data: [
|
|
108
108
|
{
|
|
109
109
|
title: "Privacy Policy",
|
|
110
|
-
|
|
110
|
+
url: '/admin', // external could be an url
|
|
111
111
|
type: 'site-content',
|
|
112
112
|
open_in_new_tab: true,
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
title: "Google",
|
|
116
|
-
|
|
116
|
+
url: 'https://google.com', // external could be an url
|
|
117
117
|
type: 'external-page',
|
|
118
118
|
open_in_new_tab: true,
|
|
119
119
|
}
|
|
@@ -203,11 +203,47 @@ const page = {
|
|
|
203
203
|
name: "Section header",
|
|
204
204
|
type: "header",
|
|
205
205
|
is_public: true,
|
|
206
|
+
title: 'Services',
|
|
207
|
+
supporting_text: 'Our knowledge and expertise of the early childhood sector enables ELAA to provide expert professional advice and support.',
|
|
206
208
|
},
|
|
207
209
|
{
|
|
208
210
|
id: 2,
|
|
209
|
-
name: "
|
|
210
|
-
type: "
|
|
211
|
+
name: "Link grid",
|
|
212
|
+
type: "link_grid",
|
|
213
|
+
supportive_text: "This section can contain up to 10 links.",
|
|
214
|
+
max_items: 10,
|
|
215
|
+
data: [
|
|
216
|
+
{
|
|
217
|
+
title: "Advisory Services",
|
|
218
|
+
url: '/admin', // external could be an url
|
|
219
|
+
type: 'site-content',
|
|
220
|
+
open_in_new_tab: true,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
title: "Capability Assessment Support Service",
|
|
224
|
+
url: 'https://google.com', // external could be an url
|
|
225
|
+
type: 'external-page',
|
|
226
|
+
open_in_new_tab: true,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
title: "Consultancy Services",
|
|
230
|
+
url: 'https://google.com', // external could be an url
|
|
231
|
+
type: 'external-page',
|
|
232
|
+
open_in_new_tab: true,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
title: "Payroll Calculations",
|
|
236
|
+
url: 'https://google.com', // external could be an url
|
|
237
|
+
type: 'external-page',
|
|
238
|
+
open_in_new_tab: true,
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
title: "VECTEA 2024",
|
|
242
|
+
url: 'https://google.com', // external could be an url
|
|
243
|
+
type: 'external-page',
|
|
244
|
+
open_in_new_tab: true,
|
|
245
|
+
}
|
|
246
|
+
]
|
|
211
247
|
}
|
|
212
248
|
]
|
|
213
249
|
},
|
|
@@ -222,14 +258,14 @@ const slide = {
|
|
|
222
258
|
primary_button: {
|
|
223
259
|
show: true,
|
|
224
260
|
label: 'Join ELAA',
|
|
225
|
-
|
|
261
|
+
url: '/admin', // external could be an url
|
|
226
262
|
type: 'site-content',
|
|
227
263
|
is_new_tab: true,
|
|
228
264
|
},
|
|
229
265
|
secondary_button: {
|
|
230
266
|
show: true,
|
|
231
267
|
label: 'Learn about ELAA',
|
|
232
|
-
|
|
268
|
+
url: '/admin', // external could be an url
|
|
233
269
|
type: 'site-content',
|
|
234
270
|
open_in_new_tab: true,
|
|
235
271
|
},
|
package/package.json
CHANGED
package/src/assets/css/style.css
CHANGED
|
@@ -2,29 +2,31 @@
|
|
|
2
2
|
@tailwind components;
|
|
3
3
|
@tailwind utilities;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[type="
|
|
7
|
-
[type="
|
|
8
|
-
[type="
|
|
9
|
-
[type="
|
|
10
|
-
[type="
|
|
11
|
-
[type="
|
|
12
|
-
[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.q-editor {
|
|
19
|
-
.ql-toolbar {
|
|
20
|
-
@apply rounded-t-lg bg-white;
|
|
5
|
+
.page-builder, .page-render, .slide-edit {
|
|
6
|
+
[type="text"],
|
|
7
|
+
[type="email"],
|
|
8
|
+
[type="url"],
|
|
9
|
+
[type="password"],
|
|
10
|
+
[type="number"],
|
|
11
|
+
[type="date"],
|
|
12
|
+
[type="tel"],
|
|
13
|
+
[multiple],
|
|
14
|
+
textarea,
|
|
15
|
+
select {
|
|
16
|
+
@apply !text-base block !w-full !rounded-lg !border !border-gray-300 !border-double placeholder:text-gray-400 focus:border-sky-300 focus:ring focus:ring-sky-200 focus:ring-opacity-50 !py-2 !px-3 !font-normal;
|
|
21
17
|
}
|
|
22
18
|
|
|
23
|
-
.
|
|
24
|
-
|
|
19
|
+
.q-editor {
|
|
20
|
+
.ql-toolbar {
|
|
21
|
+
@apply rounded-t-lg bg-white;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ql-container {
|
|
25
|
+
@apply min-h-[150px] rounded-b-lg bg-white;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
.ql-editor {
|
|
28
|
+
@apply text-base font-normal;
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="341" height="336" viewBox="0 0 341 336" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M198.752 -176.557C288.486 -214.271 388.737 -258.644 474.057 -211.794C563.407 -162.732 606.293 -54.8025 606.118 47.1309C605.964 137.619 542.275 209.809 473.237 268.305C412.276 319.957 337.1 351.698 257.754 342.298C178.609 332.922 111.441 285.667 66.1611 220.081C17.6669 149.839 -17.1653 64.2377 9.89614 -16.7149C37.4057 -99.0081 118.76 -142.938 198.752 -176.557Z" fill="#78BDB5"/>
|
|
3
|
+
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="page-builder">
|
|
3
3
|
<div class="flex gap-4 px-6 overflow-auto">
|
|
4
4
|
<div class="flex w-[356px] flex-col gap-2">
|
|
5
5
|
<div v-for="(parent, sectionIndex) in modelValue.sections" class="border-b border-gray-200 pb-2">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
:key="selected?.sectionIndex + selected?.componentIndex"
|
|
46
46
|
:data="selected"
|
|
47
47
|
:sites="sites"
|
|
48
|
-
@update="
|
|
48
|
+
@update="save"
|
|
49
49
|
></component>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -69,6 +69,7 @@ import ChevronDown from "@/assets/img/icons/chevron-down.svg";
|
|
|
69
69
|
import Instructions from "@/components/builders/Instructions.vue";
|
|
70
70
|
import VSliders from "@/components/builders/VSliders.vue";
|
|
71
71
|
import VLinks from "@/components/builders/VLinks.vue";
|
|
72
|
+
import VHeader from "@/components/builders/VHeader.vue";
|
|
72
73
|
|
|
73
74
|
const emit = defineEmits(["save", "close"]);
|
|
74
75
|
const props = defineProps({
|
|
@@ -79,16 +80,7 @@ const props = defineProps({
|
|
|
79
80
|
sites: {
|
|
80
81
|
type: Array,
|
|
81
82
|
default: () => {
|
|
82
|
-
return [
|
|
83
|
-
{
|
|
84
|
-
href: '/admin',
|
|
85
|
-
name: "Site 1",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
href: '/login',
|
|
89
|
-
name: "Site 2",
|
|
90
|
-
},
|
|
91
|
-
]
|
|
83
|
+
return []
|
|
92
84
|
}
|
|
93
85
|
},
|
|
94
86
|
});
|
|
@@ -99,6 +91,8 @@ let selected = ref(null);
|
|
|
99
91
|
const componentMaps = ref({
|
|
100
92
|
sliders: markRaw(VSliders),
|
|
101
93
|
links: markRaw(VLinks),
|
|
94
|
+
header: markRaw(VHeader),
|
|
95
|
+
link_grid: markRaw(VLinks),
|
|
102
96
|
});
|
|
103
97
|
|
|
104
98
|
if (!openStates.value) {
|
|
@@ -124,8 +118,8 @@ const close = () => {
|
|
|
124
118
|
emit("close", props.modelValue);
|
|
125
119
|
};
|
|
126
120
|
|
|
127
|
-
const save = () => {
|
|
128
|
-
emit("save", props.modelValue);
|
|
121
|
+
const save = (redirect = true) => {
|
|
122
|
+
emit("save", {page: props.modelValue, redirect: redirect});
|
|
129
123
|
};
|
|
130
124
|
|
|
131
125
|
const currentComponent = computed(() => {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div class="page-render">
|
|
3
|
+
<div v-for="(section, index) in page.sections">
|
|
4
|
+
<component
|
|
5
|
+
:is="currentComponent(section)"
|
|
6
|
+
:key="index"
|
|
7
|
+
:section="section"
|
|
8
|
+
></component>
|
|
9
|
+
</div>
|
|
8
10
|
</div>
|
|
9
11
|
</template>
|
|
10
12
|
<script setup>
|
|
11
13
|
import {ref, markRaw} from "vue";
|
|
12
14
|
import HeroHeader from "@/components/presenters/modules/HeroHeader.vue";
|
|
15
|
+
import QuickLinks from "@/components/presenters/modules/QuickLinks.vue";
|
|
13
16
|
|
|
14
17
|
const props = defineProps({
|
|
15
18
|
page: {
|
|
@@ -20,6 +23,7 @@ const props = defineProps({
|
|
|
20
23
|
|
|
21
24
|
const componentMaps = ref({
|
|
22
25
|
header: markRaw(HeroHeader),
|
|
26
|
+
quick_links: markRaw(QuickLinks),
|
|
23
27
|
});
|
|
24
28
|
|
|
25
29
|
const currentComponent = (section) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="slide-edit">
|
|
3
3
|
<div class="flex items-start gap-4 px-6 pt-4">
|
|
4
4
|
<div class="flex flex-1 flex-col gap-4">
|
|
5
5
|
<card title="Description">
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<card title="Secondary button">
|
|
66
66
|
<div class="flex flex-col gap-4">
|
|
67
67
|
<VToggle name="show" v-model="form.secondary_button.show" title="Show Button" />
|
|
68
|
-
<template v-if="form.secondary_button
|
|
68
|
+
<template v-if="form.secondary_button?.show">
|
|
69
69
|
<input-wrapper
|
|
70
70
|
is-vertical
|
|
71
71
|
field="secondary_button.label"
|
|
@@ -180,7 +180,7 @@ const close = () => {
|
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
const descriptionWordCount = computed(() => {
|
|
183
|
-
const plainText = form.value.description
|
|
183
|
+
const plainText = form.value.description?.replace(/<[^>]*>/g, ' ').trim();
|
|
184
184
|
const words = plainText.split(/\s+/).filter(word => word.length > 0);
|
|
185
185
|
return words.length;
|
|
186
186
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-4">
|
|
3
|
+
<p class="text-lg font-semibold text-gray-900 border-b border-gray-200 pb-4">
|
|
4
|
+
{{ dataRef.name }}
|
|
5
|
+
</p>
|
|
6
|
+
<input-wrapper
|
|
7
|
+
is-vertical
|
|
8
|
+
field="title"
|
|
9
|
+
label-text="Title *"
|
|
10
|
+
class="w-full mb-4"
|
|
11
|
+
:value="dataRef.title"
|
|
12
|
+
:limit="51"
|
|
13
|
+
>
|
|
14
|
+
<input
|
|
15
|
+
v-model="dataRef.title"
|
|
16
|
+
name="title"
|
|
17
|
+
type="text"
|
|
18
|
+
placeholder="Title"
|
|
19
|
+
:maxlength="51"
|
|
20
|
+
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
21
|
+
/>
|
|
22
|
+
</input-wrapper>
|
|
23
|
+
<input-wrapper
|
|
24
|
+
is-vertical
|
|
25
|
+
field="supporting_text"
|
|
26
|
+
label-text="Supporting Text *"
|
|
27
|
+
class="w-full mb-4"
|
|
28
|
+
:value="dataRef.supporting_text"
|
|
29
|
+
:limit="100"
|
|
30
|
+
>
|
|
31
|
+
<input
|
|
32
|
+
v-model="dataRef.supporting_text"
|
|
33
|
+
name="supporting_text"
|
|
34
|
+
type="text"
|
|
35
|
+
placeholder="Supporting Text"
|
|
36
|
+
:maxlength="100"
|
|
37
|
+
class="border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
|
|
38
|
+
/>
|
|
39
|
+
</input-wrapper>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
<script setup>
|
|
43
|
+
import { ref } from "vue";
|
|
44
|
+
import { defaultProps } from "@/components/helpers/defaultProps.js";
|
|
45
|
+
import InputWrapper from "@/components/common/InputWrapper.vue";
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits(["update"]);
|
|
48
|
+
const props = defineProps({
|
|
49
|
+
...defaultProps,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const dataRef = ref(props.data.component);
|
|
53
|
+
</script>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
label="Linked to"
|
|
60
60
|
:name="`link_${index + 1}`"
|
|
61
61
|
v-model:type="item.type"
|
|
62
|
-
v-model:url="item.
|
|
62
|
+
v-model:url="item.url"
|
|
63
63
|
v-model:openInNewTab="item.open_in_new_tab"
|
|
64
64
|
:sites="sites"
|
|
65
65
|
/>
|
|
@@ -102,7 +102,7 @@ function addItem() {
|
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
emit("update",
|
|
105
|
+
emit("update", false);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
const handleDeleteItem = (index) => {
|
|
@@ -112,6 +112,6 @@ const handleDeleteItem = (index) => {
|
|
|
112
112
|
|
|
113
113
|
const deleteCallback = (index) => {
|
|
114
114
|
componentData.value.data.splice(index, 1);
|
|
115
|
-
emit("update",
|
|
115
|
+
emit("update", false);
|
|
116
116
|
};
|
|
117
117
|
</script>
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
<VModal ref="modalRef" entity="slide" :callback="deleteCallback"></VModal>
|
|
50
50
|
</template>
|
|
51
51
|
<script setup>
|
|
52
|
-
import {
|
|
52
|
+
import {ref} from "vue";
|
|
53
53
|
import PlusIcon from "@/assets/img/icons/plus.svg";
|
|
54
|
-
import {
|
|
54
|
+
import {defaultProps} from "@/components/helpers/defaultProps.js";
|
|
55
55
|
import { createSlide } from "@/components/helpers/pageBuilderFactory.js";
|
|
56
56
|
import ActionMenu from "@/components/common/ActionMenu.vue";
|
|
57
57
|
import VModal from "@/components/common/VModal.vue";
|
|
@@ -85,7 +85,7 @@ const toggleSlide = (index) => {
|
|
|
85
85
|
|
|
86
86
|
const addItem = () => {
|
|
87
87
|
dataRef.value.data.push(createSlide());
|
|
88
|
-
emit("update",
|
|
88
|
+
emit("update", false);
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
const handleDeleteItem = (index) => {
|
|
@@ -94,7 +94,7 @@ const handleDeleteItem = (index) => {
|
|
|
94
94
|
|
|
95
95
|
const deleteCallback = (index) => {
|
|
96
96
|
dataRef.value.data.splice(index, 1);
|
|
97
|
-
emit("update",
|
|
97
|
+
emit("update", false);
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const edit = (item, index) => {
|
|
@@ -36,7 +36,7 @@ const url = defineModel("url");
|
|
|
36
36
|
const openInNewTab = defineModel("openInNewTab");
|
|
37
37
|
|
|
38
38
|
defineProps({
|
|
39
|
-
label: { type:
|
|
39
|
+
label: { type: String, required: false },
|
|
40
40
|
sites: { type: Object, required: true },
|
|
41
41
|
name: { type: String, required: true },
|
|
42
42
|
options: { type: Array, required: false, default: ["site-content", "external-page"] },
|
|
@@ -8,7 +8,7 @@ export function createSlide(overrides = {}) {
|
|
|
8
8
|
show: false,
|
|
9
9
|
label: "",
|
|
10
10
|
type: "site-content",
|
|
11
|
-
|
|
11
|
+
url: '',
|
|
12
12
|
is_new_tab: false,
|
|
13
13
|
...(overrides.primary_button || {}),
|
|
14
14
|
},
|
|
@@ -16,7 +16,7 @@ export function createSlide(overrides = {}) {
|
|
|
16
16
|
show: false,
|
|
17
17
|
label: "",
|
|
18
18
|
type: "site-content",
|
|
19
|
-
|
|
19
|
+
url: '',
|
|
20
20
|
is_new_tab: false,
|
|
21
21
|
...(overrides.secondary_button || {}),
|
|
22
22
|
},
|
|
@@ -27,7 +27,7 @@ export function createSlide(overrides = {}) {
|
|
|
27
27
|
export function createLink(overrides = {}) {
|
|
28
28
|
return {
|
|
29
29
|
title: "New link",
|
|
30
|
-
|
|
30
|
+
url: "",
|
|
31
31
|
open_in_new_tab: true,
|
|
32
32
|
type: "site-content",
|
|
33
33
|
...(overrides || {}),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col">
|
|
3
|
+
<p v-if="component?.title" class="pb-4 text-4xl font-semibold text-white">{{ component?.title }}</p>
|
|
4
|
+
<p v-if="component?.supporting_text" class="text-navy-25 text-xl font-normal leading-[30px]">{{ component?.supporting_text }}</p>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref } from "vue";
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
component: {
|
|
13
|
+
required: true,
|
|
14
|
+
type: Object,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const component = ref(props.component);
|
|
19
|
+
</script>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex justify-center h-[136px] w-full relative rounded-b-[48px] bg-navy-600 -mt-12 gap-[60px]">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div class="flex justify-center h-[136px] w-full relative rounded-b-[48px] bg-navy-600 -mt-12 gap-[60px]" :class="{'bg-transparent !justify-start flex-wrap mt-8 !h-full !gap-4': isLinkGrid}">
|
|
3
|
+
<div class="flex justify-center" :class="{'!block': isLinkGrid}" v-for="link in component.data">
|
|
4
|
+
<a
|
|
5
|
+
:target="link.open_in_new_tab ? '_blank' : ''"
|
|
6
|
+
:href="link.url"
|
|
7
|
+
class="text-white flex gap-1.5 items-center cursor-pointer mt-12 text-sm font-semibold hover:text-gray-300"
|
|
8
|
+
:class="{'bg-white border border-gray-300 rounded-full !text-gray-700 px-4 h-[44px] w-max !mt-0 !text-base hover:bg-gray-100': isLinkGrid}"
|
|
9
|
+
>
|
|
10
|
+
<span>{{ link.title }}</span><ArrowUpRight class="w-5 h-5"></ArrowUpRight>
|
|
11
|
+
</a>
|
|
12
|
+
</div>
|
|
10
13
|
</div>
|
|
11
14
|
</template>
|
|
12
15
|
|
|
@@ -22,4 +25,5 @@ const props = defineProps({
|
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
const component = ref(props.component);
|
|
28
|
+
const isLinkGrid = component.value.type === 'link_grid';
|
|
25
29
|
</script>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex h-[872px] w-full bg-navy-800 relative rounded-[48px] z-10">
|
|
3
|
-
<Carousel :items-to-show="1" v-model="currentSlide" class="carousel w-full" :
|
|
4
|
-
<Slide v-for="(slide, index) in
|
|
5
|
-
<div class="lg:p-8 p-4 flex relative">
|
|
3
|
+
<Carousel :items-to-show="1" v-model="currentSlide" class="carousel w-full" :wrap-around="true">
|
|
4
|
+
<Slide v-for="(slide, index) in slides" :key="index">
|
|
5
|
+
<div class="lg:p-8 p-4 flex relative w-full">
|
|
6
6
|
<div class="lg:w-1/2 lg:pl-8 lg:pr-16 pl-4 pr-8 flex flex-col lg:mt-[218px] mt-[100px] absolute top-0 left-5 lg:relative">
|
|
7
7
|
<div class="gap-2 flex z-10 mb-4">
|
|
8
|
-
<a v-if="
|
|
9
|
-
v-for="(slide, index) in
|
|
8
|
+
<a v-if="slides.length > 1"
|
|
9
|
+
v-for="(slide, index) in slides"
|
|
10
10
|
@click="currentSlide = index" class="w-4 h-1 bg-navy-400 rounded-full cursor-pointer" :class="{'!w-12 !bg-white' : currentSlide === index}"
|
|
11
11
|
></a>
|
|
12
12
|
</div>
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
<p class="text-lg font-normal text-navy-50" v-html="slide?.description"></p>
|
|
15
15
|
<div class="flex gap-3 mt-8 flex-col lg:flex-row">
|
|
16
16
|
<a class="text-white text-base font-semibold border border-white px-6 py-2 rounded-full hover:bg-navy-800 hover:opacity-60"
|
|
17
|
-
:href="slide.secondary_button.
|
|
17
|
+
:href="slide.secondary_button.url"
|
|
18
18
|
v-if="slide.secondary_button.show"
|
|
19
19
|
:target="slide.secondary_button.open_in_new_tab ? '_blank' : ''">
|
|
20
20
|
<span>{{ slide.secondary_button.label }}</span>
|
|
21
21
|
</a>
|
|
22
22
|
<a class=" flex items-center gap-2 text-navy-800 bg-white text-base font-semibold border border-white px-6 py-2 rounded-full hover:bg-navy-50"
|
|
23
|
-
:href="slide.primary_button.
|
|
23
|
+
:href="slide.primary_button.url"
|
|
24
24
|
v-if="slide.primary_button.show"
|
|
25
25
|
:target="slide.primary_button.open_in_new_tab ? '_blank' : ''">
|
|
26
26
|
{{ slide.primary_button.label }}
|
|
@@ -53,7 +53,8 @@ const props = defineProps({
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
const currentSlide = ref(0);
|
|
56
|
-
const
|
|
56
|
+
const componentData = ref(props.component);
|
|
57
|
+
const slides = componentData.value.data.filter((o) => o.public);
|
|
57
58
|
</script>
|
|
58
59
|
|
|
59
60
|
<style scoped>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="rounded-[48px] max-w-[1392px] 1xl:max-w-[1824px] mx-auto w-full">
|
|
3
|
-
<div v-for="(component, index) in section.components">
|
|
3
|
+
<div v-for="(component, index) in section.components" class="md:px-[90px]">
|
|
4
4
|
<component
|
|
5
5
|
:is="currentComponent(component)"
|
|
6
6
|
:key="index"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-full bg-navy-800 py-10 relative lg:h-[336px]">
|
|
3
|
+
<div class="1xl:max-w-[1824px] mx-auto lg:pl-[120px] pl-4 relative z-10">
|
|
4
|
+
<div v-for="(component, index) in section.components" class="w-2/3">
|
|
5
|
+
<component
|
|
6
|
+
:is="currentComponent(component)"
|
|
7
|
+
:key="index"
|
|
8
|
+
:component="component"
|
|
9
|
+
></component>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<HeaderVector class="absolute right-0 top-0"></HeaderVector>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { ref, markRaw } from "vue";
|
|
18
|
+
import VLinkPresenter from "@/components/presenters/components/VLinkPresenter.vue";
|
|
19
|
+
import VHeaderPresenter from "@/components/presenters/components/VHeaderPresenter.vue";
|
|
20
|
+
import HeaderVector from "@/assets/svg/header_right_vector.svg";
|
|
21
|
+
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
section: {
|
|
24
|
+
required: true,
|
|
25
|
+
type: Object,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const section = ref(props.section);
|
|
30
|
+
const componentMaps = ref({
|
|
31
|
+
header: markRaw(VHeaderPresenter),
|
|
32
|
+
link_grid: markRaw(VLinkPresenter),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const currentComponent = (component) => {
|
|
36
|
+
if (!component?.type) {
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return componentMaps.value[component?.type];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
</script>
|