DmitrMakeev commited on
Commit
ddc5b7c
·
verified ·
1 Parent(s): b1689f3

Update builder.html

Browse files
Files changed (1) hide show
  1. builder.html +70 -76
builder.html CHANGED
@@ -4,11 +4,7 @@
4
  <meta charset="utf-8">
5
  <title>GrapesJS</title>
6
  <link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
7
-
8
  <script src="https://unpkg.com/grapesjs"></script>
9
-
10
- <script src="path/to/grapesjs-custom-code.min.js"></script>
11
-
12
  <style>
13
  body,
14
  html {
@@ -32,7 +28,7 @@
32
  This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can
33
  copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.
34
  </div>
35
- <button class="add-button">Зарегистрироваться</button>
36
  </div>
37
  <style>
38
  .panel {
@@ -41,9 +37,9 @@
41
  border-radius: 3px;
42
  padding: 30px 20px;
43
  margin: 150px auto 0px;
44
- background-color: #ffe478;
45
  box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.25);
46
- color:rgba(0, 0, 0, 0.75);
47
  font: caption;
48
  font-weight: 100;
49
  }
@@ -80,7 +76,7 @@
80
  padding: 10px 20px;
81
  font-size: 1rem;
82
  color: #fff;
83
- background-color: #02ba24;
84
  border: none;
85
  border-radius: 5px;
86
  cursor: pointer;
@@ -88,73 +84,71 @@
88
  </style>
89
  </div>
90
 
91
- <script type="text/javascript">
92
- var editor = grapesjs.init({
93
- showOffsets: 1,
94
- noticeOnUnload: 0,
95
- container: '#gjs',
96
- height: '100%',
97
- fromElement: true,
98
- storageManager: { autoload: 0 },
99
- plugins: ['gjs-custom-code'],
100
- pluginsOpts: {
101
- 'gjs-custom-code': {
102
- // Опции плагина
103
- }
104
- },
105
- styleManager : {
106
- sectors: [{
107
- name: 'General',
108
- open: false,
109
- buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom']
110
- },{
111
- name: 'Flex',
112
- open: false,
113
- buildProps: ['flex-direction', 'flex-wrap', 'justify-content', 'align-items', 'align-content', 'order', 'flex-basis', 'flex-grow', 'flex-shrink', 'align-self']
114
- },{
115
- name: 'Dimension',
116
- open: false,
117
- buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'],
118
- },{
119
- name: 'Typography',
120
- open: false,
121
- buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height', 'text-shadow'],
122
- },{
123
- name: 'Decorations',
124
- open: false,
125
- buildProps: ['border-radius-c', 'background-color', 'border-radius', 'border', 'box-shadow', 'background'],
126
- },{
127
- name: 'Extra',
128
- open: false,
129
- buildProps: ['transition', 'perspective', 'transform'],
130
- }
131
- ],
132
- },
133
- });
134
- // Add blocks for each element
135
- editor.BlockManager.add('welcome-block', {
136
- label: 'Welcome Title',
137
- content: <h1 class="welcome">Welcome to</h1>
138
- });
139
- editor.BlockManager.add('big-title-block', {
140
- label: 'Big Title',
141
- content:
142
- <div class="big-title">
143
- <svg class="logo" viewBox="0 0 100 100">
144
- <path d="M40 5l-12.9 7.4 -12.9 7.4c-1.4 0.8-2.7 2.3-3.7 3.9 -0.9 1.6-1.5 3.5-1.5 5.1v14.9 14.9c0 1.7 0.6 3.5 1.5 5.1 0.9 1.6 2.2 3.1 3.7 3.9l12.9 7.4 12.9 7.4c1.4 0.8 3.3 1.2 5.2 1.2 1.9 0 3.8-0.4 5.2-1.2l12.9-7.4 12.9-7.4c1.4-0.8 2.7-2.2 3.7-3.9 0.9-1.6 1.5-3.5 1.5-5.1v-14.9 -12.7c0-4.6-3.8-6-6.8-4.2l-28 16.2"/>
145
- </svg>
146
- <span>GrapesJS</span>
147
- </div>
148
-
149
- });
150
- editor.BlockManager.add('description-block', {
151
- label: 'Description',
152
- content: <div class="description">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>
153
- });
154
- editor.BlockManager.add('button-block', {
155
- label: 'Add Button',
156
- content: <button class="add-button">Ещё добавь</button>
157
- });
158
- </script>
159
  </body>
160
  </html>
 
4
  <meta charset="utf-8">
5
  <title>GrapesJS</title>
6
  <link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
 
7
  <script src="https://unpkg.com/grapesjs"></script>
 
 
 
8
  <style>
9
  body,
10
  html {
 
28
  This is a demo content from index.html. For the development, you shouldn't edit this file, instead you can
29
  copy and rename it to _index.html, on next server start the new file will be served, and it will be ignored by git.
30
  </div>
31
+ <button class="add-button">Ещё добавь</button>
32
  </div>
33
  <style>
34
  .panel {
 
37
  border-radius: 3px;
38
  padding: 30px 20px;
39
  margin: 150px auto 0px;
40
+ background-color: #d983a6;
41
  box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.25);
42
+ color:rgba(255,255,255,0.75);
43
  font: caption;
44
  font-weight: 100;
45
  }
 
76
  padding: 10px 20px;
77
  font-size: 1rem;
78
  color: #fff;
79
+ background-color: #007bff;
80
  border: none;
81
  border-radius: 5px;
82
  cursor: pointer;
 
84
  </style>
85
  </div>
86
 
87
+ <script type="text/javascript">
88
+ var editor = grapesjs.init({
89
+ showOffsets: 1,
90
+ noticeOnUnload: 0,
91
+ container: '#gjs',
92
+ height: '100%',
93
+ fromElement: true,
94
+ storageManager: { autoload: 0 },
95
+ styleManager : {
96
+ sectors: [{
97
+ name: 'General',
98
+ open: false,
99
+ buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom']
100
+ },{
101
+ name: 'Flex',
102
+ open: false,
103
+ buildProps: ['flex-direction', 'flex-wrap', 'justify-content', 'align-items', 'align-content', 'order', 'flex-basis', 'flex-grow', 'flex-shrink', 'align-self']
104
+ },{
105
+ name: 'Dimension',
106
+ open: false,
107
+ buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'],
108
+ },{
109
+ name: 'Typography',
110
+ open: false,
111
+ buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height', 'text-shadow'],
112
+ },{
113
+ name: 'Decorations',
114
+ open: false,
115
+ buildProps: ['border-radius-c', 'background-color', 'border-radius', 'border', 'box-shadow', 'background'],
116
+ },{
117
+ name: 'Extra',
118
+ open: false,
119
+ buildProps: ['transition', 'perspective', 'transform'],
120
+ }
121
+ ],
122
+ },
123
+ });
124
+
125
+ // Add blocks for each element
126
+ editor.BlockManager.add('welcome-block', {
127
+ label: 'Welcome Title',
128
+ content: `<h1 class="welcome">Welcome to</h1>`
129
+ });
130
+
131
+ editor.BlockManager.add('big-title-block', {
132
+ label: 'Big Title',
133
+ content: `
134
+ <div class="big-title">
135
+ <svg class="logo" viewBox="0 0 100 100">
136
+ <path d="M40 5l-12.9 7.4 -12.9 7.4c-1.4 0.8-2.7 2.3-3.7 3.9 -0.9 1.6-1.5 3.5-1.5 5.1v14.9 14.9c0 1.7 0.6 3.5 1.5 5.1 0.9 1.6 2.2 3.1 3.7 3.9l12.9 7.4 12.9 7.4c1.4 0.8 3.3 1.2 5.2 1.2 1.9 0 3.8-0.4 5.2-1.2l12.9-7.4 12.9-7.4c1.4-0.8 2.7-2.2 3.7-3.9 0.9-1.6 1.5-3.5 1.5-5.1v-14.9 -12.7c0-4.6-3.8-6-6.8-4.2l-28 16.2"/>
137
+ </svg>
138
+ <span>GrapesJS</span>
139
+ </div>
140
+ `
141
+ });
142
+
143
+ editor.BlockManager.add('description-block', {
144
+ label: 'Description',
145
+ content: `<div class="description">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>`
146
+ });
147
+
148
+ editor.BlockManager.add('button-block', {
149
+ label: 'Add Button',
150
+ content: `<button class="add-button">Ещё добавь</button>`
151
+ });
152
+ </script>
 
 
153
  </body>
154
  </html>