@@ -2,16 +2,73 @@ let bgVideoTemplate = '<video playsinline loop muted autoplay src="../../media/d
2
2
let bgImageTemplate = '<img src="../../media/demo/sample.webp">' ;
3
3
let defaultSeparatorSvg = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 41" width="100%" height="300" fill="var(--bs-body-bg)" preserveAspectRatio="none"><defs><style>.cls-1{fill:inherit}</style></defs><title>rough-edges-bottom</title><path class="cls-1" d="M0,185l125-26,33,17,58-12s54,19,55,19,50-11,50-11l56,6,60-8,63,15v15H0Z" transform="translate(0 -159)"/></svg>' ;
4
4
5
+ let section_sort = 1 ;
6
+
7
+ let SectionContent = [ {
8
+ name : "Title" ,
9
+ key : "title" ,
10
+ sort : section_sort ++ ,
11
+ htmlAttr : "title" ,
12
+ inputtype : TextInput
13
+ } , {
14
+ name : "Container width" ,
15
+ key : "container-width" ,
16
+ sort : section_sort ++ ,
17
+ child :":scope > .container, :scope > .container-fluid" ,
18
+ htmlAttr : "class" ,
19
+ validValues : [ "container" , "container-fluid" ] ,
20
+ inputtype : RadioButtonInput ,
21
+ data : {
22
+ extraclass :"btn-group-sm btn-group-fullwidth" ,
23
+ options : [ {
24
+ value : "container" ,
25
+ icon :"la la-box" ,
26
+ text : "Boxed" ,
27
+ title : "Boxed"
28
+ } , {
29
+ value : "container-fluid" ,
30
+ icon :"la la-arrows-alt-h" ,
31
+ title : "Full" ,
32
+ text : "Full"
33
+ } ]
34
+ }
35
+ } , {
36
+ name : "Container height" ,
37
+ key : "container-height" ,
38
+ sort : section_sort ++ ,
39
+ child :":scope > .container:first-child, :scope > .container-fluid:first-child" ,
40
+ htmlAttr : "class" ,
41
+ validValues : [ "" , "vh-100" ] ,
42
+ inputtype : RadioButtonInput ,
43
+ data : {
44
+ extraclass :"btn-group-sm btn-group-fullwidth" ,
45
+ options : [ {
46
+ value : "container" ,
47
+ icon :"la la-expand" ,
48
+ text : "Auto" ,
49
+ title : "Auto" ,
50
+ checked :true ,
51
+ } , {
52
+ value : "vh-100" ,
53
+ icon :"la la-arrows-alt-v" ,
54
+ title : "Full" ,
55
+ text : "Full"
56
+ } ]
57
+ }
58
+ }
59
+ ] ;
60
+
5
61
let SectionBackground = [ {
6
62
key : "section_background_header" ,
7
63
inputtype : SectionInput ,
8
64
name :false ,
9
- sort : base_sort ++ ,
10
- //section: style_section,
65
+ sort : section_sort ++ ,
66
+ //section: style_section,
11
67
data : { header :"Background" } ,
12
68
} , {
13
69
name : false ,
14
70
key : "section-bg" ,
71
+ sort : section_sort ++ ,
15
72
inputtype : RadioButtonInput ,
16
73
data : {
17
74
inline : true ,
@@ -108,6 +165,7 @@ let SectionBackground = [{
108
165
} , {
109
166
name : "Image" ,
110
167
key : "src" ,
168
+ sort : section_sort ++ ,
111
169
htmlAttr : "src" ,
112
170
child :":scope > .background-container > img" ,
113
171
group :"bg-image" ,
@@ -117,6 +175,7 @@ let SectionBackground = [{
117
175
name : "Video" ,
118
176
child : "source" ,
119
177
key : "src" ,
178
+ sort : section_sort ++ ,
120
179
htmlAttr : "src" ,
121
180
child :":scope > .background-container > video" ,
122
181
group :"bg-video" ,
@@ -125,6 +184,7 @@ let SectionBackground = [{
125
184
} , {
126
185
name : "Poster" ,
127
186
key : "poster" ,
187
+ sort : section_sort ++ ,
128
188
htmlAttr : "poster" ,
129
189
child :":scope > .background-container > video" ,
130
190
group :"bg-video" ,
@@ -138,13 +198,14 @@ let SectionOverlay = [{
138
198
key : "section_overlay" ,
139
199
inputtype : SectionInput ,
140
200
name :false ,
141
- sort : base_sort ++ ,
142
- //section: style_section,
201
+ sort : section_sort ++ ,
202
+ //section: style_section,
143
203
data : { header :"Overlay" } ,
144
204
} , {
145
205
//name: "Enable",
146
206
name : false ,
147
207
key : "overlay" ,
208
+ sort : section_sort ++ ,
148
209
inline : true ,
149
210
//validValues: ["", "active"],
150
211
inputtype : ToggleInput ,
@@ -188,13 +249,15 @@ let SectionOverlay = [{
188
249
} , {
189
250
name : "Color" ,
190
251
key : "background-color" ,
252
+ sort : section_sort ++ ,
191
253
htmlAttr : "style" ,
192
254
child :":scope > .overlay" ,
193
255
group :"overlay" ,
194
256
inputtype : ColorInput
195
257
} , {
196
258
name : "Opacity" ,
197
259
key : "opacity" ,
260
+ sort : section_sort ++ ,
198
261
htmlAttr : "style" ,
199
262
inline :false ,
200
263
group :"overlay" ,
@@ -212,13 +275,14 @@ function sectionSeparatorProperties(name, title) {
212
275
key : `section_${ name } _separator` ,
213
276
inputtype : SectionInput ,
214
277
name :false ,
215
- sort : base_sort ++ ,
216
- //section: style_section,
278
+ sort : section_sort ++ ,
279
+ //section: style_section,
217
280
data : { header :`${ title } Separator` } ,
218
281
} , {
219
282
//name: "Enable",
220
283
name : false ,
221
284
key : `${ name } _separator` ,
285
+ sort : section_sort ++ ,
222
286
inline : true ,
223
287
inputtype : ToggleInput ,
224
288
data : {
@@ -261,6 +325,7 @@ function sectionSeparatorProperties(name, title) {
261
325
} , {
262
326
name : "Icon" ,
263
327
key : "icon" ,
328
+ sort : section_sort ++ ,
264
329
inline :true ,
265
330
group :`${ name } _separator` ,
266
331
child :`.separator.${ name } > svg` ,
@@ -293,6 +358,7 @@ function sectionSeparatorProperties(name, title) {
293
358
} , {
294
359
name : "Width" ,
295
360
key : "width" ,
361
+ sort : section_sort ++ ,
296
362
htmlAttr : "width" ,
297
363
group :`${ name } _separator` ,
298
364
child :`.separator.${ name } > svg` ,
@@ -305,6 +371,7 @@ function sectionSeparatorProperties(name, title) {
305
371
} , {
306
372
name : "Height" ,
307
373
key : "height" ,
374
+ sort : section_sort ++ ,
308
375
htmlAttr : "height" ,
309
376
group :`${ name } _separator` ,
310
377
child :`.separator.${ name } > svg` ,
@@ -317,6 +384,7 @@ function sectionSeparatorProperties(name, title) {
317
384
} , {
318
385
name : "Stroke width" ,
319
386
key : "stroke-width" ,
387
+ sort : section_sort ++ ,
320
388
htmlAttr : "stroke-width" ,
321
389
group :`${ name } _separator` ,
322
390
child :`.separator.${ name } > svg` ,
@@ -331,38 +399,38 @@ function sectionSeparatorProperties(name, title) {
331
399
inputtype: SectionInput,
332
400
name:false,
333
401
group:`${name}_separator`,
334
- // sort: base_sort ++,
335
- //section: style_section,
402
+ sort: section_sort ++,
403
+ //section: style_section,
336
404
data: {header:"Svg colors"},
337
405
},*/ {
338
406
name : "Fill Color" ,
339
407
key : "fill" ,
340
- // sort: base_sort ++,
408
+ sort : section_sort ++ ,
341
409
col :4 ,
342
410
inline :true ,
343
- //section: style_section,
411
+ //section: style_section,
344
412
group :`${ name } _separator` ,
345
413
child :`.separator.${ name } > svg` ,
346
414
htmlAttr : "fill" ,
347
415
inputtype : ColorInput ,
348
416
} , {
349
417
name : "Color" ,
350
418
key : "color" ,
351
- // sort: base_sort ++,
419
+ sort : section_sort ++ ,
352
420
col :4 ,
353
421
inline :true ,
354
- //section: style_section,
355
- group :`${ name } _separator` ,
356
- child :`.separator.${ name } > svg` ,
357
- htmlAttr : "color" ,
422
+ //section: style_section,
423
+ group :`${ name } _separator` ,
424
+ child :`.separator.${ name } > svg` ,
425
+ htmlAttr : "color" ,
358
426
inputtype : ColorInput ,
359
427
} , {
360
428
name : "Stroke" ,
361
429
key : "stroke" ,
362
- // sort: base_sort ++,
430
+ sort : section_sort ++ ,
363
431
col :4 ,
364
432
inline :true ,
365
- //section: style_section,
433
+ //section: style_section,
366
434
group :`${ name } _separator` ,
367
435
child :`.separator.${ name } > svg` ,
368
436
htmlAttr : "color" ,
@@ -375,13 +443,14 @@ let SectionBottomSeparator = [{
375
443
key : "section_bottom_separator" ,
376
444
inputtype : SectionInput ,
377
445
name :false ,
378
- sort : base_sort ++ ,
379
- //section: style_section,
446
+ sort : section_sort ++ ,
447
+ //section: style_section,
380
448
data : { header :"Bottom Separator" } ,
381
449
} , {
382
450
//name: "Enable",
383
451
name : false ,
384
452
key : "top_bottom" ,
453
+ sort : section_sort ++ ,
385
454
inline : true ,
386
455
validValues : [ "" , "active" ] ,
387
456
inputtype : ToggleInput ,
@@ -392,57 +461,10 @@ let SectionBottomSeparator = [{
392
461
}
393
462
} ,
394
463
] ;
395
-
464
+
396
465
/* Section */
397
- let ComponentSectionContent = [ {
398
- name : "Title" ,
399
- key : "title" ,
400
- htmlAttr : "title" ,
401
- inputtype : TextInput
402
- } , {
403
- name : "Container width" ,
404
- key : "container-width" ,
405
- child :":scope > .container, :scope > .container-fluid" ,
406
- htmlAttr : "class" ,
407
- validValues : [ "container" , "container-fluid" ] ,
408
- inputtype : RadioButtonInput ,
409
- data : {
410
- extraclass :"btn-group-sm btn-group-fullwidth" ,
411
- options : [ {
412
- value : "container" ,
413
- icon :"la la-box" ,
414
- text : "Boxed" ,
415
- title : "Boxed"
416
- } , {
417
- value : "container-fluid" ,
418
- icon :"la la-arrows-alt-h" ,
419
- title : "Full" ,
420
- text : "Full"
421
- } ]
422
- }
423
- } , {
424
- name : "Container height" ,
425
- key : "container-height" ,
426
- child :":scope > .container:first-child, :scope > .container-fluid:first-child" ,
427
- htmlAttr : "class" ,
428
- validValues : [ "" , "vh-100" ] ,
429
- inputtype : RadioButtonInput ,
430
- data : {
431
- extraclass :"btn-group-sm btn-group-fullwidth" ,
432
- options : [ {
433
- value : "container" ,
434
- icon :"la la-expand" ,
435
- text : "Auto" ,
436
- title : "Auto" ,
437
- checked :true ,
438
- } , {
439
- value : "vh-100" ,
440
- icon :"la la-arrows-alt-v" ,
441
- title : "Full" ,
442
- text : "Full"
443
- } ]
444
- }
445
- } ,
466
+ let ComponentSectionContent = [
467
+ ...SectionContent ,
446
468
...SectionBackground ,
447
469
...SectionOverlay ,
448
470
...sectionSeparatorProperties ( "top" , "Top" ) ,
@@ -454,26 +476,26 @@ let ComponentSectionStyle = [];/*[{
454
476
key: "Section Style",
455
477
inputtype: SectionInput,
456
478
name:false,
457
- section: style_section,
479
+ // section: style_section,
458
480
data: {header:"Style"},
459
481
},{
460
482
name: "Text1 Style",
461
483
key: "text1",
462
484
htmlAttr: "innerHTML",
463
485
inputtype: TextInput,
464
- section: style_section,
486
+ // section: style_section,
465
487
},{
466
488
name: "Name1 Style",
467
489
key: "name1",
468
490
htmlAttr: "name",
469
491
inputtype: TextInput,
470
- section: style_section,
492
+ // section: style_section,
471
493
},{
472
494
name: "Type1 Style",
473
495
key: "type1",
474
496
htmlAttr: "type",
475
497
inputtype: SelectInput,
476
- section: style_section,
498
+ // section: style_section,
477
499
data: {
478
500
options: [{
479
501
value: "button",
@@ -493,15 +515,15 @@ let ComponentSectionStyle = [];/*[{
493
515
inputtype: CheckboxInput,
494
516
inline:true,
495
517
col:6,
496
- section: style_section
518
+ // section: style_section
497
519
},{
498
520
name: "Disabled1 Style",
499
521
key: "disabled1",
500
522
htmlAttr: "disabled",
501
523
inputtype: CheckboxInput,
502
524
inline:true,
503
525
col:6,
504
- section: style_section,
526
+ // section: style_section,
505
527
}];*/
506
528
507
529
let ComponentSectionAdvanced = [ ] ; /* [{
@@ -598,7 +620,8 @@ function componentsInit(node) {
598
620
}
599
621
}
600
622
601
- Vvveb . Components . add ( "elements/section" , {
623
+ //Vvveb.Components.add("elements/section", {
624
+ Vvveb . Components . extend ( "_base" , "elements/section" , {
602
625
nodes : [ "section" ] ,
603
626
name : "Section" ,
604
627
image : "icons/stream-solid.svg" ,
@@ -615,7 +638,8 @@ Vvveb.Components.add("elements/section", {
615
638
init : componentsInit
616
639
} ) ;
617
640
618
- Vvveb . Components . add ( "elements/header" , {
641
+ //Vvveb.Components.add("elements/header", {
642
+ Vvveb . Components . extend ( "_base" , "elements/header" , {
619
643
nodes : [ "header" ] ,
620
644
name : "Header" ,
621
645
image : "icons/stream-solid.svg" ,
@@ -632,8 +656,8 @@ Vvveb.Components.add("elements/header", {
632
656
init : componentsInit
633
657
} ) ;
634
658
635
-
636
- Vvveb . Components . add ( "elements/footer" , {
659
+ //Vvveb.Components.add("elements/footer", {
660
+ Vvveb . Components . extend ( "_base" , "elements/footer" , {
637
661
nodes : [ "footer" ] ,
638
662
name : "Footer" ,
639
663
image : "icons/stream-solid.svg" ,
0 commit comments