@o2vend/theme-cli 1.0.37 → 1.0.38

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.
Files changed (89) hide show
  1. package/lib/lib/dev-server.js +309 -40
  2. package/lib/lib/liquid-engine.js +3 -1
  3. package/lib/lib/mock-data.js +36 -124
  4. package/lib/lib/widget-service.js +12 -4
  5. package/package.json +1 -1
  6. package/test-theme/assets/async-sections.js +32 -24
  7. package/test-theme/assets/cart-drawer.js +20 -22
  8. package/test-theme/assets/cart-manager.js +1 -15
  9. package/test-theme/assets/checkout-price-handler.js +12 -11
  10. package/test-theme/assets/checkout.css +1415 -0
  11. package/test-theme/assets/checkout.js +3174 -0
  12. package/test-theme/assets/components.css +178 -29
  13. package/test-theme/assets/delivery-zone.js +1 -1
  14. package/test-theme/assets/product-detail.css +1050 -0
  15. package/test-theme/assets/product-detail.js +2940 -0
  16. package/test-theme/assets/theme.css +95 -120
  17. package/test-theme/assets/theme.js +781 -186
  18. package/test-theme/layout/theme.liquid +91 -17
  19. package/test-theme/sections/content.liquid +64 -57
  20. package/test-theme/sections/footer-fallback.liquid +57 -7
  21. package/test-theme/sections/footer.liquid +63 -12
  22. package/test-theme/sections/header-fallback.liquid +41 -41
  23. package/test-theme/sections/header.liquid +41 -51
  24. package/test-theme/sections/hero-fallback.liquid +1 -1
  25. package/test-theme/sections/hero.liquid +159 -136
  26. package/test-theme/snippets/account-sidebar.liquid +121 -29
  27. package/test-theme/snippets/add-to-cart-modal.liquid +258 -206
  28. package/test-theme/snippets/breadcrumbs.liquid +98 -11
  29. package/test-theme/snippets/cart-drawer.liquid +93 -0
  30. package/test-theme/snippets/delivery-zone-city-selector.liquid +101 -15
  31. package/test-theme/snippets/delivery-zone-modal.liquid +529 -84
  32. package/test-theme/snippets/delivery-zone-search.liquid +104 -18
  33. package/test-theme/snippets/login-modal.liquid +269 -82
  34. package/test-theme/snippets/mega-menu.liquid +130 -43
  35. package/test-theme/snippets/news-thumbnail.liquid +120 -28
  36. package/test-theme/snippets/pagination.liquid +1 -1
  37. package/test-theme/snippets/price.liquid +100 -9
  38. package/test-theme/snippets/product-card-related.liquid +22 -4
  39. package/test-theme/snippets/product-card-simple.liquid +521 -25
  40. package/test-theme/snippets/product-card.liquid +145 -232
  41. package/test-theme/snippets/rating.liquid +100 -9
  42. package/test-theme/snippets/skeleton-collection-grid.liquid +94 -8
  43. package/test-theme/snippets/skeleton-product-card.liquid +102 -16
  44. package/test-theme/snippets/skeleton-product-grid.liquid +87 -1
  45. package/test-theme/snippets/social-sharing.liquid +133 -32
  46. package/test-theme/templates/account/dashboard.liquid +30 -0
  47. package/test-theme/templates/account/loyalty-redemption.liquid +29 -28
  48. package/test-theme/templates/account/loyalty.liquid +45 -43
  49. package/test-theme/templates/account/order-detail.liquid +15 -8
  50. package/test-theme/templates/account/orders.liquid +189 -35
  51. package/test-theme/templates/account/profile.liquid +509 -114
  52. package/test-theme/templates/account/register.liquid +18 -8
  53. package/test-theme/templates/account/return-orders.liquid +31 -30
  54. package/test-theme/templates/account/store-credit.liquid +27 -26
  55. package/test-theme/templates/account/subscriptions.liquid +22 -5
  56. package/test-theme/templates/account/wishlist.liquid +88 -19
  57. package/test-theme/templates/address-book.liquid +166 -69
  58. package/test-theme/templates/categories.liquid +90 -30
  59. package/test-theme/templates/checkout.liquid +137 -3834
  60. package/test-theme/templates/error.liquid +23 -21
  61. package/test-theme/templates/index.liquid +29 -0
  62. package/test-theme/templates/login.liquid +33 -6
  63. package/test-theme/templates/order-confirmation.liquid +67 -9
  64. package/test-theme/templates/page.liquid +418 -206
  65. package/test-theme/templates/product-detail.liquid +124 -3878
  66. package/test-theme/templates/products.liquid +155 -30
  67. package/test-theme/templates/search.liquid +739 -225
  68. package/test-theme/widgets/brand-carousel.liquid +102 -82
  69. package/test-theme/widgets/brand.liquid +78 -50
  70. package/test-theme/widgets/carousel.liquid +253 -121
  71. package/test-theme/widgets/category-list-carousel.liquid +32 -8
  72. package/test-theme/widgets/category-list.liquid +21 -6
  73. package/test-theme/widgets/category.liquid +104 -37
  74. package/test-theme/widgets/discount-time.liquid +326 -119
  75. package/test-theme/widgets/footer-menu.liquid +115 -23
  76. package/test-theme/widgets/footer.liquid +118 -5
  77. package/test-theme/widgets/gallery.liquid +29 -5
  78. package/test-theme/widgets/header-menu.liquid +25 -13
  79. package/test-theme/widgets/header.liquid +64 -26
  80. package/test-theme/widgets/html.liquid +29 -6
  81. package/test-theme/widgets/news.liquid +6 -0
  82. package/test-theme/widgets/product-canvas.liquid +20 -12
  83. package/test-theme/widgets/product-carousel.liquid +118 -56
  84. package/test-theme/widgets/shared/product-grid.liquid +12 -0
  85. package/test-theme/widgets/single-product.liquid +688 -250
  86. package/test-theme/widgets/spacebar-carousel.liquid +39 -10
  87. package/test-theme/widgets/spacebar.liquid +77 -6
  88. package/test-theme/widgets/splash.liquid +40 -30
  89. package/test-theme/widgets/testimonial-carousel.liquid +111 -67
@@ -36,14 +36,26 @@
36
36
  assign show_widget_title = false
37
37
  endif
38
38
  endif
39
- assign widget_title_alignment_raw = widget_settings.widgetTitleAlignment | default: 'center'
39
+ assign widget_title_alignment_raw = widget_settings.widgetTitleAlignment | default: 'left'
40
40
  assign widget_title_alignment = widget_title_alignment_raw | downcase
41
41
  if widget_title_alignment != 'left' and widget_title_alignment != 'right' and widget_title_alignment != 'center'
42
- assign widget_title_alignment = 'center'
42
+ assign widget_title_alignment = 'left'
43
43
  endif
44
44
  assign hide_dots = widget_settings.hideDot | default: false
45
45
  assign hide_arrows = widget_settings.hideArrow | default: false
46
+ assign priority_count_raw = widget_settings.priorityCount | default: widget_settings.prioritizeCount | default: widget_settings.priority
47
+ assign priority_count = priority_count_raw | default: 1
48
+ if priority_count > 12
49
+ assign priority_count = 12
50
+ endif
51
+ if priority_count < 0
52
+ assign priority_count = 0
53
+ endif
46
54
  %}
55
+ {% assign is_hero_priority_widget = false %}
56
+ {% if is_hero_first == true or is_hero_first == 'true' or is_hero_first == 1 or is_hero_first == '1' %}
57
+ {% assign is_hero_priority_widget = true %}
58
+ {% endif %}
47
59
 
48
60
  <section class="widget widget-spacebar-carousel" data-widget-id="{{ widget.id }}" data-spacebar-carousel{% if background_color and background_color != blank and background_color != 'null' %} style="background-color: {{ background_color }};"{% endif %}>
49
61
  <div class="spacebar-carousel-container">
@@ -95,8 +107,8 @@
95
107
  {% assign item_image = item.ImageUrl | default: item.imageUrl | default: item.Image | default: item.image %}
96
108
  {% assign item_bg = item.BackgroundColor | default: item.backgroundColor %}
97
109
  {% assign item_text = item.TextColor | default: item.textColor %}
98
-
99
- <div class="spacebar-carousel-slide" data-slide-index="{{ forloop.index0 }}">
110
+ {% assign item_link = item.Link | default: item.link | default: item.TargetUrl | default: item.targetUrl %}
111
+ <div class="spacebar-carousel-slide{% if forloop.index0 < priority_count %} spacebar-carousel-slide--priority{% endif %}" data-slide-index="{{ forloop.index0 }}" {% if forloop.index0 < priority_count %}data-priority="high"{% endif %}>
100
112
  <div class="spacebar-carousel-item"{% if item_bg and item_bg != blank %} style="background-color: {{ item_bg }};"{% endif %}>
101
113
  {% if item_image and item_image != blank %}
102
114
  {% if item_image contains 'http://' or item_image contains 'https://' %}
@@ -104,8 +116,11 @@
104
116
  {% else %}
105
117
  {% assign item_image_src = item_image | asset_url %}
106
118
  {% endif %}
119
+ {% if forloop.index0 < priority_count and is_hero_priority_widget %}
120
+ <link rel="preload" as="image" href="{{ item_image_src }}" fetchpriority="high">
121
+ {% endif %}
107
122
  <div class="spacebar-carousel-item__icon spacebar-carousel-item__icon--image">
108
- <img src="{{ item_image_src }}" alt="{{ item_title }}" width="72" height="72" loading="lazy">
123
+ <img src="{{ item_image_src }}" alt="{{ item_title }}" width="72" height="72" loading="{% if forloop.index0 < priority_count %}eager{% else %}lazy{% endif %}" {% if forloop.index0 < priority_count and is_hero_priority_widget %}fetchpriority="high"{% endif %}>
109
124
  </div>
110
125
  {% elsif item_icon and item_icon != blank %}
111
126
  <div class="spacebar-carousel-item__icon spacebar-carousel-item__icon--html">
@@ -147,6 +162,23 @@
147
162
  </div>
148
163
 
149
164
  <style>
165
+ :root {
166
+ --spacebar-carousel-white: var(--color-white);
167
+ --spacebar-carousel-text: var(--color-text);
168
+ --spacebar-carousel-text-muted: var(--color-text-muted);
169
+ --spacebar-carousel-border: var(--color-border);
170
+ --spacebar-carousel-spacing-component: var(--spacing-component);
171
+ --spacebar-carousel-spacing-element: var(--spacing-element);
172
+ --spacebar-carousel-spacing-small: var(--spacing-small);
173
+ --spacebar-carousel-spacing-xsmall: var(--spacing-xsmall);
174
+ --spacebar-carousel-container-padding: var(--container-padding);
175
+ --spacebar-carousel-radius-full: var(--radius-full);
176
+ --spacebar-carousel-radius: var(--radius);
177
+ --spacebar-carousel-transition-fast: var(--transition-fast);
178
+ --spacebar-carousel-transition: var(--transition);
179
+ --spacebar-carousel-text-sm: var(--text-sm);
180
+ }
181
+
150
182
  /* Spacebar Carousel - True Carousel Behavior */
151
183
  .widget-spacebar-carousel {
152
184
  padding: 32px 0;
@@ -240,7 +272,6 @@
240
272
  border-radius: 50%;
241
273
  border: none;
242
274
  background: #fff;
243
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
244
275
  align-items: center;
245
276
  justify-content: center;
246
277
  cursor: pointer;
@@ -302,14 +333,12 @@
302
333
  padding: 16px 20px;
303
334
  border-radius: var(--border-radius-medium);
304
335
  background: #fff;
305
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
306
- transition: transform 0.3s ease, box-shadow 0.3s ease;
336
+ transition: transform 0.3s ease;
307
337
  height: 100%;
308
338
  }
309
339
 
310
340
  .widget-spacebar-carousel .spacebar-carousel-item:hover {
311
341
  transform: translateY(-2px);
312
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
313
342
  }
314
343
 
315
344
  .widget-spacebar-carousel .spacebar-carousel-item__icon {
@@ -527,7 +556,7 @@
527
556
  </style>
528
557
 
529
558
  <script>
530
- (function() {
559
+ (() => {
531
560
  if (document.readyState === 'loading') {
532
561
  document.addEventListener('DOMContentLoaded', initSpacebarCarousel);
533
562
  } else {
@@ -20,12 +20,46 @@
20
20
  else
21
21
  assign items = content_data
22
22
  endif
23
- assign background_color = content_data.backgroundColor | default: content_data.BackgroundColor | default: widget_settings.backgroundColor | default: '#ffffff'
24
- assign text_color = content_data.textColor | default: content_data.TextColor | default: widget_settings.textColor | default: '#000000'
23
+ assign heading = widget_settings.title | default: widget.Title | default: widget.title
24
+ assign subtitle = widget_settings.subtitle
25
+ assign background_color = widget_settings.backgroundColor | default: '#f8f9fa'
26
+ assign text_color = widget_settings.textColor | default: '#111'
27
+ assign show_widget_title_raw = widget_settings.showWidgetTitle | default: 'Yes'
28
+ if show_widget_title_raw == null or show_widget_title_raw == blank or show_widget_title_raw == 'null'
29
+ assign show_widget_title = true
30
+ else
31
+ if show_widget_title_raw == 'Yes'
32
+ assign show_widget_title = true
33
+ elsif show_widget_title_raw == true
34
+ assign show_widget_title = true
35
+ else
36
+ assign show_widget_title = false
37
+ endif
38
+ endif
39
+ assign widget_title_alignment_raw = widget_settings.widgetTitleAlignment | default: 'left'
40
+ assign widget_title_alignment = widget_title_alignment_raw | downcase
41
+ if widget_title_alignment != 'left' and widget_title_alignment != 'right' and widget_title_alignment != 'center'
42
+ assign widget_title_alignment = 'left'
43
+ endif
25
44
  %}
26
45
 
27
- <section class="widget widget-spacebar" data-widget-id="{{ widget.id }}" style="background-color: {{ background_color }};">
46
+ <section class="widget widget-spacebar" data-widget-id="{{ widget.id }}"{% if background_color and background_color != blank and background_color != 'null' %} style="background-color: {{ background_color }};"{% endif %}>
28
47
  <div class="spacebar-inner">
48
+ {% if show_widget_title %}
49
+ {% if heading or subtitle %}
50
+ <header class="spacebar-header">
51
+ <div class="spacebar-header__text" style="text-align: {{ widget_title_alignment }};">
52
+ {% if heading %}
53
+ <h2 class="spacebar-title"{% if text_color and text_color != 'null' %} style="color: {{ text_color }};"{% endif %}>{{ heading }}</h2>
54
+ {% endif %}
55
+ {% if subtitle %}
56
+ <p class="spacebar-subtitle"{% if text_color and text_color != 'null' %} style="color: {{ text_color }};"{% endif %}>{{ subtitle }}</p>
57
+ {% endif %}
58
+ </div>
59
+ </header>
60
+ {% endif %}
61
+ {% endif %}
62
+
29
63
  {% if items and items.size > 0 %}
30
64
  <div class="spacebar-grid">
31
65
  {% for item in items %}
@@ -74,6 +108,19 @@
74
108
  </div>
75
109
 
76
110
  <style>
111
+ :root {
112
+ --spacebar-white: var(--color-white);
113
+ --spacebar-text: var(--color-text);
114
+ --spacebar-spacing-component: var(--spacing-component);
115
+ --spacebar-spacing-element: var(--spacing-element);
116
+ --spacebar-spacing-small: var(--spacing-small);
117
+ --spacebar-container-padding: var(--container-padding);
118
+ --spacebar-radius-xl: var(--radius-xl);
119
+ --spacebar-radius-lg: var(--radius-lg);
120
+ --spacebar-transition: var(--transition);
121
+ --spacebar-text-sm: var(--text-sm);
122
+ }
123
+
77
124
  .widget-spacebar {
78
125
  padding: 32px 0;
79
126
  width: 100%;
@@ -84,6 +131,27 @@
84
131
  margin: 0 auto;
85
132
  padding: 0 24px;
86
133
  }
134
+
135
+ .widget-spacebar .spacebar-header {
136
+ margin-bottom: 24px;
137
+ position: static;
138
+ z-index: auto;
139
+ }
140
+
141
+ .widget-spacebar .spacebar-title {
142
+ font-size: 1.4rem;
143
+ font-weight: 500;
144
+ line-height: 1.3;
145
+ color: #111;
146
+ margin: 0 0 4px 0;
147
+ letter-spacing: -0.01em;
148
+ }
149
+
150
+ .widget-spacebar .spacebar-subtitle {
151
+ font-size: 14px;
152
+ color: #6b7280;
153
+ margin: 0;
154
+ }
87
155
 
88
156
  .widget-spacebar .spacebar-grid {
89
157
  display: grid;
@@ -97,14 +165,13 @@
97
165
  align-items: flex-start;
98
166
  gap: 16px;
99
167
  padding: 20px;
100
- border-radius: 12px;
168
+ border-radius: var(--border-radius-medium);
101
169
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
102
170
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
103
171
  cursor: pointer;
104
172
  }
105
173
 
106
174
  .widget-spacebar .spacebar-item:hover {
107
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
108
175
  transform: translateY(-4px);
109
176
  }
110
177
 
@@ -204,6 +271,10 @@
204
271
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
205
272
  gap: 16px;
206
273
  }
274
+
275
+ .widget-spacebar .spacebar-title {
276
+ font-size: 1.3rem;
277
+ }
207
278
 
208
279
  .widget-spacebar .spacebar-item {
209
280
  gap: 14px;
@@ -276,4 +347,4 @@
276
347
  }
277
348
  }
278
349
  </style>
279
- </section>
350
+ </section>
@@ -106,6 +106,19 @@
106
106
  </div>
107
107
 
108
108
  <style>
109
+ :root {
110
+ --splash-white: var(--color-white);
111
+ --splash-text: var(--color-text);
112
+ --splash-spacing-component: var(--spacing-component);
113
+ --splash-spacing-element: var(--spacing-element);
114
+ --splash-spacing-small: var(--spacing-small);
115
+ --splash-spacing-xsmall: var(--spacing-xsmall);
116
+ --splash-radius-lg: var(--radius-lg);
117
+ --splash-radius-full: var(--radius-full);
118
+ --splash-transition: var(--transition);
119
+ --splash-transition-fast: var(--transition-fast);
120
+ }
121
+
109
122
  /* Splash Overlay */
110
123
  .widget-splash-overlay {
111
124
  display: none;
@@ -120,7 +133,7 @@
120
133
  justify-content: center;
121
134
  padding: 20px;
122
135
  opacity: 0;
123
- transition: opacity 0.3s ease;
136
+ transition: opacity var(--splash-transition);
124
137
  }
125
138
 
126
139
  .widget-splash-overlay.active {
@@ -139,9 +152,8 @@
139
152
  max-height: 90vh;
140
153
  overflow: hidden;
141
154
  border-radius: var(--border-radius-medium);
142
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
143
155
  transform: scale(0.9) translateY(20px);
144
- transition: transform 0.3s ease;
156
+ transition: transform var(--splash-transition);
145
157
  }
146
158
 
147
159
  .widget-splash-overlay.visible .widget-splash-modal {
@@ -157,19 +169,18 @@
157
169
  height: 36px;
158
170
  border: none;
159
171
  background: rgba(255, 255, 255, 0.9);
160
- border-radius: 50%;
172
+ border-radius: var(--splash-radius-full);
161
173
  cursor: pointer;
162
174
  display: flex;
163
175
  align-items: center;
164
176
  justify-content: center;
165
- color: #333;
177
+ color: var(--splash-text);
166
178
  z-index: 10;
167
- transition: all 0.2s ease;
168
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
179
+ transition: all var(--splash-transition-fast);
169
180
  }
170
181
 
171
182
  .splash-close:hover {
172
- background: #fff;
183
+ background: var(--splash-white);
173
184
  transform: scale(1.1);
174
185
  }
175
186
 
@@ -198,21 +209,21 @@
198
209
 
199
210
  /* Body */
200
211
  .splash-body {
201
- padding: 24px;
212
+ padding: var(--splash-spacing-component);
202
213
  text-align: center;
203
214
  }
204
215
 
205
216
  .splash-title {
206
217
  font-size: 24px;
207
218
  font-weight: 700;
208
- margin: 0 0 12px 0;
219
+ margin: 0 0 var(--splash-spacing-small) 0;
209
220
  line-height: 1.3;
210
221
  }
211
222
 
212
223
  .splash-description {
213
224
  font-size: 15px;
214
225
  line-height: 1.6;
215
- margin: 0 0 20px 0;
226
+ margin: 0 0 var(--splash-spacing-component) 0;
216
227
  opacity: 0.85;
217
228
  }
218
229
 
@@ -220,21 +231,20 @@
220
231
  .splash-cta {
221
232
  display: inline-block;
222
233
  padding: 14px 32px;
223
- background: #111;
224
- color: #fff !important;
234
+ background: var(--splash-text);
235
+ color: var(--splash-white) !important;
225
236
  text-decoration: none;
226
237
  font-size: 14px;
227
238
  font-weight: 600;
228
- border-radius: 8px;
229
- transition: all 0.2s ease;
239
+ border-radius: var(--splash-radius-lg);
240
+ transition: all var(--splash-transition-fast);
230
241
  text-transform: uppercase;
231
242
  letter-spacing: 0.5px;
232
243
  }
233
244
 
234
245
  .splash-cta:hover {
235
- background: #333;
246
+ background: var(--splash-text);
236
247
  transform: translateY(-2px);
237
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
238
248
  }
239
249
 
240
250
  /* Image Only Mode (no title/description) */
@@ -254,7 +264,7 @@
254
264
 
255
265
  .widget-splash-modal {
256
266
  max-width: 100%;
257
- border-radius: 12px;
267
+ border-radius: var(--splash-spacing-small);
258
268
  }
259
269
 
260
270
  .splash-close {
@@ -291,11 +301,11 @@
291
301
  </style>
292
302
 
293
303
  <script>
294
- (function() {
304
+ (() => {
295
305
  console.log('[Splash] Script loaded for widget {{ splash_id }}');
296
306
 
297
307
  // Wait for DOM to be ready
298
- function initSplash() {
308
+ const initSplash = () => {
299
309
  console.log('[Splash] initSplash called');
300
310
 
301
311
  // Try multiple selectors
@@ -320,31 +330,31 @@
320
330
 
321
331
  // Show splash after delay
322
332
  console.log('[Splash] Setting timeout for', delaySeconds, 'second(s)...');
323
- setTimeout(function() {
333
+ setTimeout(() => {
324
334
  console.log('[Splash] TIMEOUT FIRED - Showing popup NOW!');
325
335
  splashWidget.style.display = 'flex';
326
336
  splashWidget.classList.add('active');
327
337
  // Trigger animation after a frame
328
- setTimeout(function() {
338
+ setTimeout(() => {
329
339
  splashWidget.classList.add('visible');
330
340
  console.log('[Splash] Added visible class');
331
341
  }, 50);
332
342
  }, delaySeconds * 1000);
333
343
 
334
- // Close function
335
- function closeSplash() {
344
+ // Close handler
345
+ const closeSplash = () => {
336
346
  console.log('[Splash] Closing popup');
337
347
  splashWidget.classList.remove('visible');
338
- setTimeout(function() {
348
+ setTimeout(() => {
339
349
  splashWidget.classList.remove('active');
340
350
  splashWidget.style.display = 'none';
341
351
  }, 300);
342
- }
352
+ };
343
353
 
344
354
  // Close button click
345
355
  const closeBtn = splashWidget.querySelector('[data-splash-close]');
346
356
  if (closeBtn) {
347
- closeBtn.addEventListener('click', function(e) {
357
+ closeBtn.addEventListener('click', (e) => {
348
358
  e.preventDefault();
349
359
  e.stopPropagation();
350
360
  closeSplash();
@@ -352,19 +362,19 @@
352
362
  }
353
363
 
354
364
  // Close on overlay click
355
- splashWidget.addEventListener('click', function(e) {
365
+ splashWidget.addEventListener('click', (e) => {
356
366
  if (e.target === splashWidget) {
357
367
  closeSplash();
358
368
  }
359
369
  });
360
370
 
361
371
  // Close on Escape key
362
- document.addEventListener('keydown', function(e) {
372
+ document.addEventListener('keydown', (e) => {
363
373
  if (e.key === 'Escape' && splashWidget.classList.contains('active')) {
364
374
  closeSplash();
365
375
  }
366
376
  });
367
- }
377
+ };
368
378
 
369
379
  // Initialize when DOM is ready
370
380
  if (document.readyState === 'loading') {