Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
designerrepo.php
1<?php
3
5{
10 public static $internalClass = 'DesignerRepoTable';
11
16 public static function installRepo(): void
17 {
19 'XML_ID' => 'text',
20 'SORT' => 100,
21 'HTML' => '
22<div class="landing-block-node-text g-pointer-events-all g-pb-1 text-left">
23 <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>
24</div>',
25 'MANIFEST' => [
26 'nodes' => [
27 '.landing-block-node-text' => [
28 'type' => 'text'
29 ]
30 ],
31 'style' => [
32 '.landing-block-node-text' => [
33 'type' => ['typo']
34 ]
35 ]
36 ]
37 ]);
39 'XML_ID' => 'title',
40 'SORT' => 200,
41 'HTML' => '<h2 class="landing-block-node-title g-pointer-events-all h2 text-center">The Title</h2>',
42 'MANIFEST' => [
43 'nodes' => [
44 '.landing-block-node-title' => [
45 'type' => 'text'
46 ]
47 ],
48 'style' => [
49 '.landing-block-node-title' => [
50 'type' => ['typo']
51 ]
52 ]
53 ]
54 ]);
56 'XML_ID' => 'text_title',
57 'SORT' => 300,
58 'HTML' => '
59<div class="landing-block-node-containertext g-pointer-events-all">
60 <h2 class="landing-block-node-title h2 text-center">The Title with text</h2>
61 <div class="landing-block-node-text g-pb-1 text-left">
62 <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>
63 </div>
64</div>',
65 'MANIFEST' => [
66 'nodes' => [
67 '.landing-block-node-title' => [
68 'type' => 'text'
69 ],
70 '.landing-block-node-text' => [
71 'type' => 'text'
72 ]
73 ],
74 'style' => [
75 '.landing-block-node-containertext' => [
76 'type' => ['margins']
77 ],
78 '.landing-block-node-title' => [
79 'type' => ['typo']
80 ],
81 '.landing-block-node-text' => [
82 'type' => ['typo']
83 ]
84 ]
85 ]
86 ]);
87 // todo: full width?
89 'XML_ID' => 'img',
90 'SORT' => 400,
91 'HTML' => '
92<div class="landing-block-node-containerimg g-pointer-events-all text-center">
93 <img class="landing-block-node-img img-fluid d-inline" src="https://cdn.bitrix24.site/bitrix/images/landing/business/1920x1280/img12.jpg" alt="">
94</div>',
95 'MANIFEST' => [
96 'nodes' => [
97 '.landing-block-node-img' => [
98 'type' => 'img'
99 ]
100 ],
101 'style' => [
102 '.landing-block-node-containerimg' => [
103 'type' => ['text-align', 'margins']
104 ]
105 ]
106 ]
107 ]);
109 'XML_ID' => 'video',
110 'SORT' => 500,
111 'HTML' => '
112<div class="landing-block-node-video-container g-pointer-events-all embed-responsive embed-responsive-16by9 mx-auto w-100">
113 <div class="landing-block-node-embed embed-responsive-item g-video-preview w-100"
114 data-src="//www.youtube.com/embed/q4d8g9Dn3ww?autoplay=0&controls=1&loop=1&mute=0&rel=0"
115 data-source="https://www.youtube.com/watch?v=q4d8g9Dn3ww"
116 data-preview="//img.youtube.com/vi/q4d8g9Dn3ww/sddefault.jpg"
117 style="background-image:url(//img.youtube.com/vi/q4d8g9Dn3ww/sddefault.jpg)"
118 ></div>
119</div>',
120 'MANIFEST' => [
121 'nodes' => [
122 '.landing-block-node-embed' => [
123 'type' => 'embed'
124 ]
125 ],
126 'assets' => [
127 'ext' => ['landing_inline_video']
128 ]
129 ]
130 ]);
132 'XML_ID' => 'button',
133 'SORT' => 600,
134 'HTML' => '
135<div class="landing-block-node-containerbutton g-pointer-events-all g-flex-centered g-pt-10 g-pb-10">
136 <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>
137</div>',
138 'MANIFEST' => [
139 'nodes' => [
140 '.landing-block-node-button' => [
141 'type' => 'link'
142 ]
143 ],
144 'style' => [
145 '.landing-block-node-containerbutton' => [
146 'type' => ['row-align', 'paddings']
147 ],
148 '.landing-block-node-button' => [
149 'type' => ['button', 'margin-left', 'margin-right']
150 ]
151 ]
152 ]
153 ]);
155 'XML_ID' => 'double_button',
156 'SORT' => 700,
157 'HTML' => '
158<div class="landing-block-node-containerbuttons g-pointer-events-all g-flex-centered g-pt-10 g-pb-10">
159 <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>
160 <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>
161</div>',
162 'MANIFEST' => [
163 'nodes' => [
164 '.landing-block-node-button' => [
165 'type' => 'link'
166 ],
167 '.landing-block-node-button2' => [
168 'type' => 'link'
169 ]
170 ],
171 'style' => [
172 '.landing-block-node-containerbuttons' => [
173 'type' => ['row-align', 'paddings']
174 ],
175 '.landing-block-node-button' => [
176 'type' => ['button', 'margin-left', 'margin-right']
177 ],
178 '.landing-block-node-button2' => [
179 'type' => ['button', 'margin-left', 'margin-right']
180 ]
181 ]
182 ]
183 ]);
185 'XML_ID' => 'icon',
186 'SORT' => 800,
187 'HTML' => '
188<div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24">
189 <i class="landing-block-node-icon fa fa-cog"></i>
190</div>',
191 'MANIFEST' => [
192 'nodes' => [
193 '.landing-block-node-icon' => [
194 'type' => 'icon'
195 ]
196 ],
197 'style' => [
198 '.landing-block-node-containericon' => [
199 'type' => ['text-align', 'color', 'font-size', 'margins']
200 ]
201 ]
202 ]
203 ]);
205 'XML_ID' => 'icon_text',
206 'SORT' => 900,
207 'HTML' => '
208<div class="d-flex">
209 <div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24 g-mr-10">
210 <i class="landing-block-node-icon fa fa-cog"></i>
211 </div>
212 <div class="landing-block-node-text g-pointer-events-all g-pb-1 text-left">
213 <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>
214 </div>
215</div>',
216 'MANIFEST' => [
217 'nodes' => [
218 '.landing-block-node-icon' => [
219 'type' => 'icon'
220 ],
221 '.landing-block-node-text' => [
222 'type' => 'text'
223 ]
224 ],
225 'style' => [
226 '.landing-block-node-containericon' => [
227 'type' => ['text-align', 'color', 'font-size', 'margins']
228 ],
229 '.landing-block-node-text' => [
230 'type' => ['typo']
231 ]
232 ]
233 ]
234 ]);
236 'XML_ID' => 'icon_title',
237 'SORT' => 1000,
238 'HTML' => '
239<div class="d-flex justify-content-center">
240 <div class="landing-block-node-containericon g-pointer-events-all g-color-primary g-font-size-24 g-mr-10">
241 <i class="landing-block-node-icon fa fa-cog"></i>
242 </div>
243 <h2 class="landing-block-node-title g-pointer-events-all h2 text-left">The Title with icon</h2>
244</div>',
245 'MANIFEST' => [
246 'nodes' => [
247 '.landing-block-node-icon' => [
248 'type' => 'icon'
249 ],
250 '.landing-block-node-title' => [
251 'type' => 'text'
252 ],
253 ],
254 'style' => [
255 '.landing-block-node-containericon' => [
256 'type' => ['text-align', 'color', 'font-size', 'margins']
257 ],
258 '.landing-block-node-title' => [
259 'type' => ['typo']
260 ]
261 ]
262 ]
263 ]);
264 }
265}
static registerRepoElement(array $fields)
Definition designer.php:290