@total_onion/onion-library 2.0.99 → 2.0.101

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.
@@ -17,11 +17,16 @@
17
17
 
18
18
  {% set elementStyles = textStyle %}
19
19
 
20
-
21
20
  {% set sectionStyles = styleEntryPoint ~ elementStyles ~ columnCount ~ bgColourItems ~ bgColourHeader ~ spacingGapDesktop %}
22
21
 
22
+ <style>
23
+ .{{blockClassName}}.{{block.id}}{
24
+ {{sectionStyles}}
25
+ }
26
+ </style>
27
+
28
+ <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{classNameEntryPoint}} {{block.id}} lazy-fade" {{dataAttributeEntryPoint}} data-jsload="false" data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
23
29
 
24
- <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-jsload="false" data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
25
30
  <div class="{{ blockClassName }}__wrapper" style=" {{columnCount}}" aria-hidden="true">
26
31
  <div class="{{ blockClassName }}__headings ">
27
32
  {% for field in fields.headings %}
@@ -36,10 +41,7 @@
36
41
  <div class="{{ blockClassName }}__item-value">{{element.item_value}}</div>
37
42
  {% endfor %}
38
43
  </div>
39
-
40
44
  {% endfor %}
41
-
42
-
43
45
  </div>
44
46
  {{htmlEntryPoint}}
45
47
  </section>
@@ -63,7 +63,7 @@ function scrollingbannerJs(block) {
63
63
  const inner = bannerElement.querySelector(
64
64
  '.scrolling-banner-v3__inner'
65
65
  );
66
- const speed = bannerElement.dataset.speed ?? 5;
66
+ const speed = bannerElement.dataset.speed ?? 3;
67
67
 
68
68
  const wrapperWidth = wrapper.clientWidth;
69
69
  const innerContentWidth = inner.clientWidth;
@@ -82,28 +82,34 @@ function scrollingbannerJs(block) {
82
82
  newTickerContainer.classList.add('clone');
83
83
  wrapper.appendChild(newTickerContainer);
84
84
 
85
- const animation = [
86
- {transform: `translateX(0%)`},
87
- {transform: `translateX(-200%)`}
85
+ const animation1 = [
86
+ { transform: 'translateX(0%)' },
87
+ { transform: 'translateX(-100%)' }
88
+ ];
89
+ const animation2 = [
90
+ { transform: 'translateX(100%)' },
91
+ { transform: 'translateX(0%)' }
88
92
  ];
89
93
 
90
94
  const time = 100000 / speed;
91
95
 
92
96
  let timing = {
93
97
  duration: time,
94
- iterations: Infinity
95
- };
96
- let timing2 = {
97
- duration: time,
98
- delay: time / 2,
99
- iterations: Infinity
98
+ iterations: Infinity,
99
+ fill: 'both'
100
100
  };
101
+ let timing2 = timing;
101
102
  const containers = bannerElement.querySelectorAll(
102
103
  '.scrolling-banner-v3__container'
103
104
  );
104
-
105
- const anim1 = containers[0].animate(animation, timing);
106
- const anim2 = containers[1].animate(animation, timing2);
105
+ // Ensure initial positions are applied so content is visible immediately
106
+ containers[0].style.transform = 'translateX(0%)';
107
+ containers[1].style.transform = 'translateX(100%)';
108
+ // Force style application before animations start
109
+ void containers[0].offsetWidth;
110
+
111
+ const anim1 = containers[0].animate(animation1, timing);
112
+ const anim2 = containers[1].animate(animation2, timing2);
107
113
 
108
114
  // set as initialized and store animation for a possible cleanup
109
115
  initializedBanners.set(bannerElement, {anim1, anim2});
@@ -77,6 +77,98 @@
77
77
  "acfe_clone_modal_close": 0,
78
78
  "acfe_clone_modal_button": "",
79
79
  "acfe_clone_modal_size": "large"
80
+ },
81
+ {
82
+ "key": "field_6900fa979ef39",
83
+ "label": "Block Padding",
84
+ "name": "",
85
+ "aria-label": "",
86
+ "type": "tab",
87
+ "instructions": "",
88
+ "required": 0,
89
+ "conditional_logic": 0,
90
+ "wrapper": {
91
+ "width": "",
92
+ "class": "",
93
+ "id": ""
94
+ },
95
+ "placement": "top",
96
+ "endpoint": 0,
97
+ "no_preference": 0,
98
+ "selected": 0
99
+ },
100
+ {
101
+ "key": "field_6900faa09ef3a",
102
+ "label": "block padding fields",
103
+ "name": "block_padding_fields",
104
+ "aria-label": "",
105
+ "type": "clone",
106
+ "instructions": "",
107
+ "required": 0,
108
+ "conditional_logic": 0,
109
+ "wrapper": {
110
+ "width": "",
111
+ "class": "",
112
+ "id": ""
113
+ },
114
+ "clone": [
115
+ "group_689f66f3e26df"
116
+ ],
117
+ "display": "seamless",
118
+ "layout": "block",
119
+ "prefix_label": 0,
120
+ "prefix_name": 0,
121
+ "acfe_seamless_style": 0,
122
+ "acfe_clone_modal": 0,
123
+ "acfe_clone_modal_close": 0,
124
+ "acfe_clone_modal_button": "",
125
+ "acfe_clone_modal_size": "large"
126
+ },
127
+ {
128
+ "key": "field_6900fab09ef3b",
129
+ "label": "Block Settings",
130
+ "name": "",
131
+ "aria-label": "",
132
+ "type": "tab",
133
+ "instructions": "",
134
+ "required": 0,
135
+ "conditional_logic": 0,
136
+ "wrapper": {
137
+ "width": "",
138
+ "class": "",
139
+ "id": ""
140
+ },
141
+ "placement": "top",
142
+ "endpoint": 0,
143
+ "no_preference": 0,
144
+ "selected": 0
145
+ },
146
+ {
147
+ "key": "field_6900fac09ef3c",
148
+ "label": "Block Settings fields",
149
+ "name": "block_settings_fields",
150
+ "aria-label": "",
151
+ "type": "clone",
152
+ "instructions": "",
153
+ "required": 0,
154
+ "conditional_logic": 0,
155
+ "wrapper": {
156
+ "width": "",
157
+ "class": "",
158
+ "id": ""
159
+ },
160
+ "clone": [
161
+ "group_689f649af2ac4"
162
+ ],
163
+ "display": "seamless",
164
+ "layout": "block",
165
+ "prefix_label": 0,
166
+ "prefix_name": 0,
167
+ "acfe_seamless_style": 0,
168
+ "acfe_clone_modal": 0,
169
+ "acfe_clone_modal_close": 0,
170
+ "acfe_clone_modal_button": "",
171
+ "acfe_clone_modal_size": "large"
80
172
  }
81
173
  ],
82
174
  "location": [
@@ -97,13 +189,13 @@
97
189
  "active": true,
98
190
  "description": "",
99
191
  "show_in_rest": 0,
192
+ "display_title": "",
100
193
  "acfe_autosync": [
101
194
  "json"
102
195
  ],
103
- "acfml_field_group_mode": "localization",
104
196
  "acfe_form": 0,
105
197
  "acfe_display_title": "",
106
198
  "acfe_meta": "",
107
199
  "acfe_note": "",
108
- "modified": 1754505513
200
+ "modified": 1761671983
109
201
  }
@@ -13,7 +13,8 @@
13
13
  {{sectionStyles}}
14
14
  }
15
15
  </style>
16
- <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.section_class}} {{classNameEntryPoint}} {{block.id}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
16
+ <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{classNameEntryPoint}} {{block.id}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
17
+
17
18
  {% if fields.wysiwyg_editor is not empty %}
18
19
  {{ include('components/wysiwyg-editor-v3.twig', { fields, block, blockClassName}, with_context = false, ignore_missing = true) }}
19
20
  {% endif %}
@@ -0,0 +1,123 @@
1
+ {
2
+ "key": "group_67d04c4c4cf78",
3
+ "title": "Block: Spotify Embed v3",
4
+ "fields": [
5
+ {
6
+ "key": "field_67d04c4d9f1b1",
7
+ "label": "Embed URL",
8
+ "name": "embed_url",
9
+ "aria-label": "",
10
+ "type": "text",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "wpml_cf_preferences": 2,
20
+ "default_value": "",
21
+ "maxlength": "",
22
+ "placeholder": "",
23
+ "prepend": "",
24
+ "append": ""
25
+ },
26
+ {
27
+ "key": "field_67d16c7c377a5",
28
+ "label": "Desktop Height",
29
+ "name": "desktop_height",
30
+ "aria-label": "",
31
+ "type": "number",
32
+ "instructions": "",
33
+ "required": 0,
34
+ "conditional_logic": 0,
35
+ "wrapper": {
36
+ "width": "",
37
+ "class": "",
38
+ "id": ""
39
+ },
40
+ "wpml_cf_preferences": 3,
41
+ "default_value": 352,
42
+ "min": 0,
43
+ "max": 500,
44
+ "placeholder": "",
45
+ "step": "",
46
+ "prepend": "",
47
+ "append": ""
48
+ },
49
+ {
50
+ "key": "field_67d16ccf377a6",
51
+ "label": "Tablet Height",
52
+ "name": "tablet_height",
53
+ "aria-label": "",
54
+ "type": "number",
55
+ "instructions": "",
56
+ "required": 0,
57
+ "conditional_logic": 0,
58
+ "wrapper": {
59
+ "width": "",
60
+ "class": "",
61
+ "id": ""
62
+ },
63
+ "wpml_cf_preferences": 3,
64
+ "default_value": 352,
65
+ "min": 0,
66
+ "max": 500,
67
+ "placeholder": "",
68
+ "step": "",
69
+ "prepend": "",
70
+ "append": ""
71
+ },
72
+ {
73
+ "key": "field_67d16cdd377a8",
74
+ "label": "Mobile Height",
75
+ "name": "mobile_height",
76
+ "aria-label": "",
77
+ "type": "number",
78
+ "instructions": "",
79
+ "required": 0,
80
+ "conditional_logic": 0,
81
+ "wrapper": {
82
+ "width": "",
83
+ "class": "",
84
+ "id": ""
85
+ },
86
+ "wpml_cf_preferences": 3,
87
+ "default_value": 350,
88
+ "min": 0,
89
+ "max": 500,
90
+ "placeholder": "",
91
+ "step": "",
92
+ "prepend": "",
93
+ "append": ""
94
+ }
95
+ ],
96
+ "location": [
97
+ [
98
+ {
99
+ "param": "block",
100
+ "operator": "==",
101
+ "value": "acf\/spotify-embed-v3"
102
+ }
103
+ ]
104
+ ],
105
+ "menu_order": 0,
106
+ "position": "normal",
107
+ "style": "default",
108
+ "label_placement": "left",
109
+ "instruction_placement": "label",
110
+ "hide_on_screen": "",
111
+ "active": true,
112
+ "description": "",
113
+ "show_in_rest": 0,
114
+ "display_title": "",
115
+ "acfe_autosync": [
116
+ "json"
117
+ ],
118
+ "acfe_form": 0,
119
+ "acfe_display_title": "",
120
+ "acfe_meta": "",
121
+ "acfe_note": "",
122
+ "modified": 1761475548
123
+ }
@@ -3,12 +3,12 @@
3
3
  acf_register_block_type(
4
4
  array(
5
5
  'name' => 'spotify-embed-v3',
6
- 'title' => __( 'Spotify embed v3', 'Global-theme Admin' ),
7
- 'render_callback' => 'athena_block_render_post_object_v3',
6
+ 'title' => __('Spotify embed v3', 'Global-theme Admin'),
7
+ 'render_callback' => 'core_block_render_post_object_v3',
8
8
  'category' => 'common',
9
9
  'icon' => get_svg_icon_content('brick.svg'),
10
- 'keywords' => array('content', 'text' ),
10
+ 'keywords' => array('content', 'text'),
11
11
  'mode' => 'preview',
12
- 'supports' => array( 'align' => false, 'anchor' => true ),
12
+ 'supports' => array('align' => false, 'anchor' => true),
13
13
  )
14
- );
14
+ );
@@ -3,6 +3,7 @@
3
3
  {% set htmlEntryPoint = include('entry-points/entry-point-html-v3.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
4
4
  {% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
5
5
  {% set styleEntryPoint = include('entry-points/entry-point-style-v3.twig', { fields: fields, block: block, is_preview }, with_context = false) %}
6
+ {% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
6
7
 
7
8
 
8
9
  {% set sectionStyles = styleEntryPoint %}
@@ -15,6 +16,8 @@
15
16
  </style>
16
17
  <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{fields.section_class}} {{classNameEntryPoint}} {{block.id}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-assetkey="{{blockClassName}}">
17
18
 
18
- <iframe style="border-radius:12px;" height="{{fields.height}}" src="{{fields.embed_url}}" class="spotify-embed" width="100%" frameborder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
19
+ <iframe style="border-radius:12px; height: 100%;" src="{{fields.embed_url}}" class="spotify-embed" width="100%" frameborder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
20
+
21
+
19
22
  {{htmlEntryPoint}}
20
23
  </section>
@@ -1322,26 +1322,6 @@
1322
1322
  "acfe_clone_modal_button": "",
1323
1323
  "acfe_clone_modal_size": "large"
1324
1324
  },
1325
- {
1326
- "key": "field_689f3d14b32b6",
1327
- "label": "Divider settings",
1328
- "name": "",
1329
- "aria-label": "",
1330
- "type": "tab",
1331
- "instructions": "",
1332
- "required": 0,
1333
- "conditional_logic": 0,
1334
- "wrapper": {
1335
- "width": "",
1336
- "class": "",
1337
- "id": ""
1338
- },
1339
- "wpml_cf_preferences": 3,
1340
- "placement": "top",
1341
- "endpoint": 0,
1342
- "no_preference": 0,
1343
- "selected": 0
1344
- },
1345
1325
  {
1346
1326
  "key": "field_686ceba801fac",
1347
1327
  "label": "Divider fields",
@@ -1356,7 +1336,6 @@
1356
1336
  "class": "",
1357
1337
  "id": ""
1358
1338
  },
1359
- "wpml_cf_preferences": 3,
1360
1339
  "clone": [
1361
1340
  "group_686b919696bfe"
1362
1341
  ],
@@ -2302,13 +2281,13 @@
2302
2281
  "active": true,
2303
2282
  "description": "Library version - Do not modify in this project as any changes will be overwritten by future updates.",
2304
2283
  "show_in_rest": 0,
2284
+ "display_title": "",
2305
2285
  "acfe_autosync": [
2306
2286
  "json"
2307
2287
  ],
2308
- "acfml_field_group_mode": "localization",
2309
2288
  "acfe_form": 0,
2310
2289
  "acfe_display_title": "",
2311
2290
  "acfe_meta": "",
2312
2291
  "acfe_note": "",
2313
- "modified": 1759146297
2292
+ "modified": 1761760296
2314
2293
  }