@dcodegroup-au/page-builder 0.4.1 → 0.4.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 +358 -348
- package/dist/page-builder.umd.js +2 -2
- package/example/src/App.vue +2 -1
- 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/PageBuilder.vue +1 -1
- package/src/components/presenters/modules/Callout.vue +5 -5
- package/src/components/presenters/modules/LinkCard.vue +20 -9
- package/src/components/presenters/modules/StandardHeader.vue +2 -2
- package/src/components/presenters/modules/TwoColumnsImageContent.vue +1 -1
package/example/src/App.vue
CHANGED
|
@@ -4,6 +4,7 @@ import {BestLife} from "./pages/BestLife.js";
|
|
|
4
4
|
import {AboutUs} from "./pages/AboutUs.js";
|
|
5
5
|
import {OurVision} from "./pages/OurVision.js";
|
|
6
6
|
import {OurCommitment} from "./pages/OurCommitment.js";
|
|
7
|
+
import {OurHistory} from "./pages/OurHistory.js";
|
|
7
8
|
|
|
8
9
|
const slide = {
|
|
9
10
|
title: "About ELAA",
|
|
@@ -90,7 +91,7 @@ const breadcrumbs = [
|
|
|
90
91
|
{{ JSON.stringify(OurVision) }}
|
|
91
92
|
<div style="margin: 40px 0">
|
|
92
93
|
<h1 style="margin-bottom: 20px; font-size: 50px;">Page Render</h1>
|
|
93
|
-
<PageRender :page="
|
|
94
|
+
<PageRender :page="BestLife"/>
|
|
94
95
|
</div>
|
|
95
96
|
<div style="margin: 40px 0">
|
|
96
97
|
<h1 style="margin-bottom: 20px; font-size: 50px;">Slider Edit</h1>
|
|
@@ -31,8 +31,8 @@ export const OurCommitment =
|
|
|
31
31
|
supporting_text: "ELAA’s members operate across all of Victoria. We acknowledge the traditional owners of the land that our members services are on and pay our respects to Elders past, present and future and pay our respects to all Aboriginal and Torres Strait Islander communities, land and water in these regions.",
|
|
32
32
|
supporting_text_label: "Text *",
|
|
33
33
|
supporting_text_max_length: 500,
|
|
34
|
-
featured_image: "https://
|
|
35
|
-
featured_image2: "https://
|
|
34
|
+
featured_image: "https://beta-public.elaa.org.au/fileman/Page Builder/australianaboriginalflagsvg.png",
|
|
35
|
+
featured_image2: "https://beta-public.elaa.org.au/fileman/Page Builder/someimagewidth-1600bcb4ad3.jpg"
|
|
36
36
|
},
|
|
37
37
|
]
|
|
38
38
|
},
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export const OurHistory = {
|
|
2
|
+
title: "Our History",
|
|
3
|
+
sections: [{
|
|
4
|
+
"type": "standard_header",
|
|
5
|
+
"title": "Standard header",
|
|
6
|
+
"components": [{
|
|
7
|
+
"name": "Standard header",
|
|
8
|
+
"type": "header",
|
|
9
|
+
"title": "Our History",
|
|
10
|
+
"supporting_text": "ELAA’s history dates back to the early 1990s and reflects the increasing recognition of the importance of early learning.",
|
|
11
|
+
"supporting_text_max_length": 500
|
|
12
|
+
}]
|
|
13
|
+
}, {
|
|
14
|
+
"type": "timeline",
|
|
15
|
+
"title": "Timeline",
|
|
16
|
+
"components": [{
|
|
17
|
+
"name": "Section header",
|
|
18
|
+
"type": "header",
|
|
19
|
+
"title": "Journey of Growth and Impact",
|
|
20
|
+
"supporting_text": "Kindergarten Parents Victoria (now Early Learning Association Australia) was established in 1991 to ensure that early childhood education thrived in Victoria."
|
|
21
|
+
}, {
|
|
22
|
+
"data": [{
|
|
23
|
+
"lines": [{
|
|
24
|
+
"title": "Vision and Dedication",
|
|
25
|
+
"description": "The organisation sprang from the vision and dedication of two key founders – Marg Stephens and Karen Weston who, with other parents passionate about the right of children to access high quality education, formed a group called Parent Action for Kindergartens over 30 years ago."
|
|
26
|
+
}, {
|
|
27
|
+
"title": "Formation Efforts",
|
|
28
|
+
"description": "The group worked with Victorian members of Parliament; the Office of Preschool and Childcare; and a variety of organisations such as the Australian Early Childhood Association and the Anglican and Uniting Churches Early Childhood Industrial Council toward the formation of a State-wide organisation."
|
|
29
|
+
}, {
|
|
30
|
+
"title": "Free Downloadable Resources",
|
|
31
|
+
"description": "Explore a variety of no-cost tools and information available to everyone."
|
|
32
|
+
}], "title": "30+ years ago", "max_items": 5, "group_title": "Parent Action for Kindergartens"
|
|
33
|
+
}, {
|
|
34
|
+
"lines": [{
|
|
35
|
+
"title": "Free Downloadable Resources",
|
|
36
|
+
"description": "<p>Explore a variety of no-cost tools and information available to everyone.</p>"
|
|
37
|
+
}, {
|
|
38
|
+
"title": "Free Downloadable Resources",
|
|
39
|
+
"description": "<p>Explore a variety of no-cost tools and information available to everyone.</p>"
|
|
40
|
+
}], "title": "May 1991", "max_items": 5
|
|
41
|
+
}],
|
|
42
|
+
"name": "Timeline Items",
|
|
43
|
+
"type": "timeline_items",
|
|
44
|
+
"max_items": 10,
|
|
45
|
+
"supportive_text": "Manage the timeline items."
|
|
46
|
+
}]
|
|
47
|
+
}, {
|
|
48
|
+
"type": "link_card",
|
|
49
|
+
"title": "Link card section",
|
|
50
|
+
"display": "vertical",
|
|
51
|
+
"components": [{
|
|
52
|
+
"name": "Section header",
|
|
53
|
+
"type": "header",
|
|
54
|
+
"title": "Explore Further",
|
|
55
|
+
"has_extra": true,
|
|
56
|
+
"featured_image": "https://dev.elaa.com/img/history/hesta-child-care.png",
|
|
57
|
+
"supporting_text": "Learn more about our history and past"
|
|
58
|
+
}, {
|
|
59
|
+
"data": [{
|
|
60
|
+
"icon": "AlertCircle",
|
|
61
|
+
"title": "Read more about our history",
|
|
62
|
+
"public": true,
|
|
63
|
+
"description": "<p>Happy Birthday ELAA – celebrating 30 years of service to members</p>",
|
|
64
|
+
"primary_button": {
|
|
65
|
+
"url": "https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png",
|
|
66
|
+
"name": "Button",
|
|
67
|
+
"show": false,
|
|
68
|
+
"type": "external-page",
|
|
69
|
+
"label": "Learn more",
|
|
70
|
+
"open_in_new_tab": true
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
"icon": "AlignLeft01",
|
|
74
|
+
"title": "Read more about our history",
|
|
75
|
+
"public": true,
|
|
76
|
+
"description": "Happy Birthday ELAA – celebrating 30 years of service to members",
|
|
77
|
+
"primary_button": {
|
|
78
|
+
"url": "https://beta-frontend.elaa.org.au/img/homepage/asset_free_resources.png",
|
|
79
|
+
"name": "Button",
|
|
80
|
+
"show": true,
|
|
81
|
+
"type": "external-page",
|
|
82
|
+
"label": "Learn more",
|
|
83
|
+
"open_in_new_tab": true
|
|
84
|
+
}
|
|
85
|
+
}, ], "name": "Link cards", "type": "link_cards", "max_items": 4, "supportive_text": "Manage the link cards."
|
|
86
|
+
}]
|
|
87
|
+
}]
|
|
88
|
+
};
|
|
@@ -27,6 +27,7 @@ export const OurVision =
|
|
|
27
27
|
title_label: "Eyebrow heading",
|
|
28
28
|
supporting_text: "Excellence and equity in early childhood education and care",
|
|
29
29
|
supporting_text_label: "Message *",
|
|
30
|
+
supporting_text_max_length: 500,
|
|
30
31
|
featured_image: "https://beta-frontend.elaa.org.au/img/our-vision-and-purpose.png"
|
|
31
32
|
},
|
|
32
33
|
]
|
|
@@ -41,6 +42,7 @@ export const OurVision =
|
|
|
41
42
|
title: "Our Purpose",
|
|
42
43
|
has_extra: true,
|
|
43
44
|
title_label: "Eyebrow heading",
|
|
45
|
+
supporting_text_max_length: 500,
|
|
44
46
|
supporting_text: "To build meaningful, reliable, and human-centered software that solves real problems, empowers users, and advances innovation responsibly.",
|
|
45
47
|
supporting_text_label: "Message *",
|
|
46
48
|
},
|
package/package.json
CHANGED
|
@@ -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);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<component
|
|
64
64
|
class="min-h-[90vh]"
|
|
65
65
|
:is="currentComponent"
|
|
66
|
-
:key="`${selected?.sectionIndex} - ${selected?.componentIndex}`"
|
|
66
|
+
:key="`${selected?.sectionIndex} - ${selected?.componentIndex} ${Math.random().toString(36).substring(2, 10)}`"
|
|
67
67
|
:data="selected"
|
|
68
68
|
:sites="sites"
|
|
69
69
|
@update="save"
|
|
@@ -2,21 +2,21 @@
|
|
|
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
6
|
<img v-if="imageComponent && section?.acknowledgement_style"
|
|
7
7
|
:src="imageComponent.featured_image" :alt="imageComponent?.caption ?? 'Image'"
|
|
8
|
-
class="w-[560px] object-cover rounded-[24px]"/>
|
|
8
|
+
class="w-[560px] object-cover rounded-[24px] h-full"/>
|
|
9
9
|
<img v-if="headerComponent?.featured_image && !section?.acknowledgement_style"
|
|
10
10
|
:src="headerComponent?.featured_image"
|
|
11
|
-
class="w-[560px] object-cover rounded-[24px]"
|
|
11
|
+
class="w-[560px] object-cover rounded-[24px] h-full"
|
|
12
12
|
alt="Feature"/>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div v-if="headerComponent"
|
|
16
16
|
class="rounded-[24px] flex items-center justify-center flex-col"
|
|
17
17
|
:class="{
|
|
18
|
-
'bg-pale-100 min-h-[320px] w-
|
|
19
|
-
'border border-brand-400 w-
|
|
18
|
+
'bg-pale-100 min-h-[320px] w-full': !headerComponent?.featured_image,
|
|
19
|
+
'border border-brand-400 w-full py-8': headerComponent?.featured_image,
|
|
20
20
|
'w-full ': !section?.acknowledgement_style,
|
|
21
21
|
'bg-gray-100 border-none': section?.acknowledgement_style,
|
|
22
22
|
}"
|
|
@@ -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>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
class="md:px-[90px]"
|
|
5
5
|
:class="{'flex flex-col items-center text-center': section.components[0]?.center, 'mb-[64px]': hasFeaturedImage}">
|
|
6
6
|
<div class="bg-navy-50 rounded-[48px] relative pt-[164px] px-[120px]">
|
|
7
|
-
<h3 class="text-[48px] font-semibold text-gray-900 w-
|
|
8
|
-
<h3 class="text-xl font-normal text-gray-600 mt-3 w-
|
|
7
|
+
<h3 class="text-[48px] font-semibold text-gray-900 w-full max-w-[800px] leading-[60px] tracking-[-1px]">{{ section.components[0].title }}</h3>
|
|
8
|
+
<h3 class="text-xl font-normal text-gray-600 mt-3 w-full max-w-[800px]" :class="{'pb-[100px]': !hasFeaturedImage}">{{ section.components[0].supporting_text }}</h3>
|
|
9
9
|
<img
|
|
10
10
|
v-if="hasFeaturedImage"
|
|
11
11
|
:src="section.components[0]?.featured_image"
|
|
@@ -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]">
|