@total_onion/onion-library 1.0.28 → 1.0.30
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/components/block-gradient-layer-v3/gradient-layer-v3.twig +1 -1
- package/components/block-standard-content-v3/group_68655756737c9.json +1 -151
- package/components/fields-content-container-settings-v3/content-container-settings-v3.scss +213 -0
- package/components/fields-content-container-v3/content-container-v3.js +96 -0
- package/components/fields-content-container-v3/content-container-v3.scss +57 -0
- package/components/fields-core-root-variables-v3/core-root-variables-v3.scss +45 -0
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.js +121 -0
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.scss +92 -0
- package/package.json +1 -1
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
{{sectionStyles}}
|
|
14
14
|
}
|
|
15
15
|
</style>
|
|
16
|
-
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-jsload="false" data-renderdynamic="{{renderDynamic}}" data-pattern-gradient-overlay data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
|
|
16
|
+
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade {{block.id}}" {{dataAttributeEntryPoint}} data-jsload="false" data-renderdynamic="{{renderDynamic}}" data-pattern-gradient-overlay data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
|
|
17
17
|
{{htmlEntryPoint}}
|
|
18
18
|
</section>
|
|
@@ -125,156 +125,6 @@
|
|
|
125
125
|
"acfe_clone_modal_button": "",
|
|
126
126
|
"acfe_clone_modal_size": "large"
|
|
127
127
|
},
|
|
128
|
-
{
|
|
129
|
-
"key": "field_6865575687011",
|
|
130
|
-
"label": "Accent Image v3",
|
|
131
|
-
"name": "",
|
|
132
|
-
"aria-label": "",
|
|
133
|
-
"type": "tab",
|
|
134
|
-
"instructions": "",
|
|
135
|
-
"required": 0,
|
|
136
|
-
"conditional_logic": 0,
|
|
137
|
-
"wrapper": {
|
|
138
|
-
"width": "",
|
|
139
|
-
"class": "",
|
|
140
|
-
"id": ""
|
|
141
|
-
},
|
|
142
|
-
"wpml_cf_preferences": 3,
|
|
143
|
-
"placement": "top",
|
|
144
|
-
"endpoint": 0,
|
|
145
|
-
"no_preference": 0,
|
|
146
|
-
"selected": 0
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"key": "field_68655756873f5",
|
|
150
|
-
"label": "Accent Image v3 Fields",
|
|
151
|
-
"name": "accent_image_v3_fields",
|
|
152
|
-
"aria-label": "",
|
|
153
|
-
"type": "clone",
|
|
154
|
-
"instructions": "",
|
|
155
|
-
"required": 0,
|
|
156
|
-
"conditional_logic": 0,
|
|
157
|
-
"wrapper": {
|
|
158
|
-
"width": "",
|
|
159
|
-
"class": "",
|
|
160
|
-
"id": ""
|
|
161
|
-
},
|
|
162
|
-
"wpml_cf_preferences": 3,
|
|
163
|
-
"clone": [
|
|
164
|
-
"group_686cd5547efd2"
|
|
165
|
-
],
|
|
166
|
-
"display": "seamless",
|
|
167
|
-
"layout": "block",
|
|
168
|
-
"prefix_label": 0,
|
|
169
|
-
"prefix_name": 0,
|
|
170
|
-
"acfe_seamless_style": 0,
|
|
171
|
-
"acfe_clone_modal": 0,
|
|
172
|
-
"acfe_clone_modal_close": 0,
|
|
173
|
-
"acfe_clone_modal_button": "",
|
|
174
|
-
"acfe_clone_modal_size": "large"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"key": "field_6865575687f76",
|
|
178
|
-
"label": "Scrolling Banner",
|
|
179
|
-
"name": "",
|
|
180
|
-
"aria-label": "",
|
|
181
|
-
"type": "tab",
|
|
182
|
-
"instructions": "",
|
|
183
|
-
"required": 0,
|
|
184
|
-
"conditional_logic": 0,
|
|
185
|
-
"wrapper": {
|
|
186
|
-
"width": "",
|
|
187
|
-
"class": "",
|
|
188
|
-
"id": ""
|
|
189
|
-
},
|
|
190
|
-
"wpml_cf_preferences": 3,
|
|
191
|
-
"placement": "top",
|
|
192
|
-
"endpoint": 0,
|
|
193
|
-
"no_preference": 0,
|
|
194
|
-
"selected": 0
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"key": "field_68655756883a1",
|
|
198
|
-
"label": "scrolling banner fields",
|
|
199
|
-
"name": "scrolling_banner_fields",
|
|
200
|
-
"aria-label": "",
|
|
201
|
-
"type": "clone",
|
|
202
|
-
"instructions": "",
|
|
203
|
-
"required": 0,
|
|
204
|
-
"conditional_logic": 0,
|
|
205
|
-
"wrapper": {
|
|
206
|
-
"width": "",
|
|
207
|
-
"class": "",
|
|
208
|
-
"id": ""
|
|
209
|
-
},
|
|
210
|
-
"wpml_cf_preferences": 3,
|
|
211
|
-
"user_roles": [
|
|
212
|
-
"all"
|
|
213
|
-
],
|
|
214
|
-
"clone": [
|
|
215
|
-
"group_626472bf26f5c"
|
|
216
|
-
],
|
|
217
|
-
"display": "seamless",
|
|
218
|
-
"layout": "block",
|
|
219
|
-
"prefix_label": 0,
|
|
220
|
-
"prefix_name": 0,
|
|
221
|
-
"acfe_seamless_style": 0,
|
|
222
|
-
"acfe_clone_modal": 0,
|
|
223
|
-
"acfe_clone_modal_close": 0,
|
|
224
|
-
"acfe_clone_modal_button": "",
|
|
225
|
-
"acfe_clone_modal_size": "large"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"key": "field_6865575688783",
|
|
229
|
-
"label": "Buy Now Button",
|
|
230
|
-
"name": "",
|
|
231
|
-
"aria-label": "",
|
|
232
|
-
"type": "tab",
|
|
233
|
-
"instructions": "",
|
|
234
|
-
"required": 0,
|
|
235
|
-
"conditional_logic": 0,
|
|
236
|
-
"wrapper": {
|
|
237
|
-
"width": "",
|
|
238
|
-
"class": "",
|
|
239
|
-
"id": ""
|
|
240
|
-
},
|
|
241
|
-
"wpml_cf_preferences": 3,
|
|
242
|
-
"placement": "top",
|
|
243
|
-
"endpoint": 0,
|
|
244
|
-
"no_preference": 0,
|
|
245
|
-
"selected": 0
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"key": "field_6865575688b74",
|
|
249
|
-
"label": "Buy now fields",
|
|
250
|
-
"name": "buy_now_fields",
|
|
251
|
-
"aria-label": "",
|
|
252
|
-
"type": "clone",
|
|
253
|
-
"instructions": "",
|
|
254
|
-
"required": 0,
|
|
255
|
-
"conditional_logic": 0,
|
|
256
|
-
"wrapper": {
|
|
257
|
-
"width": "",
|
|
258
|
-
"class": "",
|
|
259
|
-
"id": ""
|
|
260
|
-
},
|
|
261
|
-
"user_roles": [
|
|
262
|
-
"all"
|
|
263
|
-
],
|
|
264
|
-
"clone": [
|
|
265
|
-
"field_659685d580e5f"
|
|
266
|
-
],
|
|
267
|
-
"display": "seamless",
|
|
268
|
-
"layout": "block",
|
|
269
|
-
"prefix_label": 0,
|
|
270
|
-
"prefix_name": 0,
|
|
271
|
-
"acfe_seamless_style": 0,
|
|
272
|
-
"acfe_clone_modal": 0,
|
|
273
|
-
"acfe_clone_modal_close": 0,
|
|
274
|
-
"acfe_clone_modal_button": "",
|
|
275
|
-
"acfe_clone_modal_size": "large",
|
|
276
|
-
"wpml_cf_preferences": 3
|
|
277
|
-
},
|
|
278
128
|
{
|
|
279
129
|
"key": "field_6865575688f54",
|
|
280
130
|
"label": "Animations",
|
|
@@ -590,5 +440,5 @@
|
|
|
590
440
|
"acfe_display_title": "",
|
|
591
441
|
"acfe_meta": "",
|
|
592
442
|
"acfe_note": "",
|
|
593
|
-
"modified":
|
|
443
|
+
"modified": 1752844414
|
|
594
444
|
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
@use 'Assets/scss/theme/breakpoints';
|
|
2
|
+
@use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
3
|
+
@use 'Assets/scss/modules/library-modules/core-functions/core-functions';
|
|
4
|
+
@use 'Assets/scss/modules/library-modules/box-shadow/box-shadow';
|
|
5
|
+
|
|
6
|
+
@mixin contentContainerSettings() {
|
|
7
|
+
&__inner-container {
|
|
8
|
+
grid-area: main;
|
|
9
|
+
place-self: var(--content-box-vert-align-mobile)
|
|
10
|
+
var(--content-box-horiz-align-mobile);
|
|
11
|
+
z-index: var(--content-z-index, 5);
|
|
12
|
+
overflow: var(--content-box-overflow);
|
|
13
|
+
min-width: min-content;
|
|
14
|
+
aspect-ratio: var(--content-box-aspect-ratio);
|
|
15
|
+
border-radius: var(--border-radius);
|
|
16
|
+
border-width: var(--border-width);
|
|
17
|
+
border-color: var(--border-colour);
|
|
18
|
+
border-style: var(--border-style);
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: var(--content-box-items-direction-mobile, column);
|
|
21
|
+
justify-content: var(--content-items-alignment-mobile);
|
|
22
|
+
align-items: center;
|
|
23
|
+
background-color: var(--cb-bg-colour);
|
|
24
|
+
padding: calc(
|
|
25
|
+
var(--global-content-box-padding-block) *
|
|
26
|
+
var(--content-box-top-padding-mult-mobile)
|
|
27
|
+
)
|
|
28
|
+
calc(
|
|
29
|
+
var(--global-content-box-padding-inline) *
|
|
30
|
+
var(--content-box-right-padding-mult-mobile)
|
|
31
|
+
)
|
|
32
|
+
calc(
|
|
33
|
+
var(--global-content-box-padding-inline) *
|
|
34
|
+
var(--content-box-bottom-padding-mult-mobile)
|
|
35
|
+
)
|
|
36
|
+
calc(
|
|
37
|
+
var(--global-content-box-padding-inline) *
|
|
38
|
+
var(--content-box-left-padding-mult-mobile)
|
|
39
|
+
);
|
|
40
|
+
margin: calc(
|
|
41
|
+
var(--global-inline-spacing) *
|
|
42
|
+
var(--content-container-top-margin-mobile)
|
|
43
|
+
)
|
|
44
|
+
calc(
|
|
45
|
+
var(--global-inline-spacing) *
|
|
46
|
+
var(--content-container-right-margin-mobile)
|
|
47
|
+
)
|
|
48
|
+
calc(
|
|
49
|
+
var(--global-inline-spacing) *
|
|
50
|
+
var(--content-container-bottom-margin-mobile)
|
|
51
|
+
)
|
|
52
|
+
calc(
|
|
53
|
+
var(--global-inline-spacing) *
|
|
54
|
+
var(--content-container-left-margin-mobile)
|
|
55
|
+
);
|
|
56
|
+
column-gap: var(
|
|
57
|
+
--content-items-micro-gap-mobile,
|
|
58
|
+
calc(var(--content-items-gap-mobile) * var(--global-inline-spacing))
|
|
59
|
+
);
|
|
60
|
+
@include core-mixins.device(breakpoints.$tabPortrait) {
|
|
61
|
+
justify-content: var(--content-items-alignment-portrait);
|
|
62
|
+
place-self: var(--content-box-vert-align-portrait)
|
|
63
|
+
var(--content-box-horiz-align-portrait);
|
|
64
|
+
padding: calc(
|
|
65
|
+
var(--global-content-box-padding-block) *
|
|
66
|
+
var(--content-box-top-padding-mult-portrait)
|
|
67
|
+
)
|
|
68
|
+
calc(
|
|
69
|
+
var(--global-content-box-padding-inline) *
|
|
70
|
+
var(--content-box-right-padding-mult-portrait)
|
|
71
|
+
)
|
|
72
|
+
calc(
|
|
73
|
+
var(--global-content-box-padding-inline) *
|
|
74
|
+
var(--content-box-bottom-padding-mult-portrait)
|
|
75
|
+
)
|
|
76
|
+
calc(
|
|
77
|
+
var(--global-content-box-padding-inline) *
|
|
78
|
+
var(--content-box-left-padding-mult-portrait)
|
|
79
|
+
);
|
|
80
|
+
margin: calc(
|
|
81
|
+
var(--global-inline-spacing) *
|
|
82
|
+
var(--content-container-top-margin-portrait)
|
|
83
|
+
)
|
|
84
|
+
calc(
|
|
85
|
+
var(--global-inline-spacing) *
|
|
86
|
+
var(--content-container-right-margin-portrait)
|
|
87
|
+
)
|
|
88
|
+
calc(
|
|
89
|
+
var(--global-inline-spacing) *
|
|
90
|
+
var(--content-container-bottom-margin-portrait)
|
|
91
|
+
)
|
|
92
|
+
calc(
|
|
93
|
+
var(--global-inline-spacing) *
|
|
94
|
+
var(--content-container-left-margin-portrait)
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@include core-mixins.device(breakpoints.$tabLandscape) {
|
|
99
|
+
column-gap: var(
|
|
100
|
+
--content-items-micro-gap-desktop,
|
|
101
|
+
calc(
|
|
102
|
+
var(--content-items-gap-desktop) *
|
|
103
|
+
var(--global-inline-spacing)
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
justify-content: var(--content-items-alignment);
|
|
107
|
+
max-width: var(--cb-max-width);
|
|
108
|
+
place-self: var(--content-box-vert-align)
|
|
109
|
+
var(--content-box-horiz-align);
|
|
110
|
+
padding: calc(
|
|
111
|
+
var(--global-content-box-padding-block) *
|
|
112
|
+
var(--content-box-top-padding-mult)
|
|
113
|
+
)
|
|
114
|
+
calc(
|
|
115
|
+
var(--global-content-box-padding-inline) *
|
|
116
|
+
var(--content-box-right-padding-mult)
|
|
117
|
+
)
|
|
118
|
+
calc(
|
|
119
|
+
var(--global-content-box-padding-inline) *
|
|
120
|
+
var(--content-box-bottom-padding-mult)
|
|
121
|
+
)
|
|
122
|
+
calc(
|
|
123
|
+
var(--global-content-box-padding-inline) *
|
|
124
|
+
var(--content-box-left-padding-mult)
|
|
125
|
+
);
|
|
126
|
+
margin: calc(
|
|
127
|
+
var(--global-inline-spacing) *
|
|
128
|
+
var(--content-container-top-margin)
|
|
129
|
+
)
|
|
130
|
+
calc(
|
|
131
|
+
var(--global-inline-spacing) *
|
|
132
|
+
var(--content-container-right-margin)
|
|
133
|
+
)
|
|
134
|
+
calc(
|
|
135
|
+
var(--global-inline-spacing) *
|
|
136
|
+
var(--content-container-bottom-margin)
|
|
137
|
+
)
|
|
138
|
+
calc(
|
|
139
|
+
var(--global-inline-spacing) *
|
|
140
|
+
var(--content-container-left-margin)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include box-shadow.boxShadow();
|
|
145
|
+
}
|
|
146
|
+
&__content-container {
|
|
147
|
+
max-width: var(--wysiwyg-max-width-mobile);
|
|
148
|
+
margin-inline: auto;
|
|
149
|
+
display: grid;
|
|
150
|
+
word-break: normal;
|
|
151
|
+
width: var(--content-container-width, 100%);
|
|
152
|
+
-webkit-text-stroke: core-functions.fontSize(
|
|
153
|
+
var(--text-stroke-width),
|
|
154
|
+
'static'
|
|
155
|
+
)
|
|
156
|
+
var(--text-stroke-colour);
|
|
157
|
+
@include core-mixins.defaultThemeTextColours();
|
|
158
|
+
@include core-mixins.defaultTextTransform();
|
|
159
|
+
@include core-mixins.defaultTextAlign();
|
|
160
|
+
@include core-mixins.responsiveShowHide();
|
|
161
|
+
p,
|
|
162
|
+
h1,
|
|
163
|
+
h2,
|
|
164
|
+
h3,
|
|
165
|
+
h4,
|
|
166
|
+
h5,
|
|
167
|
+
h6,
|
|
168
|
+
a,
|
|
169
|
+
li,
|
|
170
|
+
div {
|
|
171
|
+
@include core-mixins.defaultFontWeight();
|
|
172
|
+
@include core-mixins.defaultFontStyle();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:last-child {
|
|
176
|
+
margin-bottom: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@include core-mixins.device(breakpoints.$tabPortrait) {
|
|
180
|
+
max-width: var(--wysiwyg-max-width-portrait);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@include core-mixins.device(breakpoints.$tabLandscape) {
|
|
184
|
+
max-width: var(--wysiwyg-max-width);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&--text-shadow {
|
|
189
|
+
@include core-mixins.textShadow();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&__cta-selection-container {
|
|
193
|
+
width: 100%;
|
|
194
|
+
display: var(--cta-container-display);
|
|
195
|
+
grid-template-columns: var(--grid-columns-mobile);
|
|
196
|
+
flex-wrap: wrap;
|
|
197
|
+
flex-direction: var(--cta-flex-direction);
|
|
198
|
+
justify-content: var(--cta-alignment-mobile);
|
|
199
|
+
gap: calc(var(--global-inline-spacing) * var(--cta-spacing-gap-mobile));
|
|
200
|
+
|
|
201
|
+
@include core-mixins.device(breakpoints.$tabPortrait) {
|
|
202
|
+
gap: calc(
|
|
203
|
+
var(--global-inline-spacing) * var(--cta-spacing-gap-desktop)
|
|
204
|
+
);
|
|
205
|
+
justify-content: var(--cta-alignment-portrait);
|
|
206
|
+
grid-template-columns: var(--grid-columns-portrait);
|
|
207
|
+
}
|
|
208
|
+
@include core-mixins.device(breakpoints.$tabLandscape) {
|
|
209
|
+
justify-content: var(--cta-alignment);
|
|
210
|
+
grid-template-columns: var(--grid-columns-desktop);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import shop from 'Assets/js/modules/library-modules/shopify/shop';
|
|
2
|
+
|
|
3
|
+
export default function contentContainerJs(block) {
|
|
4
|
+
if (!block) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const blockClassName = block.dataset.assetkey;
|
|
9
|
+
const formContainerElement = block.querySelector('.form-container');
|
|
10
|
+
const modalFormContainerElement = block.querySelector(
|
|
11
|
+
'.form-container__modal'
|
|
12
|
+
);
|
|
13
|
+
const countdownElement = block.querySelector('.countdowndate');
|
|
14
|
+
const socialMediaElement = block.querySelector('.social-media-share-popup');
|
|
15
|
+
const accordionV2Element = block.querySelector(
|
|
16
|
+
`.${blockClassName}__accordion-v2`
|
|
17
|
+
);
|
|
18
|
+
const marketSelector = block.querySelector('.market-selector');
|
|
19
|
+
const shopifySelector = block.querySelector('.shopify__cart');
|
|
20
|
+
const contentTooltip = block.querySelector('.content-tooltip-wrapper');
|
|
21
|
+
const spotifyEmbed = block.querySelector('.spotify-embed');
|
|
22
|
+
const truncatedText = block.querySelector('.truncated-text');
|
|
23
|
+
// const accordionV3Element = block.querySelector(
|
|
24
|
+
// '.standard-content-v2__accordion-v3'
|
|
25
|
+
// );
|
|
26
|
+
|
|
27
|
+
if (formContainerElement || modalFormContainerElement) {
|
|
28
|
+
import(
|
|
29
|
+
'Assets/js/modules/library-modules/form-selection/form-selection.js'
|
|
30
|
+
).then((module) => {
|
|
31
|
+
module.default(block);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (countdownElement) {
|
|
36
|
+
import('Assets/js/modules/library-modules/countdown/countdown.js').then(
|
|
37
|
+
(module) => {
|
|
38
|
+
module.default(block);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (socialMediaElement) {
|
|
44
|
+
import(
|
|
45
|
+
'Assets/js/modules/library-modules/social-media-share/social-media-share.js'
|
|
46
|
+
).then((module) => {
|
|
47
|
+
module.default(block);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (accordionV2Element) {
|
|
52
|
+
import(
|
|
53
|
+
'Assets/js/modules/library-modules/accordion-v2/accordion-v2.js'
|
|
54
|
+
).then((module) => {
|
|
55
|
+
module.default(block);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (marketSelector) {
|
|
60
|
+
import(
|
|
61
|
+
'Assets/js/modules/library-modules/market-selector/market-selector.js'
|
|
62
|
+
).then((module) => {
|
|
63
|
+
module.default(block);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (shopifySelector) {
|
|
67
|
+
shop.loadShops();
|
|
68
|
+
}
|
|
69
|
+
if (contentTooltip) {
|
|
70
|
+
import(
|
|
71
|
+
'Assets/js/modules/library-modules/content-tooltip/content-tooltip.js'
|
|
72
|
+
).then((module) => {
|
|
73
|
+
module.default(block);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (spotifyEmbed) {
|
|
77
|
+
import(
|
|
78
|
+
'Assets/js/modules/library-modules/spotify-embed/spotify-embed.js'
|
|
79
|
+
).then((module) => {
|
|
80
|
+
module.default(block);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (truncatedText) {
|
|
84
|
+
import(
|
|
85
|
+
'Assets/js/modules/library-modules/truncated-text/truncated-text.js'
|
|
86
|
+
).then((module) => {
|
|
87
|
+
module.default(block);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// if (accordionV3Element) {
|
|
92
|
+
// import('Assets/js/modules/library-modules/accordion-v3/accordion-v3.js').then((module) => {
|
|
93
|
+
// module.default(block);
|
|
94
|
+
// })
|
|
95
|
+
// }
|
|
96
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@use 'Assets/scss/modules/library-modules/content-image-v2/content-image-v2';
|
|
2
|
+
@use 'Assets/scss/modules/library-modules/nav-menu/nav-menu';
|
|
3
|
+
@use 'Assets/scss/modules/library-modules/code-block/code-block';
|
|
4
|
+
@use 'Assets/scss/modules/library-modules/countdown/countdown';
|
|
5
|
+
@use 'Assets/scss/modules/library-modules/bazaarvoice-review/bazaarvoice-review';
|
|
6
|
+
@use 'Assets/scss/modules/library-modules/post-author/post-author';
|
|
7
|
+
@use 'Assets/scss/modules/library-modules/content-tooltip/content-tooltip';
|
|
8
|
+
|
|
9
|
+
@use 'Assets/scss/modules/library-modules/accent-text/accent-text';
|
|
10
|
+
@use 'Assets/scss/modules/library-modules/content-container-settings/content-container-settings';
|
|
11
|
+
@use 'Assets/scss/modules/library-modules/better-reviews/better-reviews';
|
|
12
|
+
@use 'Assets/scss/modules/library-modules/blockquote/blockquote';
|
|
13
|
+
@use 'Assets/scss/modules/library-modules/social-media-share/social-media-share';
|
|
14
|
+
@use 'Assets/scss/modules/library-modules/accordion-v2/accordion-v2';
|
|
15
|
+
// @use 'Assets/scss/modules/library-modules/accordion-v3/accordion-v3';
|
|
16
|
+
@use 'Assets/scss/modules/library-modules/market-selector/market-selector';
|
|
17
|
+
@use 'Assets/scss/modules/library-modules/truncated-text/truncated-text';
|
|
18
|
+
@use 'Assets/scss/modules/library-modules/spotify-embed/spotify-embed';
|
|
19
|
+
@use 'Assets/scss/theme/buttons';
|
|
20
|
+
|
|
21
|
+
@mixin contentContainer() {
|
|
22
|
+
@include nav-menu.navMenu();
|
|
23
|
+
@include code-block.codeBlock();
|
|
24
|
+
@include countdown.countdown();
|
|
25
|
+
@include bazaarvoice-review.bazaarvoice-review();
|
|
26
|
+
@include post-author.postauthorinfo();
|
|
27
|
+
@include content-tooltip.content-tooltip();
|
|
28
|
+
@include spotify-embed.spotify-embed();
|
|
29
|
+
// @include market-selector.market-selector();
|
|
30
|
+
@include accent-text.accent-text();
|
|
31
|
+
@include content-container-settings.contentContainerSettings();
|
|
32
|
+
@include better-reviews.better-reviews();
|
|
33
|
+
@include blockquote.blockquote();
|
|
34
|
+
@include social-media-share.social-media-share();
|
|
35
|
+
@include accordion-v2.accordion-v2();
|
|
36
|
+
// @include accordion-v3.accordion-v3();
|
|
37
|
+
@include buttons.shareIconStyles();
|
|
38
|
+
@include buttons.playButtonStyles();
|
|
39
|
+
@include truncated-text.truncated-text();
|
|
40
|
+
|
|
41
|
+
&__video-play-button-container {
|
|
42
|
+
display: grid;
|
|
43
|
+
width: 100%;
|
|
44
|
+
pointer-events: all;
|
|
45
|
+
&:last-child {
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
&__video-play-button {
|
|
50
|
+
grid-area: unset;
|
|
51
|
+
place-self: var(--playbutton-vertical-alignment, center)
|
|
52
|
+
var(--playbutton-horizontal-alignment, center);
|
|
53
|
+
}
|
|
54
|
+
&__content-image {
|
|
55
|
+
@include content-image-v2.contentImage();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// LIBRARY FILE - Do not modify/override here as your changes will be lost when the package is updated.
|
|
2
|
+
@use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
3
|
+
@use 'Assets/scss/theme/breakpoints';
|
|
4
|
+
|
|
5
|
+
//Global native CSS variables
|
|
6
|
+
body {
|
|
7
|
+
//Font weights
|
|
8
|
+
--weight-thin: 100;
|
|
9
|
+
--weight-extra-light: 200;
|
|
10
|
+
--weight-light: 300;
|
|
11
|
+
--weight-medium: 400;
|
|
12
|
+
--weight-demi-bold: 500;
|
|
13
|
+
--weight-demi-bold-plus: 600;
|
|
14
|
+
--weight-bold: 700;
|
|
15
|
+
--weight-extra-bold: 800;
|
|
16
|
+
--weight-extra-bold-plus: 900;
|
|
17
|
+
--default-text-colour-mobile: var(--theme-primary-text-colour);
|
|
18
|
+
--default-text-colour-desktop: var(--theme-primary-text-colour);
|
|
19
|
+
// When you are in the WP preview - the screen width var now now needs to match the width of the WP editor preview box.
|
|
20
|
+
.wp-toolbar & {
|
|
21
|
+
--screen-width-mobile: 360px;
|
|
22
|
+
--font-reference-mobile: 360px;
|
|
23
|
+
--screen-width: 360px;
|
|
24
|
+
--font-reference: 360px;
|
|
25
|
+
@include core-mixins.device(breakpoints.$tabPortrait) {
|
|
26
|
+
--screen-width-portrait: 768px;
|
|
27
|
+
--screen-width-landscape: 768px;
|
|
28
|
+
--screen-width-desktop: 768px;
|
|
29
|
+
--screen-width-static: 768px;
|
|
30
|
+
--screen-width: 768px;
|
|
31
|
+
--font-reference: 768px;
|
|
32
|
+
}
|
|
33
|
+
@include core-mixins.device(breakpoints.$tabLandscape) {
|
|
34
|
+
--screen-width-portrait: 840px;
|
|
35
|
+
--screen-width-landscape: 840px;
|
|
36
|
+
--screen-width-desktop: 840px;
|
|
37
|
+
--screen-width-static: 840px;
|
|
38
|
+
--screen-width: 840px;
|
|
39
|
+
--font-reference-portrait: 840px;
|
|
40
|
+
--font-reference-landscape: 840px;
|
|
41
|
+
--font-reference-desktop: 840px;
|
|
42
|
+
--font-reference: 840px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// LIBRARY FILE - Do not modify/override here as your changes will be lost when the package is updated.
|
|
2
|
+
import wppreview from '@pernod-ricard-global-cms/wordpresspreview';
|
|
3
|
+
import colourPalettes from '@pernod-ricard-global-cms/cblcolourpalettes';
|
|
4
|
+
import ctaStyles from 'Assets/js/modules/library-modules/core-editor-cta-style-select/core-editor-cta-style-select.js';
|
|
5
|
+
import themeNames from 'Assets/js/modules/library-modules/core-editor-theme-select/core-editor-theme-select.js';
|
|
6
|
+
import jQuery from 'jquery';
|
|
7
|
+
const $ = jQuery;
|
|
8
|
+
|
|
9
|
+
function setPageBgColour(colourType) {
|
|
10
|
+
if (colourType !== 'custom') {
|
|
11
|
+
document
|
|
12
|
+
.querySelector('body')
|
|
13
|
+
.style.setProperty('--page-background-colour', colourType);
|
|
14
|
+
} else {
|
|
15
|
+
requestAnimationFrame(() => {
|
|
16
|
+
const customColour = $(`[data-name=page_background_colour]`).find(
|
|
17
|
+
'input[type=hidden]'
|
|
18
|
+
)[0]?.value;
|
|
19
|
+
document
|
|
20
|
+
.querySelector('body')
|
|
21
|
+
.style.setProperty('--page-background-colour', customColour);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
$(document).ready(function ($) {
|
|
26
|
+
let colourTypeSelect = $(`[data-name=page_background_colour_type] select`);
|
|
27
|
+
|
|
28
|
+
if (colourTypeSelect.length !== 0) {
|
|
29
|
+
let colourType = colourTypeSelect
|
|
30
|
+
.find(':selected')[0]
|
|
31
|
+
.value.replace('__', '');
|
|
32
|
+
|
|
33
|
+
colourTypeSelect.on('select2:select', function (event) {
|
|
34
|
+
colourType = colourTypeSelect
|
|
35
|
+
.find(':selected')[0]
|
|
36
|
+
.value.replace('__', '');
|
|
37
|
+
setPageBgColour(colourType);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
setPageBgColour(colourType);
|
|
41
|
+
// return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const ctaSelectNames = [
|
|
45
|
+
'cta_style',
|
|
46
|
+
'load_more_button_style',
|
|
47
|
+
'category_button_style',
|
|
48
|
+
'active_category_button_style',
|
|
49
|
+
'top_level_category_button_style',
|
|
50
|
+
'show_all_button_style',
|
|
51
|
+
'toggle_filter_button_style'
|
|
52
|
+
];
|
|
53
|
+
const themeSelectNames = ['page_theme'];
|
|
54
|
+
const colourData = globalThis.colourconfig;
|
|
55
|
+
colourPalettes(colourData);
|
|
56
|
+
ctaStyles(ctaSelectNames);
|
|
57
|
+
themeNames(themeSelectNames);
|
|
58
|
+
wppreview({lazyloaderFilepath: 'js/blocks/'});
|
|
59
|
+
|
|
60
|
+
document.documentElement.insertAdjacentHTML('afterbegin', previewvars[0]);
|
|
61
|
+
document.documentElement.insertAdjacentHTML(
|
|
62
|
+
'afterbegin',
|
|
63
|
+
coretypography[0]
|
|
64
|
+
);
|
|
65
|
+
document.documentElement.insertAdjacentHTML(
|
|
66
|
+
'afterbegin',
|
|
67
|
+
corefontmodifiers[0]
|
|
68
|
+
);
|
|
69
|
+
document.documentElement.insertAdjacentHTML('afterbegin', corethemes[0]);
|
|
70
|
+
document.documentElement.insertAdjacentHTML('afterbegin', corecta[0]);
|
|
71
|
+
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
const previewToggle = document.querySelector(
|
|
74
|
+
'.editor-preview-dropdown__toggle'
|
|
75
|
+
);
|
|
76
|
+
previewToggle.addEventListener('click', () => {
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
const resizeButtons = document.querySelectorAll(
|
|
79
|
+
'.components-menu-item__button'
|
|
80
|
+
);
|
|
81
|
+
resizeButtons.forEach((button) => {
|
|
82
|
+
button.addEventListener('click', () => {
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
let frame = document.querySelector(
|
|
85
|
+
'.edit-post-visual-editor iframe'
|
|
86
|
+
);
|
|
87
|
+
frame.contentWindow.document.documentElement.insertAdjacentHTML(
|
|
88
|
+
'afterbegin',
|
|
89
|
+
coretypography[0]
|
|
90
|
+
);
|
|
91
|
+
frame.contentWindow.document.documentElement.insertAdjacentHTML(
|
|
92
|
+
'afterbegin',
|
|
93
|
+
previewvars[0]
|
|
94
|
+
);
|
|
95
|
+
frame.contentWindow.document.documentElement.insertAdjacentHTML(
|
|
96
|
+
'afterbegin',
|
|
97
|
+
corefontmodifiers[0]
|
|
98
|
+
);
|
|
99
|
+
frame.contentWindow.document.documentElement.insertAdjacentHTML(
|
|
100
|
+
'afterbegin',
|
|
101
|
+
corecta[0]
|
|
102
|
+
);
|
|
103
|
+
frame.contentWindow.document.documentElement.insertAdjacentHTML(
|
|
104
|
+
'afterbegin',
|
|
105
|
+
corethemes[0]
|
|
106
|
+
);
|
|
107
|
+
let currentTheme =
|
|
108
|
+
document.documentElement.getAttribute(
|
|
109
|
+
'data-currentcolourpalette'
|
|
110
|
+
);
|
|
111
|
+
frame.contentWindow.document.documentElement.setAttribute(
|
|
112
|
+
'data-currentcolourpalette',
|
|
113
|
+
currentTheme
|
|
114
|
+
);
|
|
115
|
+
}, 1000);
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}, 1000);
|
|
119
|
+
});
|
|
120
|
+
}, 2000);
|
|
121
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// LIBRARY FILE - Do not modify/override here as your changes will be lost when the package is updated.
|
|
2
|
+
@use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
3
|
+
@use 'Assets/scss/modules/library-modules/core-root-variables/core-root-variables';
|
|
4
|
+
@use 'Assets/scss/modules/library-modules/core-css-sizing-vars/core-css-sizing-vars';
|
|
5
|
+
@use 'Assets/scss/modules/library-modules/core-css-modules/core-css-modules';
|
|
6
|
+
|
|
7
|
+
/* Box sizing rules */
|
|
8
|
+
*,
|
|
9
|
+
*::before,
|
|
10
|
+
*::after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
.editor-styles-wrapper {
|
|
14
|
+
}
|
|
15
|
+
.block-editor-block-list__layout .wp-block {
|
|
16
|
+
@include core-mixins.fontSecondary();
|
|
17
|
+
border: 1px solid #0000002e;
|
|
18
|
+
background: var(--theme-primary-background-colour);
|
|
19
|
+
color: var(--theme-primary-text-colour);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
img {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: auto;
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//This is to correct a horrible, horrible bit of Wordpress admin css!! :0
|
|
29
|
+
html :where([style*='border-width'][data-assetkey]) {
|
|
30
|
+
border-style: initial;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.acf-block-component.acf-block-body .acf-block-preview {
|
|
34
|
+
@import 'Assets/scss/modules/dynamicBlocksPreview';
|
|
35
|
+
@import 'Assets/scss/theme/typography';
|
|
36
|
+
|
|
37
|
+
.swiper {
|
|
38
|
+
&::before {
|
|
39
|
+
content: '';
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
z-index: 9;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.swiper-wrapper {
|
|
50
|
+
height: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
section {
|
|
54
|
+
width: 100%;
|
|
55
|
+
pointer-events: all;
|
|
56
|
+
|
|
57
|
+
a {
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Theme generic
|
|
63
|
+
.lazy,
|
|
64
|
+
.lazy-fade {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
.js-enabled-hide {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.loading-spinner {
|
|
72
|
+
margin-top: unset;
|
|
73
|
+
margin-bottom: unset;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
z-index: 99;
|
|
78
|
+
display: grid;
|
|
79
|
+
place-items: center;
|
|
80
|
+
left: 50%;
|
|
81
|
+
transform: translateX(-50%);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.loaded {
|
|
87
|
+
.loading-spinner {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
transition: opacity 0.3s;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|