-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.html
83 lines (78 loc) · 2.27 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GrapesJS Style Gradient</title>
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
<link href="https://unpkg.com/grapick/dist/grapick.min.css" rel="stylesheet">
<script src="https://unpkg.com/grapesjs"></script>
<style>
body,
html {
height: 100%;
margin: 0;
}
.gjs-sm-sector .gjs-sm-gradient {
width: 100%;
}
.grp-wrapper {
margin: 15px 0;
}
.grp-handler-close {
background-color: #444;
color: #ddd;
}
.grp-handler-cp-wrap {
border-color: #444;
}
.grp-preview,
.grp-wrapper {
border-radius: 3px;
}
</style>
</head>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
<div
data-gjs-stylable='["color", "background-color", "background-image", "Direction", "Type"]'
style="padding:25px;
text-align: center;
color: white;
min-height: 500px;
font: caption;
background-image: linear-gradient(90deg, rgb(0, 255, 205) 1%, rgb(227, 162, 220) 99%)">
<h1 style="font-size: 3rem">Gradient</h1>
<div style="font-size: 1.7rem; line-height: 3rem">
This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can
copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.
</div>
</div>
</div>
<script>
window.onload = () => {
window.editor = grapesjs.init({
fromElement: true,
container: '#gjs',
height: '100%',
storageManager: false,
plugins: ['grapesjs-style-gradient'],
pluginsOpts: {
'grapesjs-style-gradient': {
colorPicker: 'default',
grapickOpts: {
min: 1,
max: 99,
}
}
}
});
window.editor.StyleManager.addProperty('decorations', {
name: 'Gradient',
property: 'background-image',
type: 'gradient',
defaults: 'none'
});
};
</script>
</body>
</html>