@dcodegroup-au/page-builder 0.4.2 → 0.4.4
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 +375 -362
- package/dist/page-builder.umd.js +1 -1
- package/example/src/App.vue +3 -2
- package/example/src/pages/OurCommitment.js +2 -2
- package/example/src/pages/OurHistory.js +88 -0
- package/example/src/pages/OurVision.js +2 -0
- package/package.json +1 -1
- package/src/components/ItemEdit.vue +5 -5
- package/src/components/presenters/modules/Callout.vue +8 -5
- package/src/components/presenters/modules/LinkCard.vue +20 -9
- package/src/components/presenters/modules/TwoColumnsImageContent.vue +1 -1
|
@@ -232,11 +232,6 @@ const addLine = () => {
|
|
|
232
232
|
advancedForm.value.lines.push({title: "", description: ""});
|
|
233
233
|
};
|
|
234
234
|
|
|
235
|
-
const removeLine = (index) => {
|
|
236
|
-
advancedForm.value.lines.splice(index, 1);
|
|
237
|
-
this.save();
|
|
238
|
-
};
|
|
239
|
-
|
|
240
235
|
const save = () => {
|
|
241
236
|
let form = hasLines.value ? advancedForm : basicForm;
|
|
242
237
|
|
|
@@ -254,6 +249,11 @@ const save = () => {
|
|
|
254
249
|
emit("update", form.value);
|
|
255
250
|
};
|
|
256
251
|
|
|
252
|
+
const removeLine = (index) => {
|
|
253
|
+
advancedForm.value.lines.splice(index, 1);
|
|
254
|
+
save();
|
|
255
|
+
};
|
|
256
|
+
|
|
257
257
|
const close = () => {
|
|
258
258
|
let form = hasLines.value ? advancedForm : basicForm;
|
|
259
259
|
emit("close", form.value);
|
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
<div class="overflow-hidden">
|
|
3
3
|
<div class="max-w-[1640px] md:px-[120px] mx-auto w-full mt-[40px]"
|
|
4
4
|
:class="{'flex gap-8': headerComponent?.featured_image}">
|
|
5
|
-
<div class="w-
|
|
5
|
+
<div class="max-w-[33.3%] w-full min-h-[320px]"
|
|
6
|
+
v-if="(imageComponent && section?.acknowledgement_style)
|
|
7
|
+
|| (headerComponent?.featured_image && !section?.acknowledgement_style)"
|
|
8
|
+
>
|
|
6
9
|
<img v-if="imageComponent && section?.acknowledgement_style"
|
|
7
10
|
:src="imageComponent.featured_image" :alt="imageComponent?.caption ?? 'Image'"
|
|
8
|
-
class="w-[560px] object-cover rounded-[24px]"/>
|
|
11
|
+
class="w-[560px] object-cover rounded-[24px] h-full"/>
|
|
9
12
|
<img v-if="headerComponent?.featured_image && !section?.acknowledgement_style"
|
|
10
13
|
:src="headerComponent?.featured_image"
|
|
11
|
-
class="w-[560px] object-cover rounded-[24px]"
|
|
14
|
+
class="w-[560px] object-cover rounded-[24px] h-full"
|
|
12
15
|
alt="Feature"/>
|
|
13
16
|
</div>
|
|
14
17
|
|
|
15
18
|
<div v-if="headerComponent"
|
|
16
19
|
class="rounded-[24px] flex items-center justify-center flex-col"
|
|
17
20
|
:class="{
|
|
18
|
-
'bg-pale-100 min-h-[320px] w-
|
|
19
|
-
'border border-brand-400 w-
|
|
21
|
+
'bg-pale-100 min-h-[320px] w-full': !headerComponent?.featured_image,
|
|
22
|
+
'border border-brand-400 w-full py-8': headerComponent?.featured_image,
|
|
20
23
|
'w-full ': !section?.acknowledgement_style,
|
|
21
24
|
'bg-gray-100 border-none': section?.acknowledgement_style,
|
|
22
25
|
}"
|
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
<div v-if="headerComponent?.supporting_text" class="text-[20px] font-normal mt-2 text-gray-600 leading-[30px] max-w-[768px] mx-auto" v-html="headerComponent.supporting_text"></div>
|
|
7
7
|
</div>
|
|
8
8
|
<div v-if="cardComponent" class="flex w-full" :class="{'gap-8': headerComponent?.featured_image}">
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<div class="w-full" ref="leftColumn" v-if="headerComponent?.featured_image">
|
|
10
|
+
<img
|
|
11
|
+
:src="headerComponent?.featured_image"
|
|
12
|
+
class="rounded-br-[24px] rounded-tl-[24px] h-full w-full object-cover"
|
|
13
|
+
alt="Feature"/>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="flex gap-8 w-full" ref="rightColumn" :class="{'flex-col h-fit': headerComponent?.featured_image}">
|
|
14
16
|
<div v-for="(data, index) in cardComponent.data" class="relative bg-white p-8 rounded-[24px] w-full">
|
|
15
17
|
<div v-if="data.icon" class="w-[48px] h-[48px] flex justify-center items-center rounded-[10px] text-white bg-aqua-900 mb-4">
|
|
16
18
|
<IconComponent :icon="data.icon" icon-classes="w-5 h-5" :key="index"></IconComponent>
|
|
17
19
|
</div>
|
|
18
20
|
<h1 class="text-[20px] font-semibold text-gray-900">{{ data.title }}</h1>
|
|
19
|
-
<div class="text-lg text-gray-600 mt-2
|
|
21
|
+
<div class="text-lg text-gray-600 mt-2 leading-[24px]" v-html="data.description"></div>
|
|
20
22
|
<a
|
|
21
|
-
v-if="data?.primary_button.
|
|
22
|
-
class="text-brand-700 inline-flex gap-1.5 items-center font-semibold text-base"
|
|
23
|
+
v-if="data?.primary_button.show"
|
|
24
|
+
class="text-brand-700 inline-flex gap-1.5 items-center font-semibold text-base mt-4"
|
|
23
25
|
:href="formatUrl(data.primary_button.url)"
|
|
24
26
|
:target="data.primary_button.open_in_new_tab ? '_blank' : ''">
|
|
25
27
|
{{ data.primary_button.label }}
|
|
@@ -31,8 +33,9 @@
|
|
|
31
33
|
</div>
|
|
32
34
|
</div>
|
|
33
35
|
</template>
|
|
36
|
+
|
|
34
37
|
<script setup>
|
|
35
|
-
import {ref, computed} from "vue";
|
|
38
|
+
import { ref, computed, onMounted } from "vue";
|
|
36
39
|
import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
|
|
37
40
|
import IconComponent from "@/components/common/Icon.vue";
|
|
38
41
|
import { formatUrl } from "@/components/helpers/common";
|
|
@@ -52,4 +55,12 @@ const cardComponent = computed(() => {
|
|
|
52
55
|
return section.value.components.find((component) => component.type === "link_cards");
|
|
53
56
|
});
|
|
54
57
|
|
|
58
|
+
const leftColumn = ref(null);
|
|
59
|
+
const rightColumn = ref(null);
|
|
60
|
+
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
if (leftColumn.value && rightColumn.value) {
|
|
63
|
+
leftColumn.value.style.height = `${rightColumn.value.offsetHeight}px`;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
55
66
|
</script>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<div class="flex flex-row gap-8">
|
|
25
25
|
<div class="grid grid-cols-2 gap-8 w-2/3">
|
|
26
26
|
<div v-for="item in featureItemsComponent.data" class="flex gap-3">
|
|
27
|
-
<div v-if="item?.icon" class="w-[48px] h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
|
|
27
|
+
<div v-if="item?.icon" class="max-w-[48px] min-w-[48px] w-full h-[48px] bg-brand-100 border-[8px] border-brand-50 rounded-full flex items-center justify-center">
|
|
28
28
|
<IconComponent :icon="item.icon" icon-classes="w-5 h-5 text-brand-600"></IconComponent>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="max-w-[324px]">
|