wickes-css2 2.109.0-develop.6 → 2.109.0-develop.7
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 +0 -1
- package/build/css/components/card-product-banner.css +1 -1
- package/build/css/components/special-opening-schedule-v2.css +1 -1
- package/build/css/components/special-opening-schedule.css +1 -1
- package/build/css/emulation.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/my-account-main-v2.css +1 -1
- package/build/css/my-account-main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/page_merged-basket.css +1 -1
- package/build/css/pages/page_store-locator-details.css +1 -1
- package/build/css/pages/page_store-locator.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/css/store-locator-main.css +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/emulation.min.js +340 -110
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/page/components/store-locator-cards.js +76 -0
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -1
- package/build/js/store-locator-cards.min.js +1 -0
- package/package.json +1 -1
- package/src/components/card-store-locator.hbs +70 -33
- package/src/components/card_bloomreach_media_banner.hbs +10 -0
- package/src/components/card_sponsor_banner.hbs +1 -1
- package/src/data/data_locators.json +441 -135
- package/src/data/data_search-results_v2.json +11 -0
- package/src/js/components/general/accordion.js +25 -2
- package/src/js/emulation/banner-placement-manager.js +235 -34
- package/src/js/emulation/gift-cards.js +1 -1
- package/src/js/emulation/store-locator-load-more.js +69 -0
- package/src/js/page/components/store-locator-cards.js +76 -0
- package/src/page_plp_bloomreach.html +81 -0
- package/src/page_plp_v2.html +5 -0
- package/src/page_store-locator-list.html +18 -28
- package/src/scss/components/_card-store-locator.scss +139 -32
- package/src/scss/components/card-product-banner.scss +35 -35
- package/src/scss/components/special-opening-schedule-v2.scss +2 -6
- package/src/scss/components/special-opening-schedule.scss +17 -4
- package/src/scss/emulation.scss +0 -6
- package/src/scss/pages/page_store-locator.scss +48 -26
- package/src/scss/store-locator-main.scss +15 -1
- package/src/sitemap.html +1 -0
- package/src/js/emulation/store-locator-list.js +0 -19
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var Wick = window.Wick || (window.Wick = {});
|
|
2
|
+
|
|
3
|
+
Wick.StoreCardsAlign = (function () {
|
|
4
|
+
const SELECTORS = {
|
|
5
|
+
card: '.card-store',
|
|
6
|
+
info: '.card-store__info',
|
|
7
|
+
accordionHeader: '.opening-times-accordion__header',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let resizeTimeout;
|
|
11
|
+
|
|
12
|
+
function alignCardInfoHeights() {
|
|
13
|
+
const rows = [];
|
|
14
|
+
|
|
15
|
+
$(SELECTORS.card).each(function () {
|
|
16
|
+
const $card = $(this);
|
|
17
|
+
const top = $card.offset().top;
|
|
18
|
+
|
|
19
|
+
let row = rows.find((r) => Math.abs(r.top - top) < 5);
|
|
20
|
+
|
|
21
|
+
if (!row) {
|
|
22
|
+
row = { top: top, items: [] };
|
|
23
|
+
rows.push(row);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
row.items.push($card);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
rows.forEach((row) => {
|
|
30
|
+
let maxHeight = 0;
|
|
31
|
+
|
|
32
|
+
// reset
|
|
33
|
+
row.items.forEach(($card) => {
|
|
34
|
+
$card.find(SELECTORS.info).css('min-height', '');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// find max
|
|
38
|
+
row.items.forEach(($card) => {
|
|
39
|
+
const h = $card.find(SELECTORS.info).outerHeight();
|
|
40
|
+
if (h > maxHeight) maxHeight = h;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// apply
|
|
44
|
+
row.items.forEach(($card) => {
|
|
45
|
+
$card.find(SELECTORS.info).css('min-height', maxHeight + 'px');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function bindEvents() {
|
|
51
|
+
// load
|
|
52
|
+
$(window).on('load', alignCardInfoHeights);
|
|
53
|
+
|
|
54
|
+
// resize
|
|
55
|
+
$(window).on('resize', () => {
|
|
56
|
+
clearTimeout(resizeTimeout);
|
|
57
|
+
resizeTimeout = setTimeout(alignCardInfoHeights, 100);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// accordion
|
|
61
|
+
$(document).on('click', SELECTORS.accordionHeader, () => {
|
|
62
|
+
setTimeout(alignCardInfoHeights, 0);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function init() {
|
|
67
|
+
bindEvents();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
init();
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
init: init,
|
|
74
|
+
align: alignCardInfoHeights,
|
|
75
|
+
};
|
|
76
|
+
})();
|