@kitconcept/volto-light-theme 8.0.0-alpha.28 → 8.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changelog.draft +23 -3
- package/CHANGELOG.md +27 -0
- package/locales/af/LC_MESSAGES/volto.po +645 -0
- package/locales/ar/LC_MESSAGES/volto.po +645 -0
- package/locales/bg/LC_MESSAGES/volto.po +645 -0
- package/locales/bn/LC_MESSAGES/volto.po +645 -0
- package/locales/ca/LC_MESSAGES/volto.po +645 -0
- package/locales/cs/LC_MESSAGES/volto.po +645 -0
- package/locales/cy/LC_MESSAGES/volto.po +645 -0
- package/locales/da/LC_MESSAGES/volto.po +645 -0
- package/locales/de/LC_MESSAGES/volto.po +58 -57
- package/locales/el/LC_MESSAGES/volto.po +645 -0
- package/locales/en_AU/LC_MESSAGES/volto.po +645 -0
- package/locales/en_GB/LC_MESSAGES/volto.po +645 -0
- package/locales/eo/LC_MESSAGES/volto.po +645 -0
- package/locales/es/LC_MESSAGES/volto.po +50 -50
- package/locales/et/LC_MESSAGES/volto.po +645 -0
- package/locales/eu/LC_MESSAGES/volto.po +7 -7
- package/locales/fa/LC_MESSAGES/volto.po +645 -0
- package/locales/fi/LC_MESSAGES/volto.po +645 -0
- package/locales/fr/LC_MESSAGES/volto.po +645 -0
- package/locales/fu/LC_MESSAGES/volto.po +645 -0
- package/locales/ga/LC_MESSAGES/volto.po +645 -0
- package/locales/gl/LC_MESSAGES/volto.po +645 -0
- package/locales/he/LC_MESSAGES/volto.po +645 -0
- package/locales/hi/LC_MESSAGES/volto.po +645 -0
- package/locales/hr/LC_MESSAGES/volto.po +645 -0
- package/locales/hu/LC_MESSAGES/volto.po +645 -0
- package/locales/hy/LC_MESSAGES/volto.po +645 -0
- package/locales/id/LC_MESSAGES/volto.po +645 -0
- package/locales/it/LC_MESSAGES/volto.po +645 -0
- package/locales/ja/LC_MESSAGES/volto.po +645 -0
- package/locales/ka/LC_MESSAGES/volto.po +645 -0
- package/locales/kn/LC_MESSAGES/volto.po +645 -0
- package/locales/ko/LC_MESSAGES/volto.po +645 -0
- package/locales/lt/LC_MESSAGES/volto.po +645 -0
- package/locales/lv/LC_MESSAGES/volto.po +645 -0
- package/locales/mi/LC_MESSAGES/volto.po +645 -0
- package/locales/mk_MK/LC_MESSAGES/volto.po +645 -0
- package/locales/ms/LC_MESSAGES/volto.po +645 -0
- package/locales/mt/LC_MESSAGES/volto.po +645 -0
- package/locales/my/LC_MESSAGES/volto.po +645 -0
- package/locales/nl/LC_MESSAGES/volto.po +645 -0
- package/locales/nl_BE/LC_MESSAGES/volto.po +645 -0
- package/locales/nn/LC_MESSAGES/volto.po +645 -0
- package/locales/no/LC_MESSAGES/volto.po +645 -0
- package/locales/pl/LC_MESSAGES/volto.po +645 -0
- package/locales/pt/LC_MESSAGES/volto.po +645 -0
- package/locales/rm/LC_MESSAGES/volto.po +645 -0
- package/locales/ro/LC_MESSAGES/volto.po +645 -0
- package/locales/ru/LC_MESSAGES/volto.po +645 -0
- package/locales/sk/LC_MESSAGES/volto.po +645 -0
- package/locales/sl/LC_MESSAGES/volto.po +645 -0
- package/locales/sm/LC_MESSAGES/volto.po +645 -0
- package/locales/sq/LC_MESSAGES/volto.po +645 -0
- package/locales/sr/LC_MESSAGES/volto.po +645 -0
- package/locales/sr_Cyrl/LC_MESSAGES/volto.po +645 -0
- package/locales/sr_Latn/LC_MESSAGES/volto.po +645 -0
- package/locales/sv/LC_MESSAGES/volto.po +645 -0
- package/locales/sw/LC_MESSAGES/volto.po +645 -0
- package/locales/ta/LC_MESSAGES/volto.po +645 -0
- package/locales/te/LC_MESSAGES/volto.po +645 -0
- package/locales/th/LC_MESSAGES/volto.po +645 -0
- package/locales/tl/LC_MESSAGES/volto.po +645 -0
- package/locales/to/LC_MESSAGES/volto.po +645 -0
- package/locales/tr/LC_MESSAGES/volto.po +645 -0
- package/locales/uk/LC_MESSAGES/volto.po +645 -0
- package/locales/vi/LC_MESSAGES/volto.po +645 -0
- package/locales/zh_CN/LC_MESSAGES/volto.po +645 -0
- package/locales/zh_HK/LC_MESSAGES/volto.po +645 -0
- package/locales/zh_TW/LC_MESSAGES/volto.po +645 -0
- package/package.json +6 -6
- package/src/components/Blocks/Button/schema.js +12 -0
- package/src/components/Blocks/Image/Edit.jsx +8 -32
- package/src/components/Blocks/Image/View.jsx +9 -26
- package/src/components/Blocks/Image/adapter.js +28 -14
- package/src/components/Blocks/Image/adapter.test.js +156 -0
- package/src/components/Blocks/Image/schema.js +21 -7
- package/src/components/Blocks/Listing/GridTemplate.jsx +1 -0
- package/src/components/Blocks/Listing/SummaryTemplate.jsx +1 -0
- package/src/components/Blocks/Maps/MapsSidebar.jsx +68 -0
- package/src/components/Blocks/Maps/View.jsx +37 -0
- package/src/components/Blocks/Maps/adapter.js +27 -0
- package/src/components/Blocks/Maps/adapter.test.js +63 -0
- package/src/components/Blocks/Maps/schema.js +42 -2
- package/src/components/Blocks/Separator/schema.js +12 -0
- package/src/components/Blocks/Teaser/DefaultBody.tsx +10 -1
- package/src/components/Blocks/Video/VideoSidebar.jsx +68 -0
- package/src/components/Blocks/Video/View.jsx +38 -0
- package/src/components/Blocks/Video/adapter.js +28 -0
- package/src/components/Blocks/Video/adapter.test.js +63 -0
- package/src/components/Blocks/Video/schema.js +42 -2
- package/src/components/Footer/Footer.tsx +2 -2
- package/src/components/Footer/slots/FollowUsLogoAndLinks.tsx +12 -23
- package/src/components/Theme/ImageView.jsx +8 -1
- package/src/config/blocks.tsx +63 -0
- package/src/config/classExtenders.ts +11 -10
- package/src/config/settings.ts +6 -0
- package/src/customizations/volto/components/manage/Blocks/Maps/MapsSidebar.jsx +10 -0
- package/src/customizations/volto/components/manage/Blocks/Maps/View.jsx +10 -0
- package/src/customizations/volto/components/manage/Blocks/Video/VideoSidebar.jsx +10 -0
- package/src/customizations/volto/components/manage/Blocks/Video/View.jsx +10 -0
- package/src/index.ts +8 -0
- package/src/primitives/Card/Card.tsx +4 -1
- package/src/theme/_footer.scss +61 -51
- package/src/theme/_layout.scss +7 -62
- package/src/theme/_typo-custom.scss +1 -1
- package/src/theme/_variables.scss +21 -0
- package/src/theme/blocks/_grid.scss +1 -0
- package/src/theme/blocks/_highlight.scss +10 -7
- package/src/theme/blocks/_image.scss +96 -186
- package/src/theme/blocks/_listing.scss +5 -1
- package/src/theme/blocks/_maps.scss +60 -34
- package/src/transforms/to6.ts +5 -49
- package/src/transforms/to8.test.js +201 -0
- package/src/transforms/to8.ts +109 -0
|
@@ -4,145 +4,80 @@ figure {
|
|
|
4
4
|
margin: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.block.image
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.block.image {
|
|
7
|
+
.block.image,
|
|
8
|
+
.block-editor-image {
|
|
9
|
+
--align-left: left;
|
|
10
|
+
--align-center: none;
|
|
11
|
+
--align-right: right;
|
|
13
12
|
margin: 0;
|
|
13
|
+
margin-top: $spacing-large;
|
|
14
14
|
|
|
15
|
-
&.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
margin-top: $spacing-large;
|
|
21
|
-
margin-bottom: 0 !important;
|
|
15
|
+
&.has--block-width--full {
|
|
16
|
+
figcaption {
|
|
17
|
+
padding-right: 25px;
|
|
18
|
+
padding-left: 25px;
|
|
19
|
+
}
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
&.has--block-width--default,
|
|
23
|
+
&.has--block-width--layout,
|
|
25
24
|
&.has--block-width--narrow,
|
|
26
25
|
&.has--block-width--full {
|
|
27
|
-
figure
|
|
26
|
+
figure {
|
|
28
27
|
margin-top: $spacing-large;
|
|
29
28
|
margin-bottom: $spacing-large;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
&.right {
|
|
41
|
-
margin-bottom: 20px;
|
|
42
|
-
margin-left: 20px;
|
|
43
|
-
float: right;
|
|
44
|
-
|
|
32
|
+
&.has--block-alignment--left,
|
|
33
|
+
&.has--block-alignment--right {
|
|
34
|
+
margin-bottom: 0 !important;
|
|
35
|
+
figure {
|
|
36
|
+
margin-top: 0 !important;
|
|
37
|
+
margin-bottom: $spacing-small;
|
|
45
38
|
@container (max-width: #{$largest-mobile-screen}) {
|
|
39
|
+
max-width: unset !important;
|
|
46
40
|
margin-bottom: $spacing-large;
|
|
47
41
|
}
|
|
48
42
|
|
|
49
43
|
img {
|
|
50
|
-
margin
|
|
51
|
-
margin-bottom: 0px;
|
|
52
|
-
margin-left: 0 !important;
|
|
44
|
+
margin: 0 !important;
|
|
53
45
|
float: none;
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
margin-bottom: 20px;
|
|
60
|
-
float: left;
|
|
61
|
-
|
|
62
|
-
@container (max-width: #{$largest-mobile-screen}) {
|
|
63
|
-
margin-bottom: $spacing-large;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
img {
|
|
67
|
-
margin-right: 0 !important;
|
|
68
|
-
margin-bottom: 0px;
|
|
69
|
-
float: none;
|
|
48
|
+
&.small {
|
|
49
|
+
figure {
|
|
50
|
+
max-width: 220px;
|
|
70
51
|
}
|
|
71
52
|
}
|
|
72
53
|
|
|
73
|
-
&.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
width: 50%;
|
|
77
|
-
height: auto;
|
|
78
|
-
|
|
79
|
-
@media only screen and (max-width: 768px) {
|
|
80
|
-
width: 100%;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.medium {
|
|
85
|
-
width: 50%;
|
|
86
|
-
height: auto;
|
|
87
|
-
@media only screen and (max-width: 768px) {
|
|
88
|
-
width: 100%;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.small {
|
|
93
|
-
width: 25%;
|
|
94
|
-
height: auto;
|
|
95
|
-
@media only screen and (max-width: 768px) {
|
|
96
|
-
width: 100%;
|
|
97
|
-
}
|
|
54
|
+
&.medium {
|
|
55
|
+
figure {
|
|
56
|
+
max-width: 300px;
|
|
98
57
|
}
|
|
99
58
|
}
|
|
59
|
+
}
|
|
100
60
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
margin-bottom: $spacing-large;
|
|
61
|
+
&.has--block-alignment--left {
|
|
62
|
+
figure {
|
|
63
|
+
@include floated-figure('left');
|
|
105
64
|
}
|
|
65
|
+
}
|
|
106
66
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
margin-bottom: $spacing-large;
|
|
111
|
-
margin-left: auto !important;
|
|
112
|
-
object-fit: cover;
|
|
113
|
-
|
|
114
|
-
img {
|
|
115
|
-
height: auto;
|
|
116
|
-
margin-right: initial;
|
|
117
|
-
margin-left: initial;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&.large,
|
|
121
|
-
&.medium,
|
|
122
|
-
&.small {
|
|
123
|
-
width: 100% !important;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.large {
|
|
127
|
-
figcaption {
|
|
128
|
-
text-align: start;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&.medium {
|
|
133
|
-
figcaption {
|
|
134
|
-
width: 100%;
|
|
135
|
-
margin-right: auto;
|
|
136
|
-
margin-left: auto;
|
|
137
|
-
text-align: start;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
67
|
+
&.has--block-alignment--right {
|
|
68
|
+
figure {
|
|
69
|
+
@include floated-figure('right');
|
|
140
70
|
}
|
|
141
71
|
}
|
|
142
72
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
73
|
+
figure {
|
|
74
|
+
width: 100%;
|
|
75
|
+
img {
|
|
76
|
+
width: 100% !important;
|
|
77
|
+
max-width: 100% !important;
|
|
78
|
+
height: auto;
|
|
79
|
+
aspect-ratio: var(--image-aspect-ratio, auto);
|
|
80
|
+
}
|
|
146
81
|
}
|
|
147
82
|
}
|
|
148
83
|
|
|
@@ -181,72 +116,36 @@ figcaption {
|
|
|
181
116
|
|
|
182
117
|
// video block
|
|
183
118
|
|
|
184
|
-
|
|
185
|
-
.block
|
|
186
|
-
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
#page-document .block.video.align.center figure,
|
|
192
|
-
.block.video.align.center figure {
|
|
193
|
-
@include default-container-width;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.block.video {
|
|
197
|
-
.figure {
|
|
198
|
-
width: 100%;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
&.full figcaption {
|
|
202
|
-
padding-right: 25px;
|
|
203
|
-
padding-left: 25px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&.wide,
|
|
207
|
-
&.full,
|
|
208
|
-
&.center {
|
|
209
|
-
margin-top: $spacing-large;
|
|
210
|
-
margin-bottom: $spacing-large;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
&.align.left.has--backgroundColor--grey figure,
|
|
214
|
-
&.align.right.has--backgroundColor--grey figure {
|
|
215
|
-
padding-top: 25px;
|
|
216
|
-
}
|
|
119
|
+
.block.video,
|
|
120
|
+
.block-editor-video {
|
|
121
|
+
margin-top: $spacing-large;
|
|
122
|
+
.video-inner {
|
|
123
|
+
@include variable-container-width();
|
|
217
124
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
margin-bottom: 0px;
|
|
125
|
+
.placeholder {
|
|
126
|
+
width: 100% !important;
|
|
127
|
+
}
|
|
222
128
|
}
|
|
223
|
-
|
|
224
|
-
&.align.left,
|
|
225
|
-
&.align.right {
|
|
226
|
-
margin-top: $spacing-large;
|
|
227
|
-
margin-bottom: 0 !important;
|
|
228
|
-
|
|
129
|
+
&.has--block-alignment--left {
|
|
229
130
|
.video-inner {
|
|
230
|
-
|
|
231
|
-
@
|
|
232
|
-
width: 100%;
|
|
233
|
-
}
|
|
234
|
-
@container (max-width: #{$largest-mobile-screen}) {
|
|
235
|
-
margin-bottom: $spacing-large !important;
|
|
236
|
-
}
|
|
131
|
+
width: 100%;
|
|
132
|
+
@include floated-figure('left');
|
|
237
133
|
}
|
|
134
|
+
}
|
|
238
135
|
|
|
239
|
-
|
|
240
|
-
|
|
136
|
+
&.has--block-alignment--right {
|
|
137
|
+
.video-inner {
|
|
138
|
+
width: 100%;
|
|
139
|
+
@include floated-figure('right');
|
|
241
140
|
}
|
|
242
141
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
margin-right: 20px !important;
|
|
142
|
+
figure {
|
|
143
|
+
width: 100%;
|
|
246
144
|
}
|
|
247
145
|
|
|
248
|
-
&.
|
|
249
|
-
|
|
146
|
+
&.has--block-width--full figcaption {
|
|
147
|
+
padding-right: 25px;
|
|
148
|
+
padding-left: 25px;
|
|
250
149
|
}
|
|
251
150
|
}
|
|
252
151
|
|
|
@@ -371,35 +270,46 @@ figcaption {
|
|
|
371
270
|
}
|
|
372
271
|
}
|
|
373
272
|
|
|
374
|
-
|
|
375
|
-
#page-
|
|
376
|
-
#page-add {
|
|
377
|
-
.block-editor-image figure.center {
|
|
378
|
-
@include variable-container-width();
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.block-editor-image.default figure {
|
|
382
|
-
max-width: var(--default-container-width);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
#page-document .blocks-group-wrapper > .block.image.align.center {
|
|
387
|
-
@include variable-container-width();
|
|
388
|
-
}
|
|
389
|
-
#page-document .blocks-group-wrapper > .block.image.align.center figure {
|
|
273
|
+
#page-document .blocks-group-wrapper > .block.image,
|
|
274
|
+
#page-document .blocks-group-wrapper > .block.video {
|
|
390
275
|
@include variable-container-width();
|
|
391
276
|
}
|
|
392
277
|
|
|
393
278
|
#page-document .blocks-group-wrapper {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
279
|
+
// Unfortunately needed to have more specificity than the top one
|
|
280
|
+
// TODO: Remove when using layers and the BMv3
|
|
281
|
+
& > .block.image.has--block-width--default,
|
|
282
|
+
& > .block.video.has--block-width--default {
|
|
397
283
|
@include adjustMarginsToContainer($default-container-width);
|
|
398
284
|
}
|
|
399
|
-
& > .block.image.
|
|
285
|
+
& > .block.image.has--block-width--layout,
|
|
286
|
+
& > .block.video.has--block-width--layout {
|
|
400
287
|
@include adjustMarginsToContainer($layout-container-width);
|
|
401
288
|
}
|
|
402
|
-
& > .block.image.
|
|
289
|
+
& > .block.image.has--block-width--narrow,
|
|
290
|
+
& > .block.video.has--block-width--narrow {
|
|
403
291
|
@include adjustMarginsToContainer($narrow-container-width);
|
|
404
292
|
}
|
|
405
293
|
}
|
|
294
|
+
|
|
295
|
+
// Edit block overrides
|
|
296
|
+
#page-edit,
|
|
297
|
+
#page-add {
|
|
298
|
+
.block-editor-image,
|
|
299
|
+
.block-editor-video {
|
|
300
|
+
&.has--block-alignment--right,
|
|
301
|
+
&.has--block-alignment--left {
|
|
302
|
+
.block .block:not(.inner)::before {
|
|
303
|
+
z-index: 1;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
.block.inner .block .block {
|
|
307
|
+
z-index: 2;
|
|
308
|
+
@include variable-container-width();
|
|
309
|
+
|
|
310
|
+
&:before {
|
|
311
|
+
display: none;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
&.next--is--__button {
|
|
44
44
|
.items > .listing-item:last-child {
|
|
45
45
|
border-bottom: 1px solid var(--theme-font-color, black);
|
|
46
|
+
.card-inner {
|
|
47
|
+
padding-bottom: $spacing-medium;
|
|
48
|
+
}
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
&.next--is--__button {
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
|
|
55
58
|
.listing-item {
|
|
56
59
|
border-bottom: 1px solid $black;
|
|
57
|
-
margin-bottom:
|
|
60
|
+
margin-bottom: $spacing-medium;
|
|
58
61
|
.card-summary {
|
|
59
62
|
padding: 0;
|
|
60
63
|
|
|
@@ -165,6 +168,7 @@
|
|
|
165
168
|
.card {
|
|
166
169
|
flex-grow: 1;
|
|
167
170
|
.card-inner {
|
|
171
|
+
padding-bottom: $spacing-medium !important;
|
|
168
172
|
.image-wrapper {
|
|
169
173
|
img {
|
|
170
174
|
margin: 0;
|
|
@@ -1,50 +1,76 @@
|
|
|
1
|
-
.block.maps
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
.block.maps,
|
|
2
|
+
.block-editor-maps {
|
|
3
|
+
margin-top: $spacing-large;
|
|
4
|
+
margin-bottom: $spacing-large;
|
|
5
|
+
.maps-inner {
|
|
6
|
+
@include variable-container-width();
|
|
7
|
+
|
|
7
8
|
iframe {
|
|
8
9
|
height: unset;
|
|
9
|
-
margin-right: 20px !important;
|
|
10
|
-
margin-bottom: 20px !important;
|
|
11
10
|
aspect-ratio: var(--image-aspect-ratio, $aspect-ratio);
|
|
12
|
-
@container (max-width: #{$largest-mobile-screen}) {
|
|
13
|
-
margin-bottom: $spacing-large !important;
|
|
14
|
-
}
|
|
15
11
|
}
|
|
16
|
-
margin-top: $spacing-large;
|
|
17
|
-
margin-bottom: 0 !important;
|
|
18
12
|
}
|
|
19
|
-
&.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
margin-left: 20px !important;
|
|
24
|
-
aspect-ratio: var(--image-aspect-ratio, $aspect-ratio);
|
|
25
|
-
@container (max-width: #{$largest-mobile-screen}) {
|
|
26
|
-
margin-bottom: $spacing-large !important;
|
|
27
|
-
}
|
|
13
|
+
&.has--block-alignment--left {
|
|
14
|
+
.maps-inner {
|
|
15
|
+
width: 100%;
|
|
16
|
+
@include floated-figure('left');
|
|
28
17
|
}
|
|
29
|
-
margin-top: $spacing-large;
|
|
30
|
-
margin-bottom: 0 !important;
|
|
31
18
|
}
|
|
32
19
|
|
|
33
|
-
&.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
&.has--block-alignment--right {
|
|
21
|
+
.maps-inner {
|
|
22
|
+
width: 100%;
|
|
23
|
+
@include floated-figure('right');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
&.has--block-alignment--left,
|
|
27
|
+
&.has--block-alignment--right {
|
|
28
|
+
margin-bottom: 0 !important;
|
|
29
|
+
@container (max-width: #{$largest-mobile-screen}) {
|
|
30
|
+
margin-bottom: $spacing-large !important;
|
|
31
|
+
}
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
&.
|
|
34
|
+
&.has--block-width--full iframe {
|
|
41
35
|
max-height: 600px;
|
|
42
36
|
}
|
|
37
|
+
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
#page-document .blocks-group-wrapper > .block.maps {
|
|
40
|
+
@include variable-container-width();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#page-document .blocks-group-wrapper {
|
|
44
|
+
// Unfortunately needed to have more specificity than the top one
|
|
45
|
+
// TODO: Remove when using layers and the BMv3
|
|
46
|
+
& > .block.maps.has--block-width--default {
|
|
47
|
+
@include adjustMarginsToContainer($default-container-width);
|
|
48
|
+
}
|
|
49
|
+
& > .block.maps.has--block-width--layout {
|
|
50
|
+
@include adjustMarginsToContainer($layout-container-width);
|
|
51
|
+
}
|
|
52
|
+
& > .block.maps.has--block-width--narrow {
|
|
53
|
+
@include adjustMarginsToContainer($narrow-container-width);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Edit block overrides
|
|
58
|
+
#page-edit,
|
|
59
|
+
#page-add {
|
|
60
|
+
.block-editor-maps {
|
|
61
|
+
&.has--block-alignment--right,
|
|
62
|
+
&.has--block-alignment--left {
|
|
63
|
+
.block .block:not(.inner)::before {
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.block.inner .block .block {
|
|
68
|
+
z-index: 2;
|
|
69
|
+
@include variable-container-width();
|
|
70
|
+
|
|
71
|
+
&:before {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
48
74
|
}
|
|
49
75
|
}
|
|
50
76
|
}
|
package/src/transforms/to6.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { BlocksFormData } from '@plone/types';
|
|
2
|
-
import { findStyleByName } from '@plone/volto/helpers/Blocks/Blocks';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function* visitBlocks(blocks) {
|
|
3
|
+
function* visitBlocks(blocks: any): Generator<any> {
|
|
7
4
|
for (const key in blocks) {
|
|
8
5
|
if (blocks.hasOwnProperty(key)) {
|
|
9
6
|
const block = blocks[key];
|
|
@@ -16,17 +13,6 @@ function* visitBlocks(blocks) {
|
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
|
|
19
|
-
const NORMALIZED_WIDTHS = [
|
|
20
|
-
...config.blocks.widths,
|
|
21
|
-
{
|
|
22
|
-
style: {
|
|
23
|
-
'--block-width': 'var(--default-container-width)',
|
|
24
|
-
},
|
|
25
|
-
name: 'wide',
|
|
26
|
-
label: 'Default',
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
|
|
30
16
|
for (const block of visitBlocks(data.blocks)) {
|
|
31
17
|
if (block?.styles?.backgroundColor) {
|
|
32
18
|
if (block.styles.backgroundColor === 'transparent') {
|
|
@@ -41,10 +27,7 @@ export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
|
|
|
41
27
|
...block.styles,
|
|
42
28
|
'blockWidth:noprefix':
|
|
43
29
|
block.styles?.['blockWidth:noprefix'] ??
|
|
44
|
-
|
|
45
|
-
NORMALIZED_WIDTHS,
|
|
46
|
-
`${block.styles?.buttonAlign === 'wide' ? 'default' : 'narrow'}`,
|
|
47
|
-
),
|
|
30
|
+
(block.styles?.buttonAlign === 'wide' ? 'default' : 'narrow'),
|
|
48
31
|
};
|
|
49
32
|
|
|
50
33
|
delete block.styles.buttonAlign;
|
|
@@ -54,41 +37,14 @@ export function migrateToVLT6ColorAndWidthModel(data: BlocksFormData) {
|
|
|
54
37
|
block.styles = {
|
|
55
38
|
...block.styles,
|
|
56
39
|
shortLine:
|
|
57
|
-
block.styles?.['shortLine'] ?? block?.styles?.align === 'left'
|
|
58
|
-
|
|
59
|
-
: false,
|
|
60
|
-
'align:noprefix': block.styles?.['align:noprefix'] ?? {
|
|
61
|
-
'--block-alignment': 'var(--align-left)',
|
|
62
|
-
},
|
|
40
|
+
block.styles?.['shortLine'] ?? block?.styles?.align === 'left',
|
|
41
|
+
'align:noprefix': block.styles?.['align:noprefix'] ?? 'left',
|
|
63
42
|
'blockWidth:noprefix':
|
|
64
43
|
block.styles?.['blockWidth:noprefix'] ??
|
|
65
|
-
|
|
66
|
-
NORMALIZED_WIDTHS,
|
|
67
|
-
`${block.styles?.align === 'full' ? 'default' : 'narrow'}`,
|
|
68
|
-
),
|
|
44
|
+
(block.styles?.align === 'full' ? 'default' : 'narrow'),
|
|
69
45
|
};
|
|
70
46
|
|
|
71
47
|
delete block.styles.align;
|
|
72
48
|
}
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
block['@type'] === 'image' &&
|
|
76
|
-
!['left', 'right'].includes(block?.align)
|
|
77
|
-
) {
|
|
78
|
-
block.styles = {
|
|
79
|
-
...block.styles,
|
|
80
|
-
'blockWidth:noprefix':
|
|
81
|
-
block.styles?.['blockWidth:noprefix'] ??
|
|
82
|
-
findStyleByName(
|
|
83
|
-
NORMALIZED_WIDTHS,
|
|
84
|
-
block?.align === 'wide'
|
|
85
|
-
? 'default'
|
|
86
|
-
: block?.align === 'center'
|
|
87
|
-
? 'narrow'
|
|
88
|
-
: block.align,
|
|
89
|
-
),
|
|
90
|
-
};
|
|
91
|
-
block.align = 'center';
|
|
92
|
-
}
|
|
93
49
|
}
|
|
94
50
|
}
|