@dcodegroup-au/page-builder 0.0.2 → 0.0.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 +2443 -2336
- package/dist/page-builder.umd.js +39 -39
- package/example/src/App.vue +12 -6
- package/package.json +1 -1
- package/src/assets/css/style.css +1 -1
- package/src/components/PageBuilder.vue +63 -68
- package/src/components/PageRender.vue +1 -1
- package/src/components/SlideEdit.vue +32 -9
- package/src/components/builders/VLinks.vue +3 -21
- package/src/components/builders/VSliders.vue +37 -16
- package/src/components/common/ActionMenu.vue +18 -1
- package/src/components/common/FileUpload.vue +16 -6
- package/src/components/common/InputWrapper.vue +33 -15
- package/src/components/common/QuillEditor.vue +0 -2
- package/src/components/helpers/pageBuilderFactory.js +8 -7
- package/src/components/presenters/components/VSliderPresenter.vue +4 -4
- package/src/components/presenters/modules/HeroHeader.vue +1 -1
- package/tailwind.config.js +9 -0
- package/example/src/components/HelloWorld.vue +0 -43
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
export function createSlide(overrides = {}) {
|
|
2
2
|
return {
|
|
3
3
|
title: "New slide",
|
|
4
|
+
description: "New description",
|
|
4
5
|
public: false,
|
|
5
6
|
featured_image: "",
|
|
6
7
|
primary_button: {
|
|
7
8
|
show: false,
|
|
8
9
|
label: "",
|
|
9
10
|
type: "site-content",
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
link_to: '',
|
|
12
|
+
is_new_tab: false,
|
|
12
13
|
...(overrides.primary_button || {}),
|
|
13
14
|
},
|
|
14
15
|
secondary_button: {
|
|
15
16
|
show: false,
|
|
16
17
|
label: "",
|
|
17
18
|
type: "site-content",
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
link_to: '',
|
|
20
|
+
is_new_tab: false,
|
|
20
21
|
...(overrides.secondary_button || {}),
|
|
21
22
|
},
|
|
22
23
|
...overrides,
|
|
@@ -25,9 +26,9 @@ export function createSlide(overrides = {}) {
|
|
|
25
26
|
|
|
26
27
|
export function createLink(overrides = {}) {
|
|
27
28
|
return {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
open_in_new_tab:
|
|
29
|
+
title: "New link",
|
|
30
|
+
link_to: "",
|
|
31
|
+
open_in_new_tab: true,
|
|
31
32
|
type: "site-content",
|
|
32
33
|
...(overrides || {}),
|
|
33
34
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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" autoplay="5000" :wrap-around="true">
|
|
3
|
+
<Carousel :items-to-show="1" v-model="currentSlide" class="carousel w-full" :autoplay="5000" :wrap-around="true">
|
|
4
4
|
<Slide v-for="(slide, index) in component.data" :key="index">
|
|
5
|
-
<div class="lg:p-8 p-4 flex
|
|
5
|
+
<div class="lg:p-8 p-4 flex relative">
|
|
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
8
|
<a v-if="component.data.length > 1"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
></a>
|
|
12
12
|
</div>
|
|
13
13
|
<h3 class="lg:text-[48px] text-[40px] font-semibold text-white mb-3 lg:leading-normal leading-[48px]">{{ slide?.title }}</h3>
|
|
14
|
-
<p class="text-lg font-normal text-navy-50"
|
|
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
17
|
:href="slide.secondary_button.link_to"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
v-if="slide.featured_image"
|
|
33
33
|
:src="slide.featured_image"
|
|
34
34
|
alt="Slide Image"
|
|
35
|
-
class="rounded-[40px] h-[674px] lg:w-1/2 w-full object-cover"/>
|
|
35
|
+
class="rounded-[40px] h-[674px] max-w-[882px] lg:w-1/2 w-full object-cover"/>
|
|
36
36
|
</div>
|
|
37
37
|
</Slide>
|
|
38
38
|
</Carousel>
|
package/tailwind.config.js
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
|
|
4
|
-
defineProps({
|
|
5
|
-
msg: String,
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
const count = ref(0)
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<h1>{{ msg }}</h1>
|
|
13
|
-
|
|
14
|
-
<div class="card">
|
|
15
|
-
<button type="button" @click="count++">count is {{ count }}</button>
|
|
16
|
-
<p>
|
|
17
|
-
Edit
|
|
18
|
-
<code>components/HelloWorld.vue</code> to test HMR
|
|
19
|
-
</p>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<p>
|
|
23
|
-
Check out
|
|
24
|
-
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
|
25
|
-
>create-vue</a
|
|
26
|
-
>, the official Vue + Vite starter
|
|
27
|
-
</p>
|
|
28
|
-
<p>
|
|
29
|
-
Learn more about IDE Support for Vue in the
|
|
30
|
-
<a
|
|
31
|
-
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
|
32
|
-
target="_blank"
|
|
33
|
-
>Vue Docs Scaling up Guide</a
|
|
34
|
-
>.
|
|
35
|
-
</p>
|
|
36
|
-
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<style scoped>
|
|
40
|
-
.read-the-docs {
|
|
41
|
-
color: #888;
|
|
42
|
-
}
|
|
43
|
-
</style>
|