@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,484 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Add to Cart Modal
|
|
3
|
+
Displays product details for confirmation before adding to cart
|
|
4
|
+
{% endcomment %}
|
|
5
|
+
|
|
6
|
+
<div class="add-to-cart-modal" id="add-to-cart-modal" aria-hidden="true">
|
|
7
|
+
<div class="add-to-cart-modal-overlay" data-add-to-cart-modal-close></div>
|
|
8
|
+
<div class="add-to-cart-modal-panel" role="dialog" aria-label="Add to cart confirmation">
|
|
9
|
+
<button class="add-to-cart-modal-close" aria-label="Close" data-add-to-cart-modal-close>
|
|
10
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
11
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
12
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
13
|
+
</svg>
|
|
14
|
+
</button>
|
|
15
|
+
|
|
16
|
+
<div class="add-to-cart-modal-content">
|
|
17
|
+
<!-- Product Image -->
|
|
18
|
+
<div class="add-to-cart-modal-image-container">
|
|
19
|
+
<img id="add-to-cart-modal-image" src="" alt="" class="add-to-cart-modal-image">
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Product Details -->
|
|
23
|
+
<div class="add-to-cart-modal-details">
|
|
24
|
+
<h3 class="add-to-cart-modal-title" id="add-to-cart-modal-title"></h3>
|
|
25
|
+
|
|
26
|
+
<!-- Price (shown after title, before variants) -->
|
|
27
|
+
<div class="add-to-cart-modal-price">
|
|
28
|
+
<span class="add-to-cart-modal-price-current" id="add-to-cart-modal-price-current"></span>
|
|
29
|
+
<span class="add-to-cart-modal-price-original" id="add-to-cart-modal-price-original" style="display: none;"></span>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- Variant Option Selectors (Buttons/Swatches) -->
|
|
33
|
+
<div class="add-to-cart-modal-variant-options" id="add-to-cart-modal-variant-options"></div>
|
|
34
|
+
|
|
35
|
+
<!-- Combinations -->
|
|
36
|
+
<div id="add-to-cart-modal-comboContainer"></div>
|
|
37
|
+
<div id="add-to-cart-modal-combinationValidationMsg"></div>
|
|
38
|
+
|
|
39
|
+
<!-- Subscriptions -->
|
|
40
|
+
<div class="add-to-cart-modal-subscription-option" id="add-to-cart-modal-subscription-option" style="display: none;">
|
|
41
|
+
<div id="add-to-cart-modal-subscriptionInfoMessage"></div>
|
|
42
|
+
<div id="add-to-cart-modal-subscriptionPlanContainer" class="subscription-list"></div>
|
|
43
|
+
<div id="add-to-cart-modal-frequencyContainer"></div>
|
|
44
|
+
<div class="sub-modern-box">
|
|
45
|
+
<div class="sub-row">
|
|
46
|
+
<span class="sub-label">Shipping</span>
|
|
47
|
+
<select id="add-to-cart-modal-shippingMethod" class="sub-input" aria-label="Select shipping method">
|
|
48
|
+
<option value="">Select</option>
|
|
49
|
+
</select>
|
|
50
|
+
<div id="add-to-cart-modal-shippingMethodDetails"></div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="sub-row">
|
|
53
|
+
<span class="sub-label">Start Date <span class="required-indicator">*</span></span>
|
|
54
|
+
<div class="flex-column">
|
|
55
|
+
<input type="date" id="add-to-cart-modal-startDate" class="sub-input" aria-label="Subscription start date (required)" aria-required="true">
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="sub-row">
|
|
59
|
+
<span class="sub-label">End Date <span class="required-indicator">*</span></span>
|
|
60
|
+
<div class="flex-column">
|
|
61
|
+
<input type="date" id="add-to-cart-modal-endDate" class="sub-input" aria-label="Subscription end date (required)" aria-required="true">
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="sub-row">
|
|
65
|
+
<span class="sub-label">Deliverables</span>
|
|
66
|
+
<span class="deliver-pill liveOrderCount">0</span>
|
|
67
|
+
</div>
|
|
68
|
+
<span id="add-to-cart-modal-subscriptionValidationMsg"></span>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- Quantity Selector -->
|
|
73
|
+
<div class="add-to-cart-modal-quantity">
|
|
74
|
+
<label class="add-to-cart-modal-quantity-label">QUANTITY:</label>
|
|
75
|
+
<div class="add-to-cart-modal-quantity-controls">
|
|
76
|
+
<button type="button" class="add-to-cart-modal-qty-btn" id="add-to-cart-modal-qty-decrease" aria-label="Decrease quantity">−</button>
|
|
77
|
+
<input type="number" class="add-to-cart-modal-qty-input" id="add-to-cart-modal-qty-input" value="1" min="1" max="99" aria-label="Quantity">
|
|
78
|
+
<button type="button" class="add-to-cart-modal-qty-btn" id="add-to-cart-modal-qty-increase" aria-label="Increase quantity">+</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<!-- Add to Cart Button -->
|
|
83
|
+
<button type="button" class="add-to-cart-modal-confirm-btn" id="add-to-cart-modal-confirm-btn">
|
|
84
|
+
ADD TO CART
|
|
85
|
+
</button>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<style>
|
|
92
|
+
.add-to-cart-modal {
|
|
93
|
+
position: fixed;
|
|
94
|
+
inset: 0;
|
|
95
|
+
z-index: 9999;
|
|
96
|
+
display: none;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
padding: 20px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#add-to-cart-modal.add-to-cart-modal.active {
|
|
103
|
+
display: flex;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#add-to-cart-modal .add-to-cart-modal-overlay {
|
|
107
|
+
position: absolute;
|
|
108
|
+
inset: 0;
|
|
109
|
+
background: rgba(0, 0, 0, 0.5);
|
|
110
|
+
backdrop-filter: blur(4px);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.add-to-cart-modal-panel {
|
|
114
|
+
position: relative;
|
|
115
|
+
background: white;
|
|
116
|
+
border-radius: 16px;
|
|
117
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
118
|
+
width: 100%;
|
|
119
|
+
max-width: 900px;
|
|
120
|
+
max-height: 90vh;
|
|
121
|
+
overflow-y: auto;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
#add-to-cart-modal .add-to-cart-modal-close {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 16px;
|
|
129
|
+
right: 16px;
|
|
130
|
+
background: none;
|
|
131
|
+
border: none;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
color: #6b7280;
|
|
134
|
+
padding: 8px;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
z-index: 10;
|
|
139
|
+
border-radius: 50%;
|
|
140
|
+
transition: all 0.2s ease;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#add-to-cart-modal .add-to-cart-modal-close:hover {
|
|
144
|
+
color: #111827;
|
|
145
|
+
background: rgba(0, 0, 0, 0.05);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#add-to-cart-modal .add-to-cart-modal-content {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: row;
|
|
151
|
+
gap: 30px;
|
|
152
|
+
align-items: flex-start;
|
|
153
|
+
padding: 24px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#add-to-cart-modal .add-to-cart-modal-image-container {
|
|
157
|
+
flex: 0 0 45% !important;
|
|
158
|
+
max-width: 45% !important;
|
|
159
|
+
width: 45% !important;
|
|
160
|
+
aspect-ratio: 1;
|
|
161
|
+
background: #f5f5f5;
|
|
162
|
+
border-radius: 12px;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
position: relative;
|
|
168
|
+
margin-bottom: 0 !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#add-to-cart-modal .add-to-cart-modal-image {
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 100%;
|
|
174
|
+
object-fit: cover;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#add-to-cart-modal .add-to-cart-modal-details {
|
|
178
|
+
flex: 1;
|
|
179
|
+
display: flex;
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
gap: 20px;
|
|
182
|
+
padding-left: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
#add-to-cart-modal .add-to-cart-modal-title {
|
|
186
|
+
margin: 0;
|
|
187
|
+
font-size: 20px;
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
color: #111827;
|
|
190
|
+
line-height: 1.4;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options {
|
|
194
|
+
margin: 16px 0;
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
gap: 16px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Use same classes as product page for consistency - scoped to modal */
|
|
201
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: 12px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-label {
|
|
208
|
+
font-weight: 500;
|
|
209
|
+
color: #111;
|
|
210
|
+
font-size: 13px;
|
|
211
|
+
text-transform: uppercase;
|
|
212
|
+
letter-spacing: 0.5px;
|
|
213
|
+
margin-bottom: 8px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-values {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-wrap: wrap;
|
|
219
|
+
gap: 8px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn,
|
|
223
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value {
|
|
224
|
+
border: 1px solid #cccccc;
|
|
225
|
+
background: white;
|
|
226
|
+
padding: 8px 14px;
|
|
227
|
+
margin: 0;
|
|
228
|
+
border-radius: 6px;
|
|
229
|
+
cursor: pointer;
|
|
230
|
+
position: relative;
|
|
231
|
+
z-index: 10;
|
|
232
|
+
pointer-events: auto;
|
|
233
|
+
transition: all 0.2s ease;
|
|
234
|
+
font-size: 14px;
|
|
235
|
+
font-weight: 500;
|
|
236
|
+
color: #111;
|
|
237
|
+
font-family: inherit;
|
|
238
|
+
min-width: auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn.selected,
|
|
242
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value.selected {
|
|
243
|
+
background: #111827 !important;
|
|
244
|
+
color: white !important;
|
|
245
|
+
border-color: #111827 !important;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn:hover:not(:disabled):not(.selected),
|
|
249
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value:hover:not(:disabled):not(.selected) {
|
|
250
|
+
border-color: #111827;
|
|
251
|
+
background: #f9fafb;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn[data-display-type="color"],
|
|
255
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value-color {
|
|
256
|
+
width: 32px;
|
|
257
|
+
height: 32px;
|
|
258
|
+
border-radius: 50%;
|
|
259
|
+
font-size: 0;
|
|
260
|
+
padding: 0;
|
|
261
|
+
border: 2px solid #aaa;
|
|
262
|
+
background-color: currentColor;
|
|
263
|
+
min-width: 32px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn[data-display-type="color"].selected,
|
|
267
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value-color.selected {
|
|
268
|
+
border: 2px solid #111827 !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Screen reader text for color swatches */
|
|
272
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .sr-only {
|
|
273
|
+
position: absolute;
|
|
274
|
+
width: 1px;
|
|
275
|
+
height: 1px;
|
|
276
|
+
padding: 0;
|
|
277
|
+
margin: -1px;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
clip: rect(0, 0, 0, 0);
|
|
280
|
+
white-space: nowrap;
|
|
281
|
+
border-width: 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .product-option-btn:disabled,
|
|
285
|
+
#add-to-cart-modal .add-to-cart-modal-variant-options .option-value:disabled {
|
|
286
|
+
opacity: 0.4;
|
|
287
|
+
cursor: not-allowed;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#add-to-cart-modal .add-to-cart-modal-price {
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
gap: 12px;
|
|
294
|
+
font-size: 24px;
|
|
295
|
+
font-weight: 700;
|
|
296
|
+
color: #111827;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#add-to-cart-modal .add-to-cart-modal-price-current {
|
|
300
|
+
color: #111827;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
#add-to-cart-modal .add-to-cart-modal-price-original {
|
|
304
|
+
font-size: 18px;
|
|
305
|
+
color: #9ca3af;
|
|
306
|
+
text-decoration: line-through;
|
|
307
|
+
font-weight: 400;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
#add-to-cart-modal .add-to-cart-modal-quantity {
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
gap: 16px;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
#add-to-cart-modal .add-to-cart-modal-quantity-label {
|
|
317
|
+
font-size: 13px;
|
|
318
|
+
font-weight: 500;
|
|
319
|
+
color: #111;
|
|
320
|
+
text-transform: uppercase;
|
|
321
|
+
letter-spacing: 0.5px;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
#add-to-cart-modal .add-to-cart-modal-quantity-controls {
|
|
325
|
+
display: flex;
|
|
326
|
+
align-items: center;
|
|
327
|
+
border: 1px solid #e5e7eb;
|
|
328
|
+
border-radius: 8px;
|
|
329
|
+
overflow: hidden;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
#add-to-cart-modal .add-to-cart-modal-qty-btn {
|
|
333
|
+
background: white;
|
|
334
|
+
border: none;
|
|
335
|
+
width: 40px;
|
|
336
|
+
height: 40px;
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
font-size: 20px;
|
|
342
|
+
font-weight: 600;
|
|
343
|
+
color: #111827;
|
|
344
|
+
transition: background 0.2s ease;
|
|
345
|
+
border-right: 1px solid #e5e7eb;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.add-to-cart-modal-qty-btn:last-child {
|
|
349
|
+
border-right: none;
|
|
350
|
+
border-left: 1px solid #e5e7eb;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.add-to-cart-modal-qty-btn:hover:not(:disabled) {
|
|
354
|
+
background: #f9fafb;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.add-to-cart-modal-qty-btn:disabled {
|
|
358
|
+
opacity: 0.4;
|
|
359
|
+
cursor: not-allowed;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
#add-to-cart-modal .add-to-cart-modal-qty-input {
|
|
363
|
+
width: 60px;
|
|
364
|
+
height: 40px;
|
|
365
|
+
border: none;
|
|
366
|
+
text-align: center;
|
|
367
|
+
font-size: 16px;
|
|
368
|
+
font-weight: 600;
|
|
369
|
+
color: #111827;
|
|
370
|
+
background: white;
|
|
371
|
+
-moz-appearance: textfield;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.add-to-cart-modal-qty-input::-webkit-outer-spin-button,
|
|
375
|
+
.add-to-cart-modal-qty-input::-webkit-inner-spin-button {
|
|
376
|
+
-webkit-appearance: none;
|
|
377
|
+
margin: 0;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
#add-to-cart-modal .add-to-cart-modal-confirm-btn {
|
|
381
|
+
width: 100%;
|
|
382
|
+
padding: 14px 24px;
|
|
383
|
+
background: #111827;
|
|
384
|
+
color: white;
|
|
385
|
+
border: none;
|
|
386
|
+
border-radius: 8px;
|
|
387
|
+
font-size: 14px;
|
|
388
|
+
font-weight: 600;
|
|
389
|
+
text-transform: uppercase;
|
|
390
|
+
letter-spacing: 0.5px;
|
|
391
|
+
cursor: pointer;
|
|
392
|
+
transition: background 0.2s ease;
|
|
393
|
+
margin-top: 8px;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.add-to-cart-modal-confirm-btn:hover:not(:disabled) {
|
|
397
|
+
background: #374151;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.add-to-cart-modal-confirm-btn:disabled {
|
|
401
|
+
opacity: 0.6;
|
|
402
|
+
cursor: not-allowed;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/* Mobile adjustments - switch back to vertical layout on small screens */
|
|
406
|
+
@media (max-width: 768px) {
|
|
407
|
+
#add-to-cart-modal .add-to-cart-modal-content {
|
|
408
|
+
flex-direction: column !important;
|
|
409
|
+
gap: 20px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
#add-to-cart-modal .add-to-cart-modal-image-container {
|
|
413
|
+
flex: 1 !important;
|
|
414
|
+
max-width: 100% !important;
|
|
415
|
+
width: 100% !important;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
#add-to-cart-modal .add-to-cart-modal-details {
|
|
419
|
+
padding-left: 0;
|
|
420
|
+
width: 100%;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
@media (max-width: 640px) {
|
|
425
|
+
#add-to-cart-modal.add-to-cart-modal {
|
|
426
|
+
padding: 10px;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
#add-to-cart-modal .add-to-cart-modal-panel {
|
|
430
|
+
max-width: 100%;
|
|
431
|
+
border-radius: 12px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
#add-to-cart-modal .add-to-cart-modal-content {
|
|
435
|
+
padding: 20px;
|
|
436
|
+
flex-direction: column !important;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
#add-to-cart-modal .add-to-cart-modal-title {
|
|
440
|
+
font-size: 18px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
#add-to-cart-modal .add-to-cart-modal-price {
|
|
444
|
+
font-size: 20px;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
#add-to-cart-modal .add-to-cart-modal-price-original {
|
|
448
|
+
font-size: 16px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
#add-to-cart-modal .add-to-cart-modal-quantity {
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
align-items: flex-start;
|
|
454
|
+
gap: 12px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
#add-to-cart-modal .add-to-cart-modal-confirm-btn {
|
|
458
|
+
padding: 12px 20px;
|
|
459
|
+
font-size: 15px;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
@media (max-width: 480px) {
|
|
464
|
+
#add-to-cart-modal .add-to-cart-modal-content {
|
|
465
|
+
padding: 16px;
|
|
466
|
+
flex-direction: column !important;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
#add-to-cart-modal .add-to-cart-modal-image-container {
|
|
470
|
+
margin-bottom: 16px;
|
|
471
|
+
width: 100% !important;
|
|
472
|
+
max-width: 100% !important;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
#add-to-cart-modal .add-to-cart-modal-title {
|
|
476
|
+
font-size: 16px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
#add-to-cart-modal .add-to-cart-modal-price {
|
|
480
|
+
font-size: 18px;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
</style>
|
|
484
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{% comment %}
|
|
2
|
+
Breadcrumb Navigation Snippet
|
|
3
|
+
|
|
4
|
+
Renders breadcrumb navigation based on current page context.
|
|
5
|
+
Usage: {% render 'snippets/breadcrumbs' %}
|
|
6
|
+
{% endcomment %}
|
|
7
|
+
|
|
8
|
+
{% liquid
|
|
9
|
+
assign breadcrumbs = breadcrumbs | default: null
|
|
10
|
+
|
|
11
|
+
if breadcrumbs == null
|
|
12
|
+
assign breadcrumbs = ''
|
|
13
|
+
|
|
14
|
+
# Home
|
|
15
|
+
assign breadcrumbs = breadcrumbs | append: '<a href="/">Home</a>'
|
|
16
|
+
|
|
17
|
+
# Collection page
|
|
18
|
+
if collection
|
|
19
|
+
assign breadcrumbs = breadcrumbs | append: ' / <a href="/collections">Collections</a>'
|
|
20
|
+
assign breadcrumbs = breadcrumbs | append: ' / <span>' | append: collection.title | append: '</span>'
|
|
21
|
+
endif
|
|
22
|
+
|
|
23
|
+
# Product page
|
|
24
|
+
if product
|
|
25
|
+
if collection
|
|
26
|
+
assign breadcrumbs = breadcrumbs | append: ' / <a href="' | append: collection.url | append: '">' | append: collection.title | append: '</a>'
|
|
27
|
+
else
|
|
28
|
+
assign breadcrumbs = breadcrumbs | append: ' / <a href="/products">Products</a>'
|
|
29
|
+
endif
|
|
30
|
+
assign breadcrumbs = breadcrumbs | append: ' / <span>' | append: product.title | append: '</span>'
|
|
31
|
+
endif
|
|
32
|
+
|
|
33
|
+
# Page
|
|
34
|
+
if page and page.title
|
|
35
|
+
assign breadcrumbs = breadcrumbs | append: ' / <span>' | append: page.title | append: '</span>'
|
|
36
|
+
endif
|
|
37
|
+
|
|
38
|
+
# Article/Blog
|
|
39
|
+
if article
|
|
40
|
+
assign breadcrumbs = breadcrumbs | append: ' / <a href="/blogs">Blog</a>'
|
|
41
|
+
if blog
|
|
42
|
+
assign breadcrumbs = breadcrumbs | append: ' / <a href="' | append: blog.url | append: '">' | append: blog.title | append: '</a>'
|
|
43
|
+
endif
|
|
44
|
+
assign breadcrumbs = breadcrumbs | append: ' / <span>' | append: article.title | append: '</span>'
|
|
45
|
+
endif
|
|
46
|
+
endif
|
|
47
|
+
%}
|
|
48
|
+
|
|
49
|
+
<nav class="breadcrumbs" aria-label="Breadcrumb">
|
|
50
|
+
<ol class="breadcrumbs-list">
|
|
51
|
+
{% if breadcrumbs %}
|
|
52
|
+
{{ breadcrumbs }}
|
|
53
|
+
{% else %}
|
|
54
|
+
<li class="breadcrumbs-item">
|
|
55
|
+
<a href="/" class="breadcrumbs-link">Home</a>
|
|
56
|
+
</li>
|
|
57
|
+
{% if collection %}
|
|
58
|
+
<li class="breadcrumbs-item">
|
|
59
|
+
<span class="breadcrumbs-separator">/</span>
|
|
60
|
+
<a href="/collections" class="breadcrumbs-link">Collections</a>
|
|
61
|
+
</li>
|
|
62
|
+
<li class="breadcrumbs-item">
|
|
63
|
+
<span class="breadcrumbs-separator">/</span>
|
|
64
|
+
<span class="breadcrumbs-current">{{ collection.title }}</span>
|
|
65
|
+
</li>
|
|
66
|
+
{% elsif product %}
|
|
67
|
+
{% if collection %}
|
|
68
|
+
<li class="breadcrumbs-item">
|
|
69
|
+
<span class="breadcrumbs-separator">/</span>
|
|
70
|
+
<a href="{{ collection.url }}" class="breadcrumbs-link">{{ collection.title }}</a>
|
|
71
|
+
</li>
|
|
72
|
+
{% else %}
|
|
73
|
+
<li class="breadcrumbs-item">
|
|
74
|
+
<span class="breadcrumbs-separator">/</span>
|
|
75
|
+
<a href="/products" class="breadcrumbs-link">Products</a>
|
|
76
|
+
</li>
|
|
77
|
+
{% endif %}
|
|
78
|
+
<li class="breadcrumbs-item">
|
|
79
|
+
<span class="breadcrumbs-separator">/</span>
|
|
80
|
+
<span class="breadcrumbs-current">{{ product.title }}</span>
|
|
81
|
+
</li>
|
|
82
|
+
{% elsif page %}
|
|
83
|
+
<li class="breadcrumbs-item">
|
|
84
|
+
<span class="breadcrumbs-separator">/</span>
|
|
85
|
+
<span class="breadcrumbs-current">{{ page.title }}</span>
|
|
86
|
+
</li>
|
|
87
|
+
{% endif %}
|
|
88
|
+
{% endif %}
|
|
89
|
+
</ol>
|
|
90
|
+
</nav>
|
|
91
|
+
|
|
92
|
+
<style>
|
|
93
|
+
.breadcrumbs {
|
|
94
|
+
padding: 1rem 0;
|
|
95
|
+
font-size: 0.875rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.breadcrumbs-list {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-wrap: wrap;
|
|
101
|
+
align-items: center;
|
|
102
|
+
list-style: none;
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
gap: 0.5rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.breadcrumbs-item {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.breadcrumbs-separator {
|
|
115
|
+
color: {{ settings.color_text_light }};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.breadcrumbs-link {
|
|
119
|
+
color: {{ settings.color_text_light }};
|
|
120
|
+
text-decoration: none;
|
|
121
|
+
transition: color 0.2s ease;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.breadcrumbs-link:hover {
|
|
125
|
+
color: {{ settings.color_primary }};
|
|
126
|
+
text-decoration: underline;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.breadcrumbs-current {
|
|
130
|
+
color: {{ settings.color_text }};
|
|
131
|
+
font-weight: 500;
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
134
|
+
|