Update builder2.html
Browse files- builder2.html +138 -198
builder2.html
CHANGED
@@ -8,220 +8,160 @@
|
|
8 |
<script src="https://unpkg.com/grapesjs-plugin-forms"></script>
|
9 |
<script src="https://unpkg.com/grapesjs-custom-code"></script>
|
10 |
<style>
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
.image-container {
|
16 |
-
|
17 |
-
justify-content: space-between;
|
18 |
-
margin-top: 20px; /* Поднятие картинок выше формы */
|
19 |
}
|
20 |
.image-container img {
|
21 |
-
width:
|
22 |
-
|
23 |
-
margin: 0 10px; /* Увеличение расстояния между картинками */
|
24 |
-
}
|
25 |
-
@media (max-width: 768px) {
|
26 |
-
.image-container {
|
27 |
-
flex-direction: column;
|
28 |
-
}
|
29 |
-
.image-container img {
|
30 |
-
width: 100%;
|
31 |
-
margin: 10px 0; /* Увеличение расстояния между картинками на мобильных устройствах */
|
32 |
-
}
|
33 |
}
|
|
|
34 |
</style>
|
35 |
</head>
|
36 |
<body>
|
37 |
<div id="gjs" style="height:0px; overflow:hidden;">
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
</div>
|
59 |
</div>
|
60 |
-
<style>
|
61 |
-
.panel {
|
62 |
-
width: 90%;
|
63 |
-
max-width: 700px;
|
64 |
-
border-radius: 3px;
|
65 |
-
padding: 30px 20px;
|
66 |
-
margin: 150px auto 0px;
|
67 |
-
background-color: #d983a6;
|
68 |
-
box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.25);
|
69 |
-
color: rgba(255,255,255,0.75);
|
70 |
-
font: caption;
|
71 |
-
font-weight: 100;
|
72 |
-
text-align: center;
|
73 |
-
}
|
74 |
-
.welcome {
|
75 |
-
text-align: center;
|
76 |
-
font-weight: 100;
|
77 |
-
margin: 0px;
|
78 |
-
}
|
79 |
-
.logo {
|
80 |
-
width: 70px;
|
81 |
-
height: 70px;
|
82 |
-
vertical-align: middle;
|
83 |
-
border-radius: 50%; /* Скругление углов для логотипа */
|
84 |
-
}
|
85 |
-
.big-title {
|
86 |
-
text-align: center;
|
87 |
-
font-size: 3.5rem;
|
88 |
-
margin: 15px 0;
|
89 |
-
}
|
90 |
-
.description {
|
91 |
-
text-align: justify;
|
92 |
-
font-size: 1rem;
|
93 |
-
line-height: 1.5rem;
|
94 |
-
}
|
95 |
-
.centered-form {
|
96 |
-
display: inline-block;
|
97 |
-
text-align: left;
|
98 |
-
}
|
99 |
-
.centered-form input {
|
100 |
-
display: block;
|
101 |
-
width: 100%;
|
102 |
-
margin-bottom: 10px;
|
103 |
-
}
|
104 |
-
.checkbox-label {
|
105 |
-
display: flex;
|
106 |
-
align-items: center;
|
107 |
-
margin-bottom: 10px;
|
108 |
-
padding: 0;
|
109 |
-
}
|
110 |
-
.checkbox-label input[type="checkbox"] {
|
111 |
-
margin: 0;
|
112 |
-
width: 100%;
|
113 |
-
height: 100%;
|
114 |
-
flex-basis: 0;
|
115 |
-
autocomplete: off;
|
116 |
-
}
|
117 |
-
.checkbox-label span {
|
118 |
-
margin-left: 15px; /* Добавление отступа справа */
|
119 |
-
}
|
120 |
-
.add-button {
|
121 |
-
display: block;
|
122 |
-
margin: 20px auto 0;
|
123 |
-
padding: 10px 20px;
|
124 |
-
font-size: 1rem;
|
125 |
-
color: #fff;
|
126 |
-
background-color: #007bff;
|
127 |
-
border: none;
|
128 |
-
border-radius: 5px;
|
129 |
-
cursor: pointer;
|
130 |
-
}
|
131 |
-
</style>
|
132 |
</div>
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
}
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
// Add custom style manager for image border radius
|
207 |
-
editor.StyleManager.addProperty('decorations', {
|
208 |
-
name: 'Border Radius',
|
209 |
-
property: 'border-radius',
|
210 |
-
type: 'integer',
|
211 |
-
units: ['px', '%'],
|
212 |
-
defaults: '0',
|
213 |
-
min: 0,
|
214 |
-
max: 50,
|
215 |
-
});
|
216 |
-
</script>
|
217 |
-
|
218 |
|
219 |
<!-- Кнопка для экспорта HTML -->
|
220 |
<button id="export-html">Export HTML</button>
|
221 |
|
222 |
<script type="text/javascript">
|
223 |
var editor = grapesjs.init({
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
});
|
226 |
|
227 |
// Функция для экспорта HTML с дополнительными скриптами
|
|
|
8 |
<script src="https://unpkg.com/grapesjs-plugin-forms"></script>
|
9 |
<script src="https://unpkg.com/grapesjs-custom-code"></script>
|
10 |
<style>
|
11 |
+
body, html {
|
12 |
+
height: 100%;
|
13 |
+
margin: 0;
|
14 |
+
}
|
15 |
+
.image-container {
|
16 |
+
display: flex;
|
17 |
+
justify-content: space-between;
|
18 |
+
margin-top: 20px; /* Поднятие картинок выше формы */
|
19 |
+
}
|
20 |
+
.image-container img {
|
21 |
+
width: 30%;
|
22 |
+
height: auto;
|
23 |
+
margin: 0 10px; /* Увеличение расстояния между картинками */
|
24 |
+
}
|
25 |
+
@media (max-width: 768px) {
|
26 |
.image-container {
|
27 |
+
flex-direction: column;
|
|
|
|
|
28 |
}
|
29 |
.image-container img {
|
30 |
+
width: 100%;
|
31 |
+
margin: 10px 0; /* Увеличение расстояния между картинками на мобильных устройствах */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
+
}
|
34 |
</style>
|
35 |
</head>
|
36 |
<body>
|
37 |
<div id="gjs" style="height:0px; overflow:hidden;">
|
38 |
+
<div class="panel">
|
39 |
+
<h1 class="welcome">Добро пожаловать!</h1>
|
40 |
+
<div class="big-title">
|
41 |
+
<img class="logo" src="https://via.placeholder.com/70x70.png?text=Logo" alt="Logo">
|
42 |
+
<span>Конструктор лендингов и подписных ВК</span>
|
43 |
+
</div>
|
44 |
+
<div class="description">
|
45 |
+
В связке с WhatsMasterCRM.
|
46 |
+
</div>
|
47 |
+
<form class="centered-form">
|
48 |
+
<input type="text" name="name" placeholder="Имя">
|
49 |
+
<input type="email" name="email" placeholder="Email">
|
50 |
+
<input type="tel" name="phone" placeholder="Телефон">
|
51 |
+
<label class="checkbox-label"><input type="checkbox" name="subscribe" autocomplete="off"> I agree to the newsletter</label>
|
52 |
+
</form>
|
53 |
+
<button class="add-button">Зарегистрироваться</button>
|
54 |
+
<div class="image-container">
|
55 |
+
<img src="https://via.placeholder.com/150" alt="Placeholder Image 1">
|
56 |
+
<img src="https://via.placeholder.com/150" alt="Placeholder Image 2">
|
57 |
+
<img src="https://via.placeholder.com/150" alt="Placeholder Image 3">
|
|
|
58 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
</div>
|
60 |
+
<style>
|
61 |
+
.panel {
|
62 |
+
width: 90%;
|
63 |
+
max-width: 700px;
|
64 |
+
border-radius: 3px;
|
65 |
+
padding: 30px 20px;
|
66 |
+
margin: 150px auto 0px;
|
67 |
+
background-color: #d983a6;
|
68 |
+
box-shadow: 0px 3px 10px 0px rgba(0,0,0,0.25);
|
69 |
+
color: rgba(255,255,255,0.75);
|
70 |
+
font: caption;
|
71 |
+
font-weight: 100;
|
72 |
+
text-align: center;
|
73 |
+
}
|
74 |
+
.welcome {
|
75 |
+
text-align: center;
|
76 |
+
font-weight: 100;
|
77 |
+
margin: 0px;
|
78 |
+
}
|
79 |
+
.logo {
|
80 |
+
width: 70px;
|
81 |
+
height: 70px;
|
82 |
+
vertical-align: middle;
|
83 |
+
border-radius: 50%; /* Скругление углов для логотипа */
|
84 |
+
}
|
85 |
+
.big-title {
|
86 |
+
text-align: center;
|
87 |
+
font-size: 3.5rem;
|
88 |
+
margin: 15px 0;
|
89 |
+
}
|
90 |
+
.description {
|
91 |
+
text-align: justify;
|
92 |
+
font-size: 1rem;
|
93 |
+
line-height: 1.5rem;
|
94 |
+
}
|
95 |
+
.centered-form {
|
96 |
+
display: inline-block;
|
97 |
+
text-align: left;
|
98 |
+
}
|
99 |
+
.centered-form input {
|
100 |
+
display: block;
|
101 |
+
width: 100%;
|
102 |
+
margin-bottom: 10px;
|
103 |
+
}
|
104 |
+
.checkbox-label {
|
105 |
+
display: flex;
|
106 |
+
align-items: center;
|
107 |
+
margin-bottom: 10px;
|
108 |
+
padding: 0;
|
109 |
+
}
|
110 |
+
.checkbox-label input[type="checkbox"] {
|
111 |
+
margin: 0;
|
112 |
+
width: 100%;
|
113 |
+
height: 100%;
|
114 |
+
flex-basis: 0;
|
115 |
+
autocomplete: off;
|
116 |
+
}
|
117 |
+
.checkbox-label span {
|
118 |
+
margin-left: 15px; /* Добавление отступа справа */
|
119 |
+
}
|
120 |
+
.add-button {
|
121 |
+
display: block;
|
122 |
+
margin: 20px auto 0;
|
123 |
+
padding: 10px 20px;
|
124 |
+
font-size: 1rem;
|
125 |
+
color: #fff;
|
126 |
+
background-color: #007bff;
|
127 |
+
border: none;
|
128 |
+
border-radius: 5px;
|
129 |
+
cursor: pointer;
|
130 |
+
}
|
131 |
+
</style>
|
132 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
<!-- Кнопка для экспорта HTML -->
|
135 |
<button id="export-html">Export HTML</button>
|
136 |
|
137 |
<script type="text/javascript">
|
138 |
var editor = grapesjs.init({
|
139 |
+
showOffsets: 1,
|
140 |
+
noticeOnUnload: 0,
|
141 |
+
container: '#gjs',
|
142 |
+
height: '100%',
|
143 |
+
fromElement: true,
|
144 |
+
storageManager: { autoload: 0 },
|
145 |
+
plugins: ['grapesjs-plugin-forms', 'grapesjs-custom-code'],
|
146 |
+
pluginsOpts: {
|
147 |
+
'grapesjs-plugin-forms': {
|
148 |
+
// options
|
149 |
+
},
|
150 |
+
'grapesjs-custom-code': {
|
151 |
+
blockCustomCode: {
|
152 |
+
label: 'Custom Code',
|
153 |
+
category: 'Extra',
|
154 |
+
attributes: { class: 'fa fa-code' }
|
155 |
+
},
|
156 |
+
modalTitle: 'Insert your code',
|
157 |
+
buttonLabel: 'Save',
|
158 |
+
placeholderScript: '// Your JavaScript code here', // Плейсхолдер для скрипта
|
159 |
+
codeViewOptions: {
|
160 |
+
theme: 'hopscotch',
|
161 |
+
readOnly: 0
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
});
|
166 |
|
167 |
// Функция для экспорта HTML с дополнительными скриптами
|