-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtest-inline.html
107 lines (100 loc) · 3.02 KB
/
test-inline.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Vue Pagebuilder</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"
/>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="editor/editor.css" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.4.2/vue.global.prod.min.js"
integrity="sha512-YrmKYDNQKVmL5Y3xfdyNrp7atx+/XpIevYmFWoXMBitv2UitzwPwDzg/1H2UnBwelWgzDUd8Ex7L8bw61aK0jA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<link
rel="stylesheet"
href="https://vue-pagebuilder.vercel.app/editor/js/iconpicker/iconpicker-1.5.0.css"
/>
<script src="https://vue-pagebuilder.vercel.app/editor/js/iconpicker/iconpicker-1.5.0.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Rubik:wght@300;600&family=Lobster&family=Playfair+Display&family=Raleway&family=Cutive+Mono&display=swap"
rel="stylesheet"
/>
</head>
<body>
<main id="app">
<div id="content">
<section v-for="item in entries">
<div v-if="item.layout == 'featured'">
<div
:id="item.id"
class="editable"
data-fields="title=txt&body=rte"
>
<div class="container">
<div class="w-50 m-auto text-center">
<h2 v-text="item.title"></h2>
<p v-html="item.body"></p>
</div>
</div>
</div>
</div>
</section>
</div>
<page-editor
v-if="editing"
v-bind:layouts="layouts"
v-bind:entries="entries"
></page-editor>
</main>
<script type="module">
import Editor from "./editor/editor.mjs";
const app = Vue.createApp({
data() {
return {
editing: true,
layouts: ["featured"],
entries: [
{
layout: "featured",
id: "item-1",
title: "A first item",
body: "Lorem ipsum dolor site amet",
},
{
layout: "featured",
id: "item-2",
title: "A second item",
body: "Nam at tincidunt libero, ut iaculis augue.",
},
],
};
},
methods: {
defaultVal(key, def) {
if (key == "") {
return def;
} else {
return key;
}
},
},
components: {
"page-editor": Editor,
},
});
app.mount("#app");
</script>
</body>
</html>