wickes-css2 2.98.0-develop.12 → 2.98.0-develop.14
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 +2 -1
- package/build/css/main.css +1 -1
- package/build/css/pages/checkout-new.css +1 -1
- package/build/css/pages/page_product-details-v2.css +1 -1
- package/build/css/pdp-main-before-combine.css +1 -1
- package/build/css/pdp-main-non-critical.css +1 -1
- package/build/css/pdp-main.css +1 -1
- package/build/js/basket.min.js +2 -2
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +2 -2
- package/build/js/emulation.min.js +3 -3
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/page/components/order-summary.js +1 -1
- 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/package.json +2 -2
- package/src/js/components/general/offer-banner.js +65 -16
- package/src/js/emulation/basket-data.js +3 -3
- package/src/js/page/components/order-summary.js +1 -1
- package/src/scss/components/_billie-modal.scss +10 -0
- package/src/scss/components/_order-summary.scss +7 -48
- package/src/scss/components/_voucher-accordion.scss +56 -0
- package/src/scss/main.scss +1 -0
- package/src/scss/pages/page_product-details-v2.scss +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wickes-css2",
|
|
3
|
-
"version": "2.98.0-develop.
|
|
3
|
+
"version": "2.98.0-develop.14",
|
|
4
4
|
"description": "CSS and JS and page templates in use by Wickes",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"branches": [
|
|
109
109
|
"alt-master",
|
|
110
110
|
{
|
|
111
|
-
"name": "
|
|
111
|
+
"name": "custom-tag/0.5.0-icons",
|
|
112
112
|
"prerelease": "${name.replace(/^custom-tag\\//g, '')}"
|
|
113
113
|
}
|
|
114
114
|
],
|
|
@@ -1,16 +1,67 @@
|
|
|
1
1
|
$(document).ready(function () {
|
|
2
2
|
Wick.OfferBanner = (function () {
|
|
3
3
|
var offerBanner = $('.offer-banner')[0],
|
|
4
|
-
|
|
4
|
+
offer;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var selectors = [
|
|
7
|
+
'main > div > div > div:nth-child(1) > div > h1',
|
|
8
|
+
'main > div.hybris-class > div > h1:nth-child(1)',
|
|
9
|
+
'main > div.cartMessages',
|
|
10
|
+
'main div.checkout-header',
|
|
11
|
+
'main.my-account',
|
|
12
|
+
'div.new-usp-container',
|
|
13
|
+
'div.breadcrumbs'
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
var targetContainers = ['main', 'div.new-usp-container', 'div.breadcrumbs'];
|
|
17
|
+
|
|
18
|
+
Wick.applyTopMarginIfBanner = function () {
|
|
19
|
+
if (!Wick.isTradePro) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!offerBanner) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let bannerHeight = $(offerBanner).outerHeight();
|
|
28
|
+
|
|
29
|
+
var containers = new Set();
|
|
30
|
+
var containersSelector = targetContainers.join(', ');
|
|
31
|
+
|
|
32
|
+
selectors.forEach(function (sel) {
|
|
33
|
+
var elements = $(sel);
|
|
34
|
+
if (!elements.length) return;
|
|
35
|
+
|
|
36
|
+
elements.each(function () {
|
|
37
|
+
var container = $(this).closest(containersSelector);
|
|
38
|
+
if (container.length) {
|
|
39
|
+
containers.add(container[0]);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
var hasBreadcrumbs = Array.from(containers).some(el => $(el).is('div.breadcrumbs'));
|
|
45
|
+
|
|
46
|
+
if (hasBreadcrumbs) {
|
|
47
|
+
containers = new Set(
|
|
48
|
+
Array.from(containers).filter(el => $(el).is('div.breadcrumbs'))
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
containers.forEach(function (el) {
|
|
53
|
+
$(el).css('margin-top', bannerHeight + 'px');
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
var init = function () {
|
|
7
58
|
offer = new Waypoint.Sticky({
|
|
8
59
|
element: offerBanner
|
|
9
60
|
});
|
|
10
61
|
};
|
|
11
62
|
|
|
12
|
-
var toggle = function(){
|
|
13
|
-
if (offer){
|
|
63
|
+
var toggle = function () {
|
|
64
|
+
if (offer) {
|
|
14
65
|
offer.destroy();
|
|
15
66
|
offer = null;
|
|
16
67
|
} else {
|
|
@@ -18,21 +69,19 @@ $(document).ready(function () {
|
|
|
18
69
|
}
|
|
19
70
|
};
|
|
20
71
|
|
|
21
|
-
function handleResize(){
|
|
22
|
-
if (!offer){
|
|
72
|
+
function handleResize() {
|
|
73
|
+
if (!offer) {
|
|
23
74
|
return;
|
|
24
75
|
}
|
|
25
|
-
|
|
26
76
|
var elHeight = offer.$element.outerHeight(true);
|
|
27
|
-
if (elHeight !== offer.$wrapper.outerHeight(true)){
|
|
77
|
+
if (elHeight !== offer.$wrapper.outerHeight(true)) {
|
|
28
78
|
offer.$wrapper.height(elHeight);
|
|
29
79
|
}
|
|
30
|
-
}
|
|
80
|
+
}
|
|
31
81
|
|
|
32
|
-
var bindEvents = function(){
|
|
82
|
+
var bindEvents = function () {
|
|
33
83
|
$(window).on('resize', handleResize);
|
|
34
84
|
$(window).on('orientationchange', handleResize);
|
|
35
|
-
|
|
36
85
|
$(document).on('mobileNav.toggle', toggle);
|
|
37
86
|
};
|
|
38
87
|
|
|
@@ -40,13 +89,11 @@ $(document).ready(function () {
|
|
|
40
89
|
return;
|
|
41
90
|
}
|
|
42
91
|
|
|
43
|
-
//Workaround for sticky banner functionality in IE
|
|
92
|
+
// Workaround for sticky banner functionality in IE
|
|
44
93
|
function isIE() {
|
|
45
|
-
ua = navigator.userAgent;
|
|
94
|
+
var ua = navigator.userAgent;
|
|
46
95
|
/* MSIE used to detect old browsers and Trident used to newer ones*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return is_ie;
|
|
96
|
+
return ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
|
|
50
97
|
}
|
|
51
98
|
|
|
52
99
|
if (isIE()) {
|
|
@@ -54,6 +101,8 @@ $(document).ready(function () {
|
|
|
54
101
|
bindEvents();
|
|
55
102
|
}
|
|
56
103
|
|
|
104
|
+
Wick.applyTopMarginIfBanner();
|
|
105
|
+
|
|
57
106
|
return offer;
|
|
58
107
|
})();
|
|
59
108
|
});
|
|
@@ -879,12 +879,12 @@ Wick.BasketData = (function () {
|
|
|
879
879
|
"appliedProductPromotions": [],
|
|
880
880
|
"appliedOrderPromotions": [],
|
|
881
881
|
"promotionsInfo": null,
|
|
882
|
-
"clickAndCollectOnly":
|
|
882
|
+
"clickAndCollectOnly": false,
|
|
883
883
|
"deliveryItemsQuantity": 1,
|
|
884
884
|
"pickupItemsQuantity": 2,
|
|
885
|
-
"freeDelivery":
|
|
885
|
+
"freeDelivery": true,
|
|
886
886
|
"subtotalWithoutCharity": {"value": 19.0, "formattedValue": "£19.00", "currencyIso": "GBP", "formattedPriceWithoutCurrencySymbol": "19.00"},
|
|
887
|
-
"messageForFreeDelivery":
|
|
887
|
+
"messageForFreeDelivery": "Free delivery<i class=\"icon fas fa-check\"></i>",
|
|
888
888
|
"pickupOrderGroups": [
|
|
889
889
|
{
|
|
890
890
|
"entries": [
|
|
@@ -80,7 +80,7 @@ function calculateFreeDelivery(data) {
|
|
|
80
80
|
$(this).find(osEl.summaryDelivery).before(function () {
|
|
81
81
|
return `
|
|
82
82
|
<div class="checkout-widget__item checkout-widget__item-free">
|
|
83
|
-
<span>
|
|
83
|
+
<span class="checkout-widget__text">
|
|
84
84
|
${data.messageForFreeDelivery}
|
|
85
85
|
</span>
|
|
86
86
|
</div>
|
|
@@ -113,50 +113,6 @@ $ios-notch-offset: 80px !default;
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.checkout-widget {
|
|
117
|
-
&__voucher-accordion {
|
|
118
|
-
margin-top: 10px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&__voucher-toggle {
|
|
122
|
-
margin-bottom: 8px;
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
display: flex;
|
|
125
|
-
justify-content: space-between;
|
|
126
|
-
color: $blue;
|
|
127
|
-
font-size: .875rem;
|
|
128
|
-
|
|
129
|
-
&.collapsed {
|
|
130
|
-
margin-bottom: 0;
|
|
131
|
-
|
|
132
|
-
.checkout-widget__icon {
|
|
133
|
-
transform: rotate(180deg);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&__icon {
|
|
139
|
-
width: 16px;
|
|
140
|
-
height: 16px;
|
|
141
|
-
display: flex;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
align-items: center;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&__voucher-section {
|
|
147
|
-
margin-top: 1rem;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&__voucher-list {
|
|
151
|
-
list-style: none;
|
|
152
|
-
padding: 0;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&__voucher-value {
|
|
156
|
-
font-weight: bold;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
116
|
.summary__mobile-order.collapsed .summary__icon {
|
|
161
117
|
transform: rotate(0deg);
|
|
162
118
|
}
|
|
@@ -176,11 +132,14 @@ $ios-notch-offset: 80px !default;
|
|
|
176
132
|
}
|
|
177
133
|
|
|
178
134
|
.checkout-widget__item-free {
|
|
135
|
+
line-height: 1.375rem;
|
|
136
|
+
|
|
179
137
|
.icon {
|
|
180
|
-
margin-left:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
138
|
+
margin-left: 8px;
|
|
139
|
+
vertical-align: middle;
|
|
140
|
+
color: $green;
|
|
141
|
+
width: 1rem;
|
|
142
|
+
height: 1rem;
|
|
184
143
|
}
|
|
185
144
|
}
|
|
186
145
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import '../helpers/helpers';
|
|
2
|
+
|
|
3
|
+
.checkout-widget {
|
|
4
|
+
&__voucher-accordion {
|
|
5
|
+
margin-top: 10px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__voucher-toggle {
|
|
9
|
+
margin-bottom: 8px;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
color: $blue;
|
|
14
|
+
font-size: .875rem;
|
|
15
|
+
|
|
16
|
+
&.collapsed {
|
|
17
|
+
margin-bottom: 0;
|
|
18
|
+
|
|
19
|
+
.checkout-widget__icon {
|
|
20
|
+
transform: rotate(180deg);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__icon {
|
|
26
|
+
width: 16px;
|
|
27
|
+
height: 16px;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__voucher-section {
|
|
34
|
+
margin-top: 1rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__voucher-list {
|
|
38
|
+
list-style: none;
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__voucher-value {
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.collapsing {
|
|
48
|
+
height: 0;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
transition: height .3s ease-in-out;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.collapse.show {
|
|
54
|
+
height: auto;
|
|
55
|
+
transition: height .3s ease-in-out;
|
|
56
|
+
}
|
package/src/scss/main.scss
CHANGED
|
@@ -134,6 +134,15 @@
|
|
|
134
134
|
&__main {
|
|
135
135
|
padding-top: 40px;
|
|
136
136
|
|
|
137
|
+
:where(ul, ol) {
|
|
138
|
+
list-style: revert;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:where(li) {
|
|
142
|
+
display: list-item;
|
|
143
|
+
list-style: inherit;
|
|
144
|
+
}
|
|
145
|
+
|
|
137
146
|
@include media-breakpoint-only(md) {
|
|
138
147
|
padding-top: 35px;
|
|
139
148
|
}
|