@o2vend/theme-cli 1.0.32
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/README.md +425 -0
- package/assets/Logo_o2vend.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-white.png +0 -0
- package/bin/o2vend +42 -0
- package/config/widget-map.json +50 -0
- package/lib/commands/check.js +201 -0
- package/lib/commands/generate.js +33 -0
- package/lib/commands/init.js +214 -0
- package/lib/commands/optimize.js +216 -0
- package/lib/commands/package.js +208 -0
- package/lib/commands/serve.js +105 -0
- package/lib/commands/validate.js +191 -0
- package/lib/lib/api-client.js +357 -0
- package/lib/lib/dev-server.js +2618 -0
- package/lib/lib/file-watcher.js +80 -0
- package/lib/lib/hot-reload.js +106 -0
- package/lib/lib/liquid-engine.js +822 -0
- package/lib/lib/liquid-filters.js +671 -0
- package/lib/lib/mock-api-server.js +989 -0
- package/lib/lib/mock-data.js +1468 -0
- package/lib/lib/widget-service.js +321 -0
- package/package.json +70 -0
- package/test-theme/README.md +27 -0
- package/test-theme/assets/async-sections.js +446 -0
- package/test-theme/assets/cart-drawer.js +463 -0
- package/test-theme/assets/cart-manager.js +223 -0
- package/test-theme/assets/checkout-price-handler.js +368 -0
- package/test-theme/assets/components.css +4629 -0
- package/test-theme/assets/delivery-zone.css +299 -0
- package/test-theme/assets/delivery-zone.js +396 -0
- package/test-theme/assets/logo.png +0 -0
- package/test-theme/assets/sections.css +48 -0
- package/test-theme/assets/theme.css +3500 -0
- package/test-theme/assets/theme.js +3745 -0
- package/test-theme/config/settings_data.json +292 -0
- package/test-theme/config/settings_schema.json +1050 -0
- package/test-theme/layout/theme.liquid +195 -0
- package/test-theme/locales/en.default.json +260 -0
- package/test-theme/sections/content-fallback.liquid +53 -0
- package/test-theme/sections/content.liquid +57 -0
- package/test-theme/sections/footer-fallback.liquid +328 -0
- package/test-theme/sections/footer.liquid +278 -0
- package/test-theme/sections/header-fallback.liquid +1805 -0
- package/test-theme/sections/header.liquid +1145 -0
- package/test-theme/sections/hero-fallback.liquid +212 -0
- package/test-theme/sections/hero.liquid +136 -0
- package/test-theme/snippets/account-sidebar.liquid +200 -0
- package/test-theme/snippets/add-to-cart-modal.liquid +484 -0
- package/test-theme/snippets/breadcrumbs.liquid +134 -0
- package/test-theme/snippets/cart-drawer.liquid +467 -0
- package/test-theme/snippets/delivery-zone-city-selector.liquid +79 -0
- package/test-theme/snippets/delivery-zone-modal.liquid +337 -0
- package/test-theme/snippets/delivery-zone-search.liquid +78 -0
- package/test-theme/snippets/icon.liquid +105 -0
- package/test-theme/snippets/login-modal.liquid +346 -0
- package/test-theme/snippets/mega-menu.liquid +812 -0
- package/test-theme/snippets/news-thumbnail.liquid +187 -0
- package/test-theme/snippets/pagination.liquid +120 -0
- package/test-theme/snippets/price.liquid +92 -0
- package/test-theme/snippets/product-card-related.liquid +78 -0
- package/test-theme/snippets/product-card-simple.liquid +41 -0
- package/test-theme/snippets/product-card.liquid +697 -0
- package/test-theme/snippets/rating.liquid +85 -0
- package/test-theme/snippets/skeleton-collection-grid.liquid +114 -0
- package/test-theme/snippets/skeleton-product-card.liquid +124 -0
- package/test-theme/snippets/skeleton-product-grid.liquid +34 -0
- package/test-theme/snippets/social-sharing.liquid +185 -0
- package/test-theme/templates/account/dashboard.liquid +401 -0
- package/test-theme/templates/account/loyalty-redemption.liquid +405 -0
- package/test-theme/templates/account/loyalty.liquid +588 -0
- package/test-theme/templates/account/order-detail.liquid +230 -0
- package/test-theme/templates/account/orders.liquid +349 -0
- package/test-theme/templates/account/profile.liquid +758 -0
- package/test-theme/templates/account/register.liquid +232 -0
- package/test-theme/templates/account/return-orders.liquid +348 -0
- package/test-theme/templates/account/store-credit.liquid +464 -0
- package/test-theme/templates/account/subscriptions.liquid +601 -0
- package/test-theme/templates/account/wishlist.liquid +419 -0
- package/test-theme/templates/address-book.liquid +1092 -0
- package/test-theme/templates/categories.liquid +452 -0
- package/test-theme/templates/checkout.liquid +4511 -0
- package/test-theme/templates/error.liquid +384 -0
- package/test-theme/templates/index.liquid +11 -0
- package/test-theme/templates/login.liquid +185 -0
- package/test-theme/templates/order-confirmation.liquid +720 -0
- package/test-theme/templates/page.liquid +297 -0
- package/test-theme/templates/product-detail.liquid +4363 -0
- package/test-theme/templates/products.liquid +518 -0
- package/test-theme/templates/search.liquid +922 -0
- package/test-theme/theme.json.example +19 -0
- package/test-theme/widgets/brand-carousel.liquid +676 -0
- package/test-theme/widgets/brand.liquid +245 -0
- package/test-theme/widgets/carousel.liquid +843 -0
- package/test-theme/widgets/category-list-carousel.liquid +656 -0
- package/test-theme/widgets/category-list.liquid +340 -0
- package/test-theme/widgets/category.liquid +475 -0
- package/test-theme/widgets/discount-time.liquid +176 -0
- package/test-theme/widgets/footer-menu.liquid +695 -0
- package/test-theme/widgets/footer.liquid +179 -0
- package/test-theme/widgets/gallery.liquid +271 -0
- package/test-theme/widgets/header-menu.liquid +932 -0
- package/test-theme/widgets/header.liquid +159 -0
- package/test-theme/widgets/html.liquid +214 -0
- package/test-theme/widgets/news.liquid +217 -0
- package/test-theme/widgets/product-canvas.liquid +235 -0
- package/test-theme/widgets/product-carousel.liquid +502 -0
- package/test-theme/widgets/product.liquid +45 -0
- package/test-theme/widgets/recently-viewed.liquid +26 -0
- package/test-theme/widgets/shared/product-grid.liquid +339 -0
- package/test-theme/widgets/simple-product.liquid +42 -0
- package/test-theme/widgets/single-product.liquid +610 -0
- package/test-theme/widgets/spacebar-carousel.liquid +663 -0
- package/test-theme/widgets/spacebar.liquid +279 -0
- package/test-theme/widgets/splash.liquid +378 -0
- package/test-theme/widgets/testimonial-carousel.liquid +709 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Footer Fallback Content
|
|
3
|
+
Used when widgets are not available or widget mode is disabled
|
|
4
|
+
{% endcomment %}
|
|
5
|
+
|
|
6
|
+
<footer class="site-footer" role="contentinfo">
|
|
7
|
+
<div class="site-footer__fallback">
|
|
8
|
+
<div class="site-footer__fallback-inner">
|
|
9
|
+
<div class="site-footer__brand">
|
|
10
|
+
<h3>{{ shop.name }}</h3>
|
|
11
|
+
<p>{{ shop.description | default: 'Your trusted online store for quality products.' }}</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="site-footer__links">
|
|
14
|
+
<div>
|
|
15
|
+
<h4>Shop</h4>
|
|
16
|
+
<ul>
|
|
17
|
+
<li><a href="/products">All Products</a></li>
|
|
18
|
+
<li><a href="/collections">Collections</a></li>
|
|
19
|
+
<li><a href="/search">Search</a></li>
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<h4>Support</h4>
|
|
24
|
+
<ul>
|
|
25
|
+
<li><a href="/pages/contact">Contact</a></li>
|
|
26
|
+
<li><a href="/pages/shipping">Shipping</a></li>
|
|
27
|
+
<li><a href="/pages/returns">Returns</a></li>
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
<div>
|
|
31
|
+
<h4>Company</h4>
|
|
32
|
+
<ul>
|
|
33
|
+
<li><a href="/pages/about">About</a></li>
|
|
34
|
+
<li><a href="/pages/careers">Careers</a></li>
|
|
35
|
+
<li><a href="/pages/press">Press</a></li>
|
|
36
|
+
</ul>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
{% comment %}Newsletter - Check section.settings first (merged from global), then global settings{% endcomment %}
|
|
41
|
+
{% liquid
|
|
42
|
+
assign newsletter_val = section.settings.show_newsletter
|
|
43
|
+
if newsletter_val == blank or newsletter_val == null
|
|
44
|
+
assign newsletter_val = settings.show_newsletter
|
|
45
|
+
endif
|
|
46
|
+
if newsletter_val == blank or newsletter_val == null
|
|
47
|
+
assign newsletter_val = true
|
|
48
|
+
endif
|
|
49
|
+
%}
|
|
50
|
+
{% if newsletter_val or newsletter_val == true or newsletter_val == 'true' or newsletter_val == 1 %}
|
|
51
|
+
<div class="site-footer__newsletter">
|
|
52
|
+
<div class="site-footer__newsletter-content">
|
|
53
|
+
<h4 class="site-footer__newsletter-title">Subscribe to our newsletter</h4>
|
|
54
|
+
<form class="site-footer__newsletter-form" action="/webstoreapi/newsletter/subscribe" method="post">
|
|
55
|
+
<div class="site-footer__newsletter-input-wrapper">
|
|
56
|
+
<input
|
|
57
|
+
type="email"
|
|
58
|
+
name="email"
|
|
59
|
+
class="site-footer__newsletter-input"
|
|
60
|
+
placeholder="Enter your email address"
|
|
61
|
+
aria-label="Email address"
|
|
62
|
+
required>
|
|
63
|
+
<button type="submit" class="site-footer__newsletter-button">
|
|
64
|
+
<span>Subscribe</span>
|
|
65
|
+
<svg class="site-footer__newsletter-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
|
+
<path d="M2 8h12M9 3l5 5-5 5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
67
|
+
</svg>
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</form>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
{% endif %}
|
|
74
|
+
{% comment %}Social links - Check section.settings first (merged from global), then global settings{% endcomment %}
|
|
75
|
+
{% liquid
|
|
76
|
+
assign social_val = section.settings.show_social_links
|
|
77
|
+
if social_val == blank or social_val == null
|
|
78
|
+
assign social_val = settings.show_social_links
|
|
79
|
+
endif
|
|
80
|
+
if social_val == blank or social_val == null
|
|
81
|
+
assign social_val = true
|
|
82
|
+
endif
|
|
83
|
+
%}
|
|
84
|
+
{% if social_val or social_val == true or social_val == 'true' or social_val == 1 %}
|
|
85
|
+
<div class="site-footer__social">
|
|
86
|
+
{% if settings.social_facebook and settings.social_facebook != '' %}
|
|
87
|
+
<a href="{{ settings.social_facebook }}" target="_blank" rel="noopener noreferrer" aria-label="Facebook">Facebook</a>
|
|
88
|
+
{% endif %}
|
|
89
|
+
{% if settings.social_instagram and settings.social_instagram != '' %}
|
|
90
|
+
<a href="{{ settings.social_instagram }}" target="_blank" rel="noopener noreferrer" aria-label="Instagram">Instagram</a>
|
|
91
|
+
{% endif %}
|
|
92
|
+
{% if settings.social_twitter and settings.social_twitter != '' %}
|
|
93
|
+
<a href="{{ settings.social_twitter }}" target="_blank" rel="noopener noreferrer" aria-label="Twitter">Twitter</a>
|
|
94
|
+
{% endif %}
|
|
95
|
+
{% if settings.social_youtube and settings.social_youtube != '' %}
|
|
96
|
+
<a href="{{ settings.social_youtube }}" target="_blank" rel="noopener noreferrer" aria-label="YouTube">YouTube</a>
|
|
97
|
+
{% endif %}
|
|
98
|
+
{% if settings.social_pinterest and settings.social_pinterest != '' %}
|
|
99
|
+
<a href="{{ settings.social_pinterest }}" target="_blank" rel="noopener noreferrer" aria-label="Pinterest">Pinterest</a>
|
|
100
|
+
{% endif %}
|
|
101
|
+
</div>
|
|
102
|
+
{% endif %}
|
|
103
|
+
<div class="site-footer__bottom">
|
|
104
|
+
{% assign footer_text_value = settings.footer_text | default: section.settings.footer_text %}
|
|
105
|
+
{% if footer_text_value and footer_text_value != '' %}
|
|
106
|
+
<p>{{ footer_text_value }}</p>
|
|
107
|
+
{% else %}
|
|
108
|
+
<p>© {{ 'now' | date: '%Y' }} {{ shop.name }}. All rights reserved.</p>
|
|
109
|
+
{% endif %}
|
|
110
|
+
<div class="site-footer__bottom-links">
|
|
111
|
+
<a href="/pages/privacy">Privacy</a>
|
|
112
|
+
<a href="/pages/terms">Terms</a>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</footer>
|
|
117
|
+
|
|
118
|
+
<style>
|
|
119
|
+
.site-footer__fallback {
|
|
120
|
+
background: {{ settings.color_background }};
|
|
121
|
+
color: {{ settings.color_text }};
|
|
122
|
+
padding: 3rem 0;
|
|
123
|
+
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
|
124
|
+
}
|
|
125
|
+
.site-footer__fallback-inner {
|
|
126
|
+
max-width: {{ settings.container_width }}px;
|
|
127
|
+
margin: 0 auto;
|
|
128
|
+
padding: 0 1.25rem;
|
|
129
|
+
display: grid;
|
|
130
|
+
gap: 2.5rem;
|
|
131
|
+
grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
|
|
132
|
+
}
|
|
133
|
+
.site-footer__brand h3 {
|
|
134
|
+
margin: 0 0 0.5rem;
|
|
135
|
+
}
|
|
136
|
+
.site-footer__brand p {
|
|
137
|
+
margin: 0;
|
|
138
|
+
line-height: 1.6;
|
|
139
|
+
}
|
|
140
|
+
.site-footer__links {
|
|
141
|
+
display: grid;
|
|
142
|
+
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
143
|
+
gap: 1.5rem;
|
|
144
|
+
}
|
|
145
|
+
.site-footer__links h4 {
|
|
146
|
+
text-transform: uppercase;
|
|
147
|
+
letter-spacing: 0.08em;
|
|
148
|
+
font-size: 0.85rem;
|
|
149
|
+
margin: 0 0 0.75rem;
|
|
150
|
+
}
|
|
151
|
+
.site-footer__links ul {
|
|
152
|
+
list-style: none;
|
|
153
|
+
margin: 0;
|
|
154
|
+
padding: 0;
|
|
155
|
+
display: grid;
|
|
156
|
+
gap: 0.5rem;
|
|
157
|
+
}
|
|
158
|
+
.site-footer__links a {
|
|
159
|
+
text-decoration: none;
|
|
160
|
+
color: inherit;
|
|
161
|
+
}
|
|
162
|
+
.site-footer__links a:hover {
|
|
163
|
+
text-decoration: underline;
|
|
164
|
+
}
|
|
165
|
+
.site-footer__newsletter {
|
|
166
|
+
max-width: var(--container-width, {{ settings.container_width }}px);
|
|
167
|
+
margin: 0 auto;
|
|
168
|
+
padding: var(--spacing-section, 3rem) var(--spacing-component, 1.25rem) var(--spacing-section, 2rem);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.site-footer__newsletter-content {
|
|
172
|
+
max-width: 500px;
|
|
173
|
+
margin: 0 auto;
|
|
174
|
+
text-align: center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.site-footer__newsletter-title {
|
|
178
|
+
margin: 0 0 var(--spacing-component, 1.5rem) 0;
|
|
179
|
+
font-size: var(--text-lg, 1.125rem);
|
|
180
|
+
font-weight: var(--font-weight-bold, 600);
|
|
181
|
+
color: var(--color-text, {{ settings.color_text }});
|
|
182
|
+
line-height: var(--line-height-heading, 1.2);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.site-footer__newsletter-form {
|
|
186
|
+
width: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.site-footer__newsletter-input-wrapper {
|
|
190
|
+
display: flex;
|
|
191
|
+
gap: var(--spacing-element, 0.75rem);
|
|
192
|
+
background: var(--color-surface, rgba(255, 255, 255, 0.05));
|
|
193
|
+
border: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
|
|
194
|
+
border-radius: var(--border-radius-medium, 8px);
|
|
195
|
+
padding: var(--spacing-element, 0.25rem);
|
|
196
|
+
transition: border-color var(--transition-fast, 0.2s) var(--ease-out, ease), box-shadow var(--transition-fast, 0.2s) var(--ease-out, ease);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.site-footer__newsletter-input-wrapper:focus-within {
|
|
200
|
+
border-color: var(--color-primary, {{ settings.color_primary }});
|
|
201
|
+
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
|
|
202
|
+
outline: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.site-footer__newsletter-input {
|
|
206
|
+
flex: 1;
|
|
207
|
+
padding: var(--spacing-element, 0.75rem) var(--spacing-component, 1rem);
|
|
208
|
+
border: none;
|
|
209
|
+
border-radius: var(--border-radius-small, 6px);
|
|
210
|
+
background: transparent;
|
|
211
|
+
color: var(--color-text, {{ settings.color_text }});
|
|
212
|
+
font-size: var(--text-base, 1rem);
|
|
213
|
+
font-family: var(--font-body, inherit);
|
|
214
|
+
line-height: var(--line-height-base, 1.5);
|
|
215
|
+
transition: background-color var(--transition-fast, 0.2s) var(--ease-out, ease);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.site-footer__newsletter-input::placeholder {
|
|
219
|
+
color: var(--color-text-muted, {{ settings.color_text_light }});
|
|
220
|
+
opacity: 0.7;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.site-footer__newsletter-input:focus {
|
|
224
|
+
outline: none;
|
|
225
|
+
background: rgba(255, 255, 255, 0.03);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.site-footer__newsletter-button {
|
|
229
|
+
display: inline-flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
justify-content: center;
|
|
232
|
+
gap: var(--spacing-element, 0.5rem);
|
|
233
|
+
padding: var(--spacing-element, 0.75rem) var(--spacing-component, 1.5rem);
|
|
234
|
+
background: var(--color-primary, {{ settings.color_primary }});
|
|
235
|
+
color: var(--color-background, {{ settings.color_background }});
|
|
236
|
+
border: none;
|
|
237
|
+
border-radius: var(--border-radius-small, 6px);
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
font-size: var(--text-base, 1rem);
|
|
240
|
+
font-weight: var(--font-weight-bold, 600);
|
|
241
|
+
font-family: var(--font-body, inherit);
|
|
242
|
+
line-height: 1;
|
|
243
|
+
white-space: nowrap;
|
|
244
|
+
transition: background-color var(--transition-fast, 0.2s) var(--ease-out, ease), transform var(--transition-fast, 0.2s) var(--ease-out, ease), box-shadow var(--transition-fast, 0.2s) var(--ease-out, ease);
|
|
245
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.site-footer__newsletter-button:hover {
|
|
249
|
+
background: var(--color-primary-dark, {{ settings.color_primary_dark }});
|
|
250
|
+
transform: translateY(-1px);
|
|
251
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.site-footer__newsletter-button:active {
|
|
255
|
+
transform: translateY(0);
|
|
256
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.site-footer__newsletter-icon {
|
|
260
|
+
width: 16px;
|
|
261
|
+
height: 16px;
|
|
262
|
+
flex-shrink: 0;
|
|
263
|
+
transition: transform var(--transition-fast, 0.2s) var(--ease-out, ease);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.site-footer__newsletter-button:hover .site-footer__newsletter-icon {
|
|
267
|
+
transform: translateX(2px);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@media (max-width: 640px) {
|
|
271
|
+
.site-footer__newsletter-input-wrapper {
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
padding: var(--spacing-element, 0.5rem);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.site-footer__newsletter-button {
|
|
277
|
+
width: 100%;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.site-footer__social {
|
|
282
|
+
max-width: {{ settings.container_width }}px;
|
|
283
|
+
margin: 0 auto 2rem;
|
|
284
|
+
padding: 0 1.25rem;
|
|
285
|
+
display: flex;
|
|
286
|
+
gap: 1rem;
|
|
287
|
+
flex-wrap: wrap;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.site-footer__social a {
|
|
291
|
+
color: {{ settings.color_text }};
|
|
292
|
+
text-decoration: none;
|
|
293
|
+
transition: color 0.2s ease;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.site-footer__social a:hover {
|
|
297
|
+
color: {{ settings.color_primary }};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.site-footer__bottom {
|
|
301
|
+
max-width: {{ settings.container_width }}px;
|
|
302
|
+
margin: 2.5rem auto 0;
|
|
303
|
+
padding: 0 1.25rem;
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-wrap: wrap;
|
|
306
|
+
justify-content: space-between;
|
|
307
|
+
gap: 1rem;
|
|
308
|
+
font-size: 0.85rem;
|
|
309
|
+
color: {{ settings.color_text_light }};
|
|
310
|
+
}
|
|
311
|
+
.site-footer__bottom-links {
|
|
312
|
+
display: inline-flex;
|
|
313
|
+
gap: 1rem;
|
|
314
|
+
}
|
|
315
|
+
.site-footer__bottom-links a {
|
|
316
|
+
color: inherit;
|
|
317
|
+
text-decoration: none;
|
|
318
|
+
}
|
|
319
|
+
.site-footer__bottom-links a:hover {
|
|
320
|
+
text-decoration: underline;
|
|
321
|
+
}
|
|
322
|
+
@media (max-width: 768px) {
|
|
323
|
+
.site-footer__fallback-inner {
|
|
324
|
+
grid-template-columns: minmax(0, 1fr);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
</style>
|
|
328
|
+
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Footer Section with Below-Footer
|
|
3
|
+
|
|
4
|
+
Main footer displays navigation widgets
|
|
5
|
+
Below-footer shows copyright and optional social links
|
|
6
|
+
|
|
7
|
+
FIXED: Ensures footer is always rendered even if menus fail to load
|
|
8
|
+
{% endcomment %}
|
|
9
|
+
|
|
10
|
+
{% assign footer_widgets = widgets.footer %}
|
|
11
|
+
|
|
12
|
+
{%- comment -%}
|
|
13
|
+
Prepare footer widgets:
|
|
14
|
+
- Extract a single FooterMenu widget (if present)
|
|
15
|
+
- Collect all other widgets (including the main footer widget) separately
|
|
16
|
+
{%- endcomment -%}
|
|
17
|
+
{% assign footer_menu_widget = nil %}
|
|
18
|
+
|
|
19
|
+
{% if footer_widgets and footer_widgets.size > 0 %}
|
|
20
|
+
{% for widget in footer_widgets %}
|
|
21
|
+
{% assign widget_type = widget.type | default: '' | strip | downcase %}
|
|
22
|
+
{% if widget_type == 'footermenu' and footer_menu_widget == nil %}
|
|
23
|
+
{% assign footer_menu_widget = widget %}
|
|
24
|
+
{% endif %}
|
|
25
|
+
{% endfor %}
|
|
26
|
+
{% endif %}
|
|
27
|
+
|
|
28
|
+
{%- comment -%} Debug: Log widget rendering information {%- endcomment -%}
|
|
29
|
+
<script>
|
|
30
|
+
(function() {
|
|
31
|
+
console.log('[FooterSection] Footer section rendering');
|
|
32
|
+
console.log('[FooterSection] Footer widgets count:', {{ footer_widgets.size | default: 0 }});
|
|
33
|
+
console.log('[FooterSection] Footer menu widget found:', {{ footer_menu_widget | default: nil | json }});
|
|
34
|
+
{% if footer_menu_widget %}
|
|
35
|
+
console.log('[FooterSection] FooterMenu widget details:', {
|
|
36
|
+
id: '{{ footer_menu_widget.id }}',
|
|
37
|
+
type: '{{ footer_menu_widget.type }}',
|
|
38
|
+
template_path: '{{ footer_menu_widget.template_path | default: "widgets/footer-menu" }}'
|
|
39
|
+
});
|
|
40
|
+
{% else %}
|
|
41
|
+
console.warn('[FooterSection] No FooterMenu widget found in footer widgets');
|
|
42
|
+
{% if footer_widgets and footer_widgets.size > 0 %}
|
|
43
|
+
console.log('[FooterSection] Available widget types:', [
|
|
44
|
+
{% for widget in footer_widgets %}
|
|
45
|
+
'{{ widget.type | default: "unknown" }}'{% unless forloop.last %},{% endunless %}
|
|
46
|
+
{% endfor %}
|
|
47
|
+
]);
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% endif %}
|
|
50
|
+
})();
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
{%- comment -%}
|
|
54
|
+
Main Footer Section - ALWAYS RENDERED
|
|
55
|
+
Never conditionally hide. Even without menu data, basic footer UI appears.
|
|
56
|
+
{%- endcomment -%}
|
|
57
|
+
<footer class="theme-section theme-section--footer" data-section="footer" data-section-id="{{ section.id }}">
|
|
58
|
+
<div class="footer-container">
|
|
59
|
+
|
|
60
|
+
{%- comment -%}
|
|
61
|
+
Always render the Footer Menu - footer section should always be visible
|
|
62
|
+
If FooterMenu widget exists, use it; otherwise render footer menu container that will fetch menus automatically
|
|
63
|
+
{%- endcomment -%}
|
|
64
|
+
{% if footer_menu_widget %}
|
|
65
|
+
<!-- FooterMenu widget rendering: ID={{ footer_menu_widget.id }}, Type={{ footer_menu_widget.type }} -->
|
|
66
|
+
<div class="theme-widget-wrapper"
|
|
67
|
+
data-widget-id="{{ footer_menu_widget.id }}"
|
|
68
|
+
data-widget-type="FooterMenu"
|
|
69
|
+
data-footer-menu-wrapper="true">
|
|
70
|
+
{% render footer_menu_widget.template_path | default: 'widgets/footer-menu', widget: footer_menu_widget, settings: settings %}
|
|
71
|
+
</div>
|
|
72
|
+
<script>
|
|
73
|
+
console.log('[FooterSection] FooterMenu widget rendered with ID: {{ footer_menu_widget.id }}');
|
|
74
|
+
</script>
|
|
75
|
+
{% else %}
|
|
76
|
+
<!-- FooterMenu widget: NOT FOUND - Rendering footer menu container that will auto-fetch menus -->
|
|
77
|
+
<div class="theme-widget-wrapper"
|
|
78
|
+
data-widget-type="FooterMenu"
|
|
79
|
+
data-footer-menu-wrapper="true">
|
|
80
|
+
{% render 'widgets/footer-menu', widget: nil, settings: settings %}
|
|
81
|
+
</div>
|
|
82
|
+
<script>
|
|
83
|
+
console.warn('[FooterSection] FooterMenu widget not found in widgets, but footer menu container is rendered to auto-fetch menus');
|
|
84
|
+
</script>
|
|
85
|
+
{% endif %}
|
|
86
|
+
|
|
87
|
+
{%- comment -%}
|
|
88
|
+
Render remaining footer widgets (e.g. main footer widget)
|
|
89
|
+
Skip FooterMenu widgets as they're rendered above
|
|
90
|
+
{%- endcomment -%}
|
|
91
|
+
{% if footer_widgets and footer_widgets.size > 0 %}
|
|
92
|
+
{% for widget in footer_widgets %}
|
|
93
|
+
{% assign widget_type = widget.type | default: '' | strip | downcase %}
|
|
94
|
+
{% if widget_type != 'footermenu' %}
|
|
95
|
+
<div class="theme-widget-wrapper"
|
|
96
|
+
data-widget-id="{{ widget.id }}"
|
|
97
|
+
data-widget-type="{{ widget.type }}"
|
|
98
|
+
data-widget-position="{{ widget.Position | default: widget.position | default: forloop.index }}">
|
|
99
|
+
{% if widget and widget.template_path %}
|
|
100
|
+
{% render widget.template_path, widget: widget, settings: settings %}
|
|
101
|
+
{% else %}
|
|
102
|
+
<div class="widget-error" data-widget-error>
|
|
103
|
+
<p>Widget template not found</p>
|
|
104
|
+
</div>
|
|
105
|
+
{% endif %}
|
|
106
|
+
</div>
|
|
107
|
+
{% endif %}
|
|
108
|
+
{% endfor %}
|
|
109
|
+
{% endif %}
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
</footer>
|
|
113
|
+
|
|
114
|
+
{%- comment -%} Below Footer Section - ALWAYS RENDERED {%- endcomment -%}
|
|
115
|
+
<div class="theme-section theme-section--below-footer">
|
|
116
|
+
<div class="below-footer-container">
|
|
117
|
+
<div class="below-footer-content">
|
|
118
|
+
<p class="below-footer-text">
|
|
119
|
+
{% if section.settings.footer_text and section.settings.footer_text != '' %}
|
|
120
|
+
{{ section.settings.footer_text }}
|
|
121
|
+
{% else %}
|
|
122
|
+
© {{ 'now' | date: '%Y' }} {{ shop.domain }}. All rights reserved.
|
|
123
|
+
{% endif %}
|
|
124
|
+
</p>
|
|
125
|
+
|
|
126
|
+
{% if section.settings.show_social_links %}
|
|
127
|
+
<div class="below-footer-social">
|
|
128
|
+
<a href="#" class="social-link" aria-label="Facebook">
|
|
129
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
130
|
+
<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>
|
|
131
|
+
</svg>
|
|
132
|
+
</a>
|
|
133
|
+
<a href="#" class="social-link" aria-label="Twitter">
|
|
134
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
135
|
+
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>
|
|
136
|
+
</svg>
|
|
137
|
+
</a>
|
|
138
|
+
<a href="#" class="social-link" aria-label="Instagram">
|
|
139
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
140
|
+
<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect>
|
|
141
|
+
<path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path>
|
|
142
|
+
<line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>
|
|
143
|
+
</svg>
|
|
144
|
+
</a>
|
|
145
|
+
</div>
|
|
146
|
+
{% endif %}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<style>
|
|
152
|
+
/* Main Footer */
|
|
153
|
+
.theme-section--footer {
|
|
154
|
+
background: #1a1f2c;
|
|
155
|
+
color: #ffffff;
|
|
156
|
+
padding: 3rem 2rem;
|
|
157
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
158
|
+
min-height: 120px; /* Ensures footer has visible height even if menu fails */
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.footer-container {
|
|
162
|
+
max-width: 1200px;
|
|
163
|
+
margin: 0 auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.theme-widget-wrapper {
|
|
167
|
+
display: block;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Below Footer */
|
|
171
|
+
.theme-section--below-footer {
|
|
172
|
+
background: #141823;
|
|
173
|
+
color: #9ca3af;
|
|
174
|
+
padding: 1.5rem 2rem;
|
|
175
|
+
font-size: 0.875rem;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.below-footer-container {
|
|
179
|
+
max-width: 1200px;
|
|
180
|
+
margin: 0 auto;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.below-footer-content {
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: space-between;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: 2rem;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.below-footer-text {
|
|
191
|
+
margin: 0;
|
|
192
|
+
color: #9ca3af;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.below-footer-social {
|
|
196
|
+
display: flex;
|
|
197
|
+
gap: 1rem;
|
|
198
|
+
align-items: center;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.social-link {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
width: 36px;
|
|
206
|
+
height: 36px;
|
|
207
|
+
border-radius: 50%;
|
|
208
|
+
background: rgba(255, 255, 255, 0.05);
|
|
209
|
+
color: #9ca3af;
|
|
210
|
+
text-decoration: none;
|
|
211
|
+
transition: all 0.2s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.social-link:hover {
|
|
215
|
+
background: rgba(255, 255, 255, 0.1);
|
|
216
|
+
color: #ffffff;
|
|
217
|
+
transform: translateY(-2px);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.widget-error {
|
|
221
|
+
padding: 1rem;
|
|
222
|
+
background: #fee2e2;
|
|
223
|
+
border: 1px solid #fecaca;
|
|
224
|
+
border-radius: 0.5rem;
|
|
225
|
+
color: #991b1b;
|
|
226
|
+
font-size: 0.875rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Responsive */
|
|
230
|
+
@media (max-width: 768px) {
|
|
231
|
+
.theme-section--footer {
|
|
232
|
+
padding: 2rem 1.5rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.theme-section--below-footer {
|
|
236
|
+
padding: 1.25rem 1.5rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.below-footer-content {
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
text-align: center;
|
|
242
|
+
gap: 1rem;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.below-footer-social {
|
|
246
|
+
justify-content: center;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
250
|
+
|
|
251
|
+
{% schema %}
|
|
252
|
+
{
|
|
253
|
+
"name": "Footer",
|
|
254
|
+
"settings": [
|
|
255
|
+
{
|
|
256
|
+
"type": "paragraph",
|
|
257
|
+
"content": "This section displays widgets from the 'footer' section with a professional below-footer area."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"type": "text",
|
|
261
|
+
"id": "footer_text",
|
|
262
|
+
"label": "Copyright Text",
|
|
263
|
+
"default": ""
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"type": "checkbox",
|
|
267
|
+
"id": "show_social_links",
|
|
268
|
+
"label": "Show Social Links",
|
|
269
|
+
"default": true
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"presets": [
|
|
273
|
+
{
|
|
274
|
+
"name": "Footer"
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
{% endschema %}
|