easyorders 0.1.0
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 +94 -0
- package/cli/bin/cli.ts +240 -0
- package/cli/server/api.ts +56 -0
- package/cli/server/index.ts +320 -0
- package/cli/server/token-store.ts +35 -0
- package/cli/server/tunnel.ts +161 -0
- package/cli/template/theme/config.json +123 -0
- package/cli/template/theme/schema.json +145 -0
- package/cli/template/theme/script.js +412 -0
- package/cli/template/theme/sections/breadcrumbs.liquid +17 -0
- package/cli/template/theme/sections/categories.liquid +10 -0
- package/cli/template/theme/sections/fake-counter.liquid +27 -0
- package/cli/template/theme/sections/fake-stock.liquid +6 -0
- package/cli/template/theme/sections/fake-visitor.liquid +6 -0
- package/cli/template/theme/sections/featured-products.liquid +110 -0
- package/cli/template/theme/sections/fixed-buy-button.liquid +46 -0
- package/cli/template/theme/sections/footer.liquid +129 -0
- package/cli/template/theme/sections/gallery.liquid +61 -0
- package/cli/template/theme/sections/header.liquid +152 -0
- package/cli/template/theme/sections/home-products-grid.liquid +110 -0
- package/cli/template/theme/sections/list-products.liquid +93 -0
- package/cli/template/theme/sections/order-invoice.liquid +154 -0
- package/cli/template/theme/sections/product-description.liquid +30 -0
- package/cli/template/theme/sections/product-details.liquid +63 -0
- package/cli/template/theme/sections/products-grid.liquid +86 -0
- package/cli/template/theme/sections/related-products.liquid +88 -0
- package/cli/template/theme/sections/reviews.liquid +55 -0
- package/cli/template/theme/sections/slider.liquid +43 -0
- package/cli/template/theme/sections/thanks.liquid +33 -0
- package/cli/template/theme/style.css +3923 -0
- package/cli/template/theme/theme-data.json +9 -0
- package/package.json +37 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
!(function () {
|
|
2
|
+
function e() {
|
|
3
|
+
var e = document.querySelector(".ab-header");
|
|
4
|
+
if (e && !e.dataset.scrollInit) {
|
|
5
|
+
e.dataset.scrollInit = "1";
|
|
6
|
+
var t = window.scrollY;
|
|
7
|
+
window.addEventListener(
|
|
8
|
+
"scroll",
|
|
9
|
+
function () {
|
|
10
|
+
var a = window.scrollY;
|
|
11
|
+
Math.abs(a - t) < 5 ||
|
|
12
|
+
(a > t && a > 100
|
|
13
|
+
? e.classList.add("ab-hidden")
|
|
14
|
+
: e.classList.remove("ab-hidden"),
|
|
15
|
+
(t = a));
|
|
16
|
+
},
|
|
17
|
+
{ passive: !0 }
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function t() {
|
|
22
|
+
var e = document.getElementById("eo-menu-btn"),
|
|
23
|
+
t = document.getElementById("eo-mobile-menu"),
|
|
24
|
+
a = document.getElementById("eo-mobile-overlay"),
|
|
25
|
+
n = document.getElementById("eo-mobile-close");
|
|
26
|
+
function r() {
|
|
27
|
+
t.classList.remove("ab-open"),
|
|
28
|
+
a && a.classList.remove("ab-open"),
|
|
29
|
+
(document.body.style.overflow = "");
|
|
30
|
+
}
|
|
31
|
+
e &&
|
|
32
|
+
t &&
|
|
33
|
+
!e.dataset.menuInit &&
|
|
34
|
+
((e.dataset.menuInit = "1"),
|
|
35
|
+
e.addEventListener("click", function () {
|
|
36
|
+
t.classList.add("ab-open"),
|
|
37
|
+
a && a.classList.add("ab-open"),
|
|
38
|
+
(document.body.style.overflow = "hidden");
|
|
39
|
+
}),
|
|
40
|
+
n && n.addEventListener("click", r),
|
|
41
|
+
a && a.addEventListener("click", r),
|
|
42
|
+
t.querySelectorAll(".ab-mobile-nav > a").forEach(function (e) {
|
|
43
|
+
e.addEventListener("click", r);
|
|
44
|
+
}),
|
|
45
|
+
t.querySelectorAll(".ab-mobile-accordion-panel a").forEach(function (e) {
|
|
46
|
+
e.addEventListener("click", r);
|
|
47
|
+
}),
|
|
48
|
+
t.querySelectorAll(".ab-mobile-accordion-trigger").forEach(function (e) {
|
|
49
|
+
e.dataset.accordionInit ||
|
|
50
|
+
((e.dataset.accordionInit = "1"),
|
|
51
|
+
e.addEventListener("click", function () {
|
|
52
|
+
var a = e.closest(".ab-mobile-accordion");
|
|
53
|
+
if (a) {
|
|
54
|
+
var n = a.classList.contains("ab-open");
|
|
55
|
+
t.querySelectorAll(".ab-mobile-accordion.ab-open").forEach(function (e) {
|
|
56
|
+
e !== a && e.classList.remove("ab-open");
|
|
57
|
+
}),
|
|
58
|
+
a.classList.toggle("ab-open", !n);
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function a() {
|
|
64
|
+
document.querySelectorAll(".ab-plist").forEach(function (e) {
|
|
65
|
+
if (!e.dataset.scrollArrowInit) {
|
|
66
|
+
e.dataset.scrollArrowInit = "1";
|
|
67
|
+
var t = e.querySelector(".ab-plist-track"),
|
|
68
|
+
a = e.querySelector(".ab-plist-prev"),
|
|
69
|
+
n = e.querySelector(".ab-plist-next");
|
|
70
|
+
t &&
|
|
71
|
+
(a &&
|
|
72
|
+
a.addEventListener("click", function () {
|
|
73
|
+
t.scrollBy({ left: -r(), behavior: "smooth" });
|
|
74
|
+
}),
|
|
75
|
+
n &&
|
|
76
|
+
n.addEventListener("click", function () {
|
|
77
|
+
t.scrollBy({ left: r(), behavior: "smooth" });
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
function r() {
|
|
81
|
+
var e = t.querySelector(".ab-plist-card");
|
|
82
|
+
if (!e) return 0.8 * t.clientWidth;
|
|
83
|
+
var a = getComputedStyle(t),
|
|
84
|
+
n = parseFloat(a.gap) || 16;
|
|
85
|
+
return e.offsetWidth + n;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function n() {
|
|
90
|
+
document.querySelectorAll(".ab-slider").forEach(function (e) {
|
|
91
|
+
if (!e.dataset.sliderInit) {
|
|
92
|
+
e.dataset.sliderInit = "1";
|
|
93
|
+
var t = e.querySelectorAll(".ab-slider-slide");
|
|
94
|
+
if (!(t.length < 2)) {
|
|
95
|
+
var a = e.querySelector(".ab-slider-progress-bar"),
|
|
96
|
+
n = e.querySelector(".ab-slider-pause"),
|
|
97
|
+
r = parseInt(e.dataset.autoplay) || 5e3,
|
|
98
|
+
o = 0,
|
|
99
|
+
i = !1,
|
|
100
|
+
c = 0,
|
|
101
|
+
l = null;
|
|
102
|
+
n &&
|
|
103
|
+
n.addEventListener("click", function () {
|
|
104
|
+
i
|
|
105
|
+
? d()
|
|
106
|
+
: ((i = !0), e.classList.add("ab-paused"), l && cancelAnimationFrame(l));
|
|
107
|
+
}),
|
|
108
|
+
d();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function s(e) {
|
|
112
|
+
if (!i) {
|
|
113
|
+
var n,
|
|
114
|
+
d = e - c,
|
|
115
|
+
u = Math.min((d / r) * 100, 100);
|
|
116
|
+
a && (a.style.width = u + "%"),
|
|
117
|
+
d >= r &&
|
|
118
|
+
((n = o + 1),
|
|
119
|
+
t[o].classList.remove("ab-active"),
|
|
120
|
+
(o = n % t.length),
|
|
121
|
+
t[o].classList.add("ab-active"),
|
|
122
|
+
(c = performance.now())),
|
|
123
|
+
(l = requestAnimationFrame(s));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function d() {
|
|
127
|
+
(i = !1),
|
|
128
|
+
e.classList.remove("ab-paused"),
|
|
129
|
+
(c = performance.now()),
|
|
130
|
+
(l = requestAnimationFrame(s));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function r() {
|
|
135
|
+
var e = document.querySelectorAll(".ab-reveal:not(.ab-observed)");
|
|
136
|
+
if (e.length) {
|
|
137
|
+
var t = new IntersectionObserver(
|
|
138
|
+
function (e) {
|
|
139
|
+
e.forEach(function (e) {
|
|
140
|
+
e.isIntersecting &&
|
|
141
|
+
(e.target.classList.add("ab-visible"), t.unobserve(e.target));
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
{ threshold: 0.1 }
|
|
145
|
+
);
|
|
146
|
+
e.forEach(function (e) {
|
|
147
|
+
e.classList.add("ab-observed"), t.observe(e);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function o() {
|
|
152
|
+
document.querySelectorAll(".ab-gallery").forEach(function (e) {
|
|
153
|
+
if (!e.dataset.galleryInit) {
|
|
154
|
+
e.dataset.galleryInit = "1";
|
|
155
|
+
var t = e.querySelector(".ab-gallery-main-media"),
|
|
156
|
+
a = e.querySelectorAll(".ab-gallery-thumb"),
|
|
157
|
+
n = [];
|
|
158
|
+
a.forEach(function (e) {
|
|
159
|
+
e.dataset.src && n.push(e.dataset.src);
|
|
160
|
+
}),
|
|
161
|
+
0 === n.length && t && n.push(t.src),
|
|
162
|
+
document.querySelectorAll("body > .ab-lightbox").forEach(function (e) {
|
|
163
|
+
e.remove();
|
|
164
|
+
});
|
|
165
|
+
var r = e.querySelector("[data-lightbox]");
|
|
166
|
+
r && document.body.appendChild(r);
|
|
167
|
+
var o = r && r.querySelector("[data-lightbox-img]"),
|
|
168
|
+
i = r && r.querySelector("[data-lightbox-counter]"),
|
|
169
|
+
c = 0;
|
|
170
|
+
a.forEach(function (n) {
|
|
171
|
+
n.addEventListener("click", function () {
|
|
172
|
+
var r = n.dataset.src;
|
|
173
|
+
r &&
|
|
174
|
+
t &&
|
|
175
|
+
((t.src = r),
|
|
176
|
+
a.forEach(function (e) {
|
|
177
|
+
e.classList.remove("ab-active");
|
|
178
|
+
}),
|
|
179
|
+
n.classList.add("ab-active"));
|
|
180
|
+
});
|
|
181
|
+
}),
|
|
182
|
+
e.querySelectorAll("[data-gallery-open]").forEach(function (e) {
|
|
183
|
+
e.addEventListener("click", function (e) {
|
|
184
|
+
if (!e.target.closest("[data-src]") && r) {
|
|
185
|
+
var a = t ? n.indexOf(t.src) : 0;
|
|
186
|
+
l(-1 === a ? 0 : a),
|
|
187
|
+
r.classList.add("ab-open"),
|
|
188
|
+
(document.body.style.overflow = "hidden");
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}),
|
|
192
|
+
r &&
|
|
193
|
+
r.addEventListener("click", function (e) {
|
|
194
|
+
var t = e.target;
|
|
195
|
+
if (t.closest("[data-lightbox-close]"))
|
|
196
|
+
return (
|
|
197
|
+
r.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
198
|
+
);
|
|
199
|
+
t.closest("[data-lightbox-prev]")
|
|
200
|
+
? l(c - 1)
|
|
201
|
+
: t.closest("[data-lightbox-next]") && l(c + 1);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function l(e) {
|
|
205
|
+
(c = ((e % n.length) + n.length) % n.length),
|
|
206
|
+
o && (o.src = n[c]),
|
|
207
|
+
i && (i.textContent = c + 1 + " / " + n.length);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function i() {
|
|
212
|
+
document.querySelectorAll(".ab-reviews").forEach(function (e) {
|
|
213
|
+
e.getAttribute("data-reviews-init") ||
|
|
214
|
+
(e.setAttribute("data-reviews-init", "1"),
|
|
215
|
+
e.querySelectorAll("[data-review-comment]").forEach(function (e) {
|
|
216
|
+
var t = document.createElement("button");
|
|
217
|
+
(t.className = "ab-review-read-more"),
|
|
218
|
+
(t.type = "button"),
|
|
219
|
+
(t.textContent = "...Read more"),
|
|
220
|
+
e.parentNode.insertBefore(t, e.nextSibling),
|
|
221
|
+
requestAnimationFrame(function () {
|
|
222
|
+
e.scrollHeight > e.clientHeight + 2 && t.classList.add("ab-visible");
|
|
223
|
+
}),
|
|
224
|
+
t.addEventListener("click", function () {
|
|
225
|
+
e.classList.contains("ab-review-expanded")
|
|
226
|
+
? (e.classList.remove("ab-review-expanded"),
|
|
227
|
+
(t.textContent = "...Read more"))
|
|
228
|
+
: (e.classList.add("ab-review-expanded"), (t.textContent = "Show less"));
|
|
229
|
+
});
|
|
230
|
+
}));
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function c() {
|
|
234
|
+
for (
|
|
235
|
+
var e = document.querySelectorAll(".ab-fake-counter"), t = 0;
|
|
236
|
+
t < e.length;
|
|
237
|
+
t++
|
|
238
|
+
) {
|
|
239
|
+
var a = e[t];
|
|
240
|
+
a.dataset.counterInit ||
|
|
241
|
+
((a.dataset.counterInit = "1"),
|
|
242
|
+
(function (e) {
|
|
243
|
+
var t = e.dataset.productId || "",
|
|
244
|
+
a = 36e5 * (parseFloat(e.dataset.hours) || 1);
|
|
245
|
+
try {
|
|
246
|
+
var n = localStorage.getItem("counter-" + t);
|
|
247
|
+
n && Number(n) > 36e4 && (a = Number(n));
|
|
248
|
+
} catch (e) {}
|
|
249
|
+
var r = Date.now() + a,
|
|
250
|
+
o = e.querySelector('[data-unit="days"]'),
|
|
251
|
+
i = e.querySelector('[data-unit="hours"]'),
|
|
252
|
+
c = e.querySelector('[data-unit="minutes"]'),
|
|
253
|
+
l = e.querySelector('[data-unit="seconds"]');
|
|
254
|
+
function s(e) {
|
|
255
|
+
return e < 10 ? "0" + e : String(e);
|
|
256
|
+
}
|
|
257
|
+
!(function e() {
|
|
258
|
+
var a = Math.max(0, r - Date.now()),
|
|
259
|
+
n = Math.floor(a / 1e3),
|
|
260
|
+
d = Math.floor(n / 86400);
|
|
261
|
+
n -= 86400 * d;
|
|
262
|
+
var u = Math.floor(n / 3600);
|
|
263
|
+
n -= 3600 * u;
|
|
264
|
+
var v = Math.floor(n / 60);
|
|
265
|
+
(n -= 60 * v),
|
|
266
|
+
o && (o.textContent = s(d)),
|
|
267
|
+
i && (i.textContent = s(u)),
|
|
268
|
+
c && (c.textContent = s(v)),
|
|
269
|
+
l && (l.textContent = s(n));
|
|
270
|
+
try {
|
|
271
|
+
localStorage.setItem("counter-" + t, String(a));
|
|
272
|
+
} catch (e) {}
|
|
273
|
+
a > 0 &&
|
|
274
|
+
requestAnimationFrame(function () {
|
|
275
|
+
setTimeout(e, 1e3);
|
|
276
|
+
});
|
|
277
|
+
})();
|
|
278
|
+
})(a));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function l() {
|
|
282
|
+
for (
|
|
283
|
+
var e = document.querySelectorAll(".ab-fake-visitor"), t = 0;
|
|
284
|
+
t < e.length;
|
|
285
|
+
t++
|
|
286
|
+
) {
|
|
287
|
+
var a = e[t];
|
|
288
|
+
a.dataset.visitorInit ||
|
|
289
|
+
((a.dataset.visitorInit = "1"),
|
|
290
|
+
(function (e) {
|
|
291
|
+
var t = parseInt(e.dataset.min, 10) || 10,
|
|
292
|
+
a = parseInt(e.dataset.max, 10) || 50,
|
|
293
|
+
n = e.querySelector(".ab-fv-count");
|
|
294
|
+
function r() {
|
|
295
|
+
return Math.floor(Math.random() * (a - t + 1)) + t;
|
|
296
|
+
}
|
|
297
|
+
n &&
|
|
298
|
+
((n.textContent = String(r())),
|
|
299
|
+
setInterval(function () {
|
|
300
|
+
n.textContent = String(r());
|
|
301
|
+
}, 3e3));
|
|
302
|
+
})(a));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function s() {
|
|
306
|
+
for (
|
|
307
|
+
var e = document.querySelectorAll(".lq-desc-accordion"), t = 0;
|
|
308
|
+
t < e.length;
|
|
309
|
+
t++
|
|
310
|
+
) {
|
|
311
|
+
var a = e[t];
|
|
312
|
+
a.dataset.descInit ||
|
|
313
|
+
((a.dataset.descInit = "1"),
|
|
314
|
+
a.addEventListener("click", function (e) {
|
|
315
|
+
var t = e.target.closest(".lq-desc-toggle");
|
|
316
|
+
if (t) {
|
|
317
|
+
var a = t.parentElement,
|
|
318
|
+
n = a.querySelector(".lq-desc-panel");
|
|
319
|
+
if (n)
|
|
320
|
+
"true" === a.getAttribute("data-open")
|
|
321
|
+
? (a.removeAttribute("data-open"),
|
|
322
|
+
t.setAttribute("aria-expanded", "false"),
|
|
323
|
+
(n.style.display = "none"))
|
|
324
|
+
: (a.setAttribute("data-open", "true"),
|
|
325
|
+
t.setAttribute("aria-expanded", "true"),
|
|
326
|
+
(n.style.display = "block"));
|
|
327
|
+
}
|
|
328
|
+
}));
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function u() {
|
|
332
|
+
document
|
|
333
|
+
.querySelectorAll('.ab-announce[data-ann-type="slider"]')
|
|
334
|
+
.forEach(function (e) {
|
|
335
|
+
if (!e.dataset.annSliderInit) {
|
|
336
|
+
e.dataset.annSliderInit = "1";
|
|
337
|
+
var t = e.querySelectorAll(".ab-ann-slide");
|
|
338
|
+
if (t.length < 2) return;
|
|
339
|
+
var a = 0;
|
|
340
|
+
setInterval(function () {
|
|
341
|
+
var n = t[a],
|
|
342
|
+
next = (a + 1) % t.length;
|
|
343
|
+
n.classList.remove("ab-active");
|
|
344
|
+
n.classList.add("ab-exit-left");
|
|
345
|
+
t[next].classList.add("ab-active");
|
|
346
|
+
setTimeout(function () {
|
|
347
|
+
n.classList.remove("ab-exit-left");
|
|
348
|
+
}, 500);
|
|
349
|
+
a = next;
|
|
350
|
+
}, 3e3);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
function v() {
|
|
355
|
+
document.querySelectorAll(".ab-ann-marquee").forEach(function (e) {
|
|
356
|
+
if (!e.dataset.marqueeInit) {
|
|
357
|
+
e.dataset.marqueeInit = "1";
|
|
358
|
+
var t = e.querySelector(".ab-ann-marquee-track");
|
|
359
|
+
if (!t) return;
|
|
360
|
+
var a = t.innerHTML,
|
|
361
|
+
n = t.scrollWidth,
|
|
362
|
+
r = e.offsetWidth;
|
|
363
|
+
if (n < 1) return;
|
|
364
|
+
var o = Math.ceil((2 * r) / n);
|
|
365
|
+
if (o < 2) o = 2;
|
|
366
|
+
t.innerHTML = "";
|
|
367
|
+
for (var i = 0; i < o; i++) t.insertAdjacentHTML("beforeend", a);
|
|
368
|
+
var c = t.scrollWidth / o,
|
|
369
|
+
l = Math.max(c / 40, 5);
|
|
370
|
+
t.style.setProperty("--marquee-dur", l + "s"),
|
|
371
|
+
t.style.setProperty("--marquee-offset", "-" + c + "px"),
|
|
372
|
+
t.classList.add("ab-running");
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
e(),
|
|
377
|
+
t(),
|
|
378
|
+
a(),
|
|
379
|
+
n(),
|
|
380
|
+
r(),
|
|
381
|
+
o(),
|
|
382
|
+
u(),
|
|
383
|
+
v(),
|
|
384
|
+
window.__abGalleryKeyInit ||
|
|
385
|
+
((window.__abGalleryKeyInit = !0),
|
|
386
|
+
document.addEventListener("keydown", function (e) {
|
|
387
|
+
var t = document.querySelector("body > .ab-lightbox.ab-open");
|
|
388
|
+
if (t) {
|
|
389
|
+
if ("Escape" === e.key)
|
|
390
|
+
return (
|
|
391
|
+
t.classList.remove("ab-open"), void (document.body.style.overflow = "")
|
|
392
|
+
);
|
|
393
|
+
if ("ArrowLeft" !== e.key)
|
|
394
|
+
if ("ArrowRight" !== e.key);
|
|
395
|
+
else {
|
|
396
|
+
var a = t.querySelector("[data-lightbox-next]");
|
|
397
|
+
a && a.click();
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
var n = t.querySelector("[data-lightbox-prev]");
|
|
401
|
+
n && n.click();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
})),
|
|
405
|
+
i(),
|
|
406
|
+
c(),
|
|
407
|
+
l(),
|
|
408
|
+
s(),
|
|
409
|
+
new MutationObserver(function () {
|
|
410
|
+
e(), t(), a(), n(), r(), o(), u(), v(), i(), c(), l(), s();
|
|
411
|
+
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
412
|
+
})();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<nav class="ab-breadcrumbs" aria-label="Breadcrumb">
|
|
2
|
+
<ol class="ab-breadcrumbs-list">
|
|
3
|
+
<li class="ab-breadcrumbs-item">
|
|
4
|
+
<a href="/">{{ home_text }}</a>
|
|
5
|
+
<span class="ab-breadcrumbs-sep">/</span>
|
|
6
|
+
</li>
|
|
7
|
+
{% for crumb in categories %}
|
|
8
|
+
<li class="ab-breadcrumbs-item">
|
|
9
|
+
<a href="/collections/{{ crumb.slug }}">{{ crumb.name }}</a>
|
|
10
|
+
<span class="ab-breadcrumbs-sep">/</span>
|
|
11
|
+
</li>
|
|
12
|
+
{% endfor %}
|
|
13
|
+
<li class="ab-breadcrumbs-item ab-breadcrumbs-current" aria-current="page">
|
|
14
|
+
{{ product_name }}
|
|
15
|
+
</li>
|
|
16
|
+
</ol>
|
|
17
|
+
</nav>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="ab-categories">
|
|
2
|
+
<div class="ab-categories-track">
|
|
3
|
+
{% for category in categories %}
|
|
4
|
+
<a href="/collections/{{ category.slug }}" class="ab-cat-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
5
|
+
<img src="{{ category.thumb }}" alt="{{ category.name }}" />
|
|
6
|
+
<span class="ab-cat-label">{{ category.name }}</span>
|
|
7
|
+
</a>
|
|
8
|
+
{% endfor %}
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div class="ab-fake-counter" data-product-id="{{ product_id }}" data-hours="{{ hours }}">
|
|
2
|
+
<div class="ab-fc-header">
|
|
3
|
+
<span class="ab-fc-icon" aria-hidden="true"></span>
|
|
4
|
+
<span class="ab-fc-title">{{ title }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="ab-fc-digits" dir="ltr">
|
|
7
|
+
<div class="ab-fc-unit">
|
|
8
|
+
<span class="ab-fc-num" data-unit="days">00</span>
|
|
9
|
+
<span class="ab-fc-label">{{ label_days }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
<span class="ab-fc-sep">:</span>
|
|
12
|
+
<div class="ab-fc-unit">
|
|
13
|
+
<span class="ab-fc-num" data-unit="hours">00</span>
|
|
14
|
+
<span class="ab-fc-label">{{ label_hours }}</span>
|
|
15
|
+
</div>
|
|
16
|
+
<span class="ab-fc-sep">:</span>
|
|
17
|
+
<div class="ab-fc-unit">
|
|
18
|
+
<span class="ab-fc-num" data-unit="minutes">00</span>
|
|
19
|
+
<span class="ab-fc-label">{{ label_minutes }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
<span class="ab-fc-sep">:</span>
|
|
22
|
+
<div class="ab-fc-unit">
|
|
23
|
+
<span class="ab-fc-num" data-unit="seconds">00</span>
|
|
24
|
+
<span class="ab-fc-label">{{ label_seconds }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<section class="ab-featured-products">
|
|
2
|
+
{% if section_title %}
|
|
3
|
+
<h2 class="ab-featured-section-title ab-reveal">{{ section_title }}</h2>
|
|
4
|
+
{% endif %}
|
|
5
|
+
<div class="ab-featured-layout">
|
|
6
|
+
<a
|
|
7
|
+
href="{% if category and category.slug %}/collections/{{ category.slug }}{% else %}#{% endif %}"
|
|
8
|
+
class="ab-featured-hero ab-reveal"
|
|
9
|
+
>
|
|
10
|
+
<img
|
|
11
|
+
src="{% if category and category.thumb %}{{ category.thumb }}{% elsif products and products[0] and products[0].thumb %}{{ products[0].thumb }}{% endif %}"
|
|
12
|
+
alt="{% if category and category.name %}{{ category.name }}{% else %}{{ section_title }}{% endif %}"
|
|
13
|
+
loading="lazy"
|
|
14
|
+
/>
|
|
15
|
+
<span class="ab-featured-hero-overlay"></span>
|
|
16
|
+
<div class="ab-featured-hero-content">
|
|
17
|
+
{% if category and category.name %}
|
|
18
|
+
<p class="ab-featured-hero-subtitle">{{ category.name }}</p>
|
|
19
|
+
{% endif %}
|
|
20
|
+
</div>
|
|
21
|
+
{% unless hide_view_all %}<span class="ab-featured-hero-cta">{{shop_now}}</span>{% endunless %}
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
<div class="ab-featured-grid">
|
|
25
|
+
{% for product in products limit: 4 %}
|
|
26
|
+
{% assign color_variation = product.variations | where: "type", "color" | first %}
|
|
27
|
+
{% assign image_variation = product.variations | where: "type", "image" | first %}
|
|
28
|
+
{% assign swatch_total = 0 %}
|
|
29
|
+
{% if color_variation and color_variation.props %}
|
|
30
|
+
{% assign swatch_total = color_variation.props.size %}
|
|
31
|
+
{% elsif image_variation and image_variation.props %}
|
|
32
|
+
{% assign swatch_total = image_variation.props.size %}
|
|
33
|
+
{% endif %}
|
|
34
|
+
|
|
35
|
+
<a href="/products/{{ product.slug }}" class="ab-featured-card ab-reveal" style="animation-delay: {{ forloop.index | times: 0.04 }}s">
|
|
36
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
37
|
+
{% assign discount = product.price | minus: product.sale_price | times: 100 | divided_by: product.price | floor %}
|
|
38
|
+
<span class="ab-featured-badge ab-sale-badge">{{ sale }} -{{ discount }}%</span>
|
|
39
|
+
{% endif %}
|
|
40
|
+
|
|
41
|
+
<div class="ab-featured-media">
|
|
42
|
+
<img class="ab-featured-img-primary" src="{{ product.thumb }}" alt="{{ product.name }}" loading="lazy" />
|
|
43
|
+
{% if product.images[0] %}
|
|
44
|
+
<img class="ab-featured-img-hover" src="{{ product.images[0] }}" alt="{{ product.name }}" loading="lazy" />
|
|
45
|
+
{% endif %}
|
|
46
|
+
{% comment %} Wishlist & Compare action buttons — dispatch custom events caught by the storefront JS layer
|
|
47
|
+
<div class="ab-card-actions">
|
|
48
|
+
<button
|
|
49
|
+
class="ab-wishlist-btn"
|
|
50
|
+
type="button"
|
|
51
|
+
aria-label="Add to wishlist"
|
|
52
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-wishlist',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
53
|
+
>
|
|
54
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
|
|
55
|
+
</button>
|
|
56
|
+
<button
|
|
57
|
+
class="ab-compare-btn"
|
|
58
|
+
type="button"
|
|
59
|
+
aria-label="Compare"
|
|
60
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('toggle-compare',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
61
|
+
>
|
|
62
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 8 16 13"/><line x1="21" y1="8" x2="9" y2="8"/><polyline points="8 21 3 16 8 11"/><line x1="3" y1="16" x2="15" y2="16"/></svg>
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
65
|
+
{% endcomment %}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="ab-featured-info">
|
|
69
|
+
<p class="ab-featured-name">{{ product.name }}</p>
|
|
70
|
+
<div class="ab-featured-price-row">
|
|
71
|
+
{% if product.sale_price and product.sale_price < product.price %}
|
|
72
|
+
<span class="ab-price-old">{{ product.price }} {{ currency }}</span>
|
|
73
|
+
<span class="ab-featured-price ab-price-sale">{{ product.sale_price }} {{ currency }}</span>
|
|
74
|
+
{% else %}
|
|
75
|
+
<span class="ab-featured-price">{{ product.price }} {{ currency }}</span>
|
|
76
|
+
{% endif %}
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<div class="ab-featured-bottom-row">
|
|
81
|
+
<div class="ab-featured-swatches">
|
|
82
|
+
{% if color_variation and color_variation.props %}
|
|
83
|
+
{% for prop in color_variation.props limit: 4 %}
|
|
84
|
+
<span class="ab-featured-swatch" style="background: {{ prop.value }}" title="{{ prop.name }}"></span>
|
|
85
|
+
{% endfor %}
|
|
86
|
+
{% elsif image_variation and image_variation.props %}
|
|
87
|
+
{% for prop in image_variation.props limit: 4 %}
|
|
88
|
+
<span class="ab-featured-swatch ab-featured-swatch-image" title="{{ prop.name }}">
|
|
89
|
+
<img src="{{ prop.value }}" alt="{{ prop.name }}" loading="lazy" />
|
|
90
|
+
</span>
|
|
91
|
+
{% endfor %}
|
|
92
|
+
{% endif %}
|
|
93
|
+
|
|
94
|
+
{% if swatch_total > 4 %}
|
|
95
|
+
<span class="ab-featured-swatch-more">+{{ swatch_total | minus: 4 }}</span>
|
|
96
|
+
{% endif %}
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<button
|
|
100
|
+
class="ab-featured-add-btn"
|
|
101
|
+
type="button"
|
|
102
|
+
onclick="event.preventDefault();event.stopPropagation();this.dispatchEvent(new CustomEvent('quick-add',{bubbles:true,detail:{productId:'{{ product.id }}'}}));"
|
|
103
|
+
>{{add}}</button>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</a>
|
|
107
|
+
{% endfor %}
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</section>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<div class="ab-fixed-buy">
|
|
2
|
+
{% if thumb and thumb != "" %}
|
|
3
|
+
<div class="ab-fixed-buy-preview">
|
|
4
|
+
<img class="ab-fixed-buy-thumb" src="{{ thumb }}" alt="{{ product_name }}" />
|
|
5
|
+
<div class="ab-fixed-buy-info">
|
|
6
|
+
<span class="ab-fixed-buy-name">{{ product_name }}</span>
|
|
7
|
+
<div class="ab-fixed-buy-price-row">
|
|
8
|
+
{% if sale_price and sale_price < price %}
|
|
9
|
+
<span class="ab-fixed-buy-price-old">{{ price }} {{ currency }}</span>
|
|
10
|
+
<span class="ab-fixed-buy-price ab-fixed-buy-price-sale">{{ sale_price }} {{ currency }}</span>
|
|
11
|
+
{% else %}
|
|
12
|
+
<span class="ab-fixed-buy-price">{{ price }} {{ currency }}</span>
|
|
13
|
+
{% endif %}
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
{% endif %}
|
|
18
|
+
|
|
19
|
+
{% unless hide_quantity %}
|
|
20
|
+
<div class="ab-fixed-buy-qty">
|
|
21
|
+
<button
|
|
22
|
+
class="ab-fixed-buy-qty-btn"
|
|
23
|
+
type="button"
|
|
24
|
+
onclick="this.dispatchEvent(new CustomEvent('increment-quantity',{bubbles:true}));"
|
|
25
|
+
{% if increase_disabled %}disabled{% endif %}
|
|
26
|
+
>
|
|
27
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M7 1v12M1 7h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
|
|
28
|
+
</button>
|
|
29
|
+
<span class="ab-fixed-buy-qty-value">{{ quantity }}</span>
|
|
30
|
+
<button
|
|
31
|
+
class="ab-fixed-buy-qty-btn"
|
|
32
|
+
type="button"
|
|
33
|
+
onclick="this.dispatchEvent(new CustomEvent('decrement-quantity',{bubbles:true}));"
|
|
34
|
+
>
|
|
35
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M1 7h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
{% endunless %}
|
|
39
|
+
|
|
40
|
+
<button
|
|
41
|
+
class="ab-fixed-buy-btn"
|
|
42
|
+
type="button"
|
|
43
|
+
{% if disabled %}disabled{% endif %}
|
|
44
|
+
onclick="event.preventDefault();this.dispatchEvent(new CustomEvent('buy-now',{bubbles:true}));"
|
|
45
|
+
>{{ buy_now_text }}</button>
|
|
46
|
+
</div>
|