1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
designerrepo.php
См. документацию.
1<?php
2namespace Bitrix\Landing\Block;
3
4use Bitrix\Landing\Manager;
5
7{
12 public static $internalClass = 'DesignerRepoTable';
13
18 public static function installRepo(): void
19 {
21 'XML_ID' => 'text',
22 'SORT' => 100,
23 'HTML' => '
24<div class="landing-block-node-text g-pointer-events-all g-pb-1 text-left">
25 <p>Sed feugiat porttitor nunc, non dignissim ipsum vestibulum in. Donec in blandit dolor. Vivamus a fringilla lorem, vel faucibus ante. Nunc ullamcorper, justo a iaculis elementum, enim orci viverra eros, fringilla porttitor lorem eros vel odio. Praesent egestas ac arcu ac convallis. Donec ut diam risus purus.</p>
26</div>',
27 'MANIFEST' => [
28 'nodes' => [
29 '.landing-block-node-text' => [
30 'type' => 'text'
31 ]
32 ],
33 'style' => [
34 '.landing-block-node-text' => [
35 'type' => ['typo']
36 ]
37 ]
38 ]
39 ]);
41 'XML_ID' => 'title',
42 'SORT' => 200,
43 'HTML' => '<h2 class="landing-block-node-title g-pointer-events-all h2 text-center">The Title</h2>',
44 'MANIFEST' => [
45 'nodes' => [
46 '.landing-block-node-title' => [
47 'type' => 'text'
48 ]
49 ],
50 'style' => [
51 '.landing-block-node-title' => [
52 'type' => ['typo']
53 ]
54 ]
55 ]
56 ]);
58 'XML_ID' => 'text_title',
59 'SORT' => 300,
60 'HTML' => '
61<div class="landing-block-node-containertext g-pointer-events-all">
62 <h2 class="landing-block-node-title h2 text-center">The Title with text</h2>
63 <div class="landing-block-node-text g-pb-1 text-left">
64 <p>Sed feugiat porttitor nunc, non dignissim ipsum vestibulum in. Donec in blandit dolor. Vivamus a fringilla lorem, vel faucibus ante. Nunc ullamcorper, justo a iaculis elementum, enim orci viverra eros, fringilla porttitor lorem eros vel odio. Praesent egestas ac arcu ac convallis. Donec ut diam risus purus.</p>
65 </div>
66</div>',
67 'MANIFEST' => [
68 'nodes' => [
69 '.landing-block-node-title' => [
70 'type' => 'text'
71 ],
72 '.landing-block-node-text' => [
73 'type' => 'text'
74 ]
75 ],
76 'style' => [
77 '.landing-block-node-containertext' => [
78 'type' => ['margins']
79 ],
80 '.landing-block-node-title' => [
81 'type' => ['typo']
82 ],
83 '.landing-block-node-text' => [
84 'type' => ['typo']
85 ]
86 ]
87 ]
88 ]);
89 // todo: full width?
91 'XML_ID' => 'img',
92 'SORT' => 400,
93 'HTML' => '
94<div class="landing-block-node-containerimg g-pointer-events-all text-center">
95 <img class="landing-block-node-img img-fluid d-inline" src="https://cdn.bitrix24.site/bitrix/images/landing/business/1920x1280/img12.jpg" alt="">
96</div>',
97 'MANIFEST' => [
98 'nodes' => [
99 '.landing-block-node-img' => [
100 'type' => 'img'
101 ]
102 ],
103 'style' => [
104 '.landing-block-node-containerimg' => [
105 'type' => ['text-align', 'margins']
106 ]
107 ]
108 ]
109 ]);
111 'XML_ID' => 'video',
112 'SORT' => 500,
113 'HTML' => self::getVideoElementHTML(),
114 'MANIFEST' => [
115 'nodes' => [
116 '.landing-block-node-embed' => [
117 'type' => 'embed'
118 ]
119 ],
120 'assets' => [
121 'ext' => ['landing_inline_video']
122 ]
123 ]
124 ]);
126 'XML_ID' => 'button',
127 'SORT' => 600,
128 'HTML' => '
129<div class="landing-block-node-containerbutton g-pointer-events-all g-flex-centered g-pt-10 g-pb-10">
130 <a href="#" class="landing-block-node-button btn text-uppercase g-btn-primary rounded-0 g-btn-type-solid g-btn-size-md g-btn-px-m g-ml-10 g-mr-10">Button</a>
131</div>',
132 'MANIFEST' => [
133 'nodes' => [
134 '.landing-block-node-button' => [
135 'type' => 'link'
136 ]
137 ],
138 'style' => [
139 '.landing-block-node-containerbutton' => [
140 'type' => ['row-align', 'paddings']
141 ],
142 '.landing-block-node-button' => [
143 'type' => ['button', 'margin-left', 'margin-right']
144 ]
145 ]
146 ]
147 ]);
149 'XML_ID' => 'double_button',
150 'SORT' => 700,
151 'HTML' => '
152<div class="landing-block-node-containerbuttons g-pointer-events-all g-flex-centered g-pt-10 g-pb-10">
153 <a href="#" class="landing-block-node-button btn text-uppercase g-btn-primary rounded-0 g-btn-type-solid g-btn-size-md g-btn-px-m g-ml-10 g-mr-10">Button</a>
154 <a href="#" class="landing-block-node-button2 btn text-uppercase g-btn-primary rounded-0 g-btn-type-outline g-btn-size-md g-btn-px-m g-ml-10 g-mr-10">Button</a>
155</div>',
156 'MANIFEST' => [
157 'nodes' => [
158 '.landing-block-node-button' => [
159 'type' => 'link'
160 ],
161 '.landing-block-node-button2' => [
162 'type' => 'link'
163 ]
164 ],
165 'style' => [
166 '.landing-block-node-containerbuttons' => [
167 'type' => ['row-align', 'paddings']
168 ],
169 '.landing-block-node-button' => [
170 'type' => ['button', 'margin-left', 'margin-right']
171 ],
172 '.landing-block-node-button2' => [
173 'type' => ['button', 'margin-left', 'margin-right']
174 ]
175 ]
176 ]
177 ]);
179 'XML_ID' => 'icon',
180 'SORT' => 800,
181 'HTML' => '
182<div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24">
183 <i class="landing-block-node-icon fa fa-cog"></i>
184</div>',
185 'MANIFEST' => [
186 'nodes' => [
187 '.landing-block-node-icon' => [
188 'type' => 'icon'
189 ]
190 ],
191 'style' => [
192 '.landing-block-node-containericon' => [
193 'type' => ['text-align', 'color', 'font-size', 'margins']
194 ]
195 ]
196 ]
197 ]);
199 'XML_ID' => 'icon_text',
200 'SORT' => 900,
201 'HTML' => '
202<div class="d-flex">
203 <div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24 g-mr-10">
204 <i class="landing-block-node-icon fa fa-cog"></i>
205 </div>
206 <div class="landing-block-node-text g-pointer-events-all g-pb-1 text-left">
207 <p>Sed feugiat porttitor nunc, non dignissim ipsum vestibulum in. Donec in blandit dolor. Vivamus a fringilla lorem, vel faucibus ante. Nunc ullamcorper, justo a iaculis elementum, enim orci viverra eros, fringilla porttitor lorem eros vel odio. Praesent egestas ac arcu ac convallis. Donec ut diam risus purus.</p>
208 </div>
209</div>',
210 'MANIFEST' => [
211 'nodes' => [
212 '.landing-block-node-icon' => [
213 'type' => 'icon'
214 ],
215 '.landing-block-node-text' => [
216 'type' => 'text'
217 ]
218 ],
219 'style' => [
220 '.landing-block-node-containericon' => [
221 'type' => ['text-align', 'color', 'font-size', 'margins']
222 ],
223 '.landing-block-node-text' => [
224 'type' => ['typo']
225 ]
226 ]
227 ]
228 ]);
230 'XML_ID' => 'icon_title',
231 'SORT' => 1000,
232 'HTML' => '
233<div class="d-flex justify-content-center">
234 <div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24 g-mr-10">
235 <i class="landing-block-node-icon fa fa-cog"></i>
236 </div>
237 <h2 class="landing-block-node-title g-pointer-events-all h2 text-left">The Title with icon</h2>
238</div>',
239 'MANIFEST' => [
240 'nodes' => [
241 '.landing-block-node-icon' => [
242 'type' => 'icon'
243 ],
244 '.landing-block-node-title' => [
245 'type' => 'text'
246 ],
247 ],
248 'style' => [
249 '.landing-block-node-containericon' => [
250 'type' => ['text-align', 'color', 'font-size', 'margins']
251 ],
252 '.landing-block-node-title' => [
253 'type' => ['typo']
254 ]
255 ]
256 ]
257 ]);
258 }
259
260 private static function getVideoElementHTML(): string
261 {
262 if (Manager::getZone() === 'ru')
263 {
264 return '
265 <div class="landing-block-node-video-container g-pointer-events-all embed-responsive embed-responsive-16by9 mx-auto w-100">
266 <div class="landing-block-node-embed embed-responsive-item g-video-preview w-100"
267 data-src=""
268 data-source=""
269 data-preview=""
270 style="background-image:url()"
271 ></div>
272 </div>
273 ';
274 }
275
276 return '
277 <div class="landing-block-node-video-container g-pointer-events-all embed-responsive embed-responsive-16by9 mx-auto w-100">
278 <div class="landing-block-node-embed embed-responsive-item g-video-preview w-100"
279 data-src="//www.youtube.com/embed/q4d8g9Dn3ww?autoplay=0&controls=1&loop=1&mute=0&rel=0"
280 data-source="https://www.youtube.com/watch?v=q4d8g9Dn3ww"
281 data-preview="//img.youtube.com/vi/q4d8g9Dn3ww/sddefault.jpg"
282 style="background-image:url(//img.youtube.com/vi/q4d8g9Dn3ww/sddefault.jpg)"
283 ></div>
284 </div>
285 ';
286 }
287}
static registerRepoElement(array $fields)
Определения designer.php:290
static installRepo()
Определения designerrepo.php:18
static getZone()
Определения manager.php:930