wickes-css2 2.96.0-develop.4 → 2.96.0-develop.5

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.
@@ -34,7 +34,7 @@ Wick.MainNav = (function () {
34
34
  <ul class="main-nav__menu">
35
35
  ${menuSection.children.map(createMainNavItems).join('')}
36
36
  </ul>
37
- </div>
37
+ </div>
38
38
  </li>
39
39
  `
40
40
  } else {
@@ -66,6 +66,9 @@ Wick.MainNav = (function () {
66
66
  function createMainNavItems(menuSection) {
67
67
  if (menuSection) {
68
68
  if (menuSection.children && menuSection.children.length) {
69
+ if(menuSection.originalChildrenCount) {
70
+ console.log(menuSection)
71
+ }
69
72
  return `
70
73
  <li class="main-nav__menu__item nav-col">
71
74
  <a href="${checkUrl(menuSection)}" class="main-nav__menu__label ${setClass(menuSection, 2)}" tabindex="0" ${setColor(menuSection)}>
@@ -259,25 +262,31 @@ Wick.MainNav = (function () {
259
262
  });
260
263
  }
261
264
 
262
- checkIfRealEnvironment();
265
+ function isSSR() {
266
+ return $mainNav.attr('data-ssr') === 'true'
267
+ }
268
+
269
+ if (isSSR()) {
270
+ Wick.Nav();
271
+ Wick.Responsive.callBr();
272
+ } else {
273
+ checkIfRealEnvironment();
274
+ }
263
275
  }
264
276
  }
265
277
  })();
266
278
 
267
279
  $(document).ready(function () {
268
- function init() {
269
- const defaultOptions = {
270
- type: 'GET',
271
- cache: true,
272
- link: window.location.origin,
273
- local: false
274
- };
280
+ const defaultOptions = {
281
+ type: 'GET',
282
+ cache: true,
283
+ link: window.location.origin,
284
+ local: false
285
+ };
275
286
 
276
- if (!$('#main-nav').length) {
277
- return;
278
- }
279
- Wick.MainNav.createMainNav(defaultOptions);
287
+ if (!$('#main-nav').length) {
288
+ return;
280
289
  }
281
290
 
282
- init();
291
+ Wick.MainNav.createMainNav(defaultOptions);
283
292
  });
@@ -1,19 +1,21 @@
1
1
  var Wick = Wick || {};
2
- Wick.MainNavLocal = (function(){
2
+
3
+ Wick.MainNavLocal = function(){
3
4
  function init() {
4
5
  var localOptions = {
5
6
  local: true,
6
7
  mockData: Wick.MainNavData.returnData()
7
8
  };
8
9
 
9
- if (!$('#main-nav').length) {
10
+ if (!$('#main-nav').length || !$('.ssc-nav').length) {
10
11
  return;
11
12
  }
12
13
 
14
+
13
15
  setTimeout(()=> {
14
16
  Wick.MainNav.createMainNav(localOptions);
15
17
  }, 2000)
16
18
  }
17
19
 
18
- init();
19
- })();
20
+ init()
21
+ }();
@@ -0,0 +1,10 @@
1
+ {{#extend "base" pageClass="" title="Old navigation" oldNav=true hideBreadcrumbs=true pageBasket=true}}
2
+ {{#content "body"}}
3
+ <main>
4
+ <div class="container">
5
+ <h1 class="page-header__title">That example old navigation</h1>
6
+ <p class="page-header__intro">Must be skeleton and after loading navigation</p>
7
+ </div>
8
+ </main>
9
+ {{/content}}
10
+ {{/extend}}
@@ -1,6 +1,10 @@
1
1
  <a id="skip-to-navigation"></a>
2
- <nav class="main-nav" id="main-nav">
3
- {{>skeleton-nav}}
2
+ <nav class="main-nav" id="main-nav" data-ssr="{{#unless oldNav}}true{{/unless}}">
3
+ {{#if oldNav}}
4
+ {{> skeleton-nav}}
5
+ {{else}}
6
+ {{> navigation/nav-wrapper }}
7
+ {{/if }}
4
8
  {{#unless tradepro-nav}}
5
9
  <div class="main-nav__button" data-logged-in="false">
6
10
  <a href="/login.html" class="nav-button">
@@ -215,6 +215,11 @@
215
215
  opacity: 0;
216
216
  animation: fade-in .5s ease-in-out forwards;
217
217
 
218
+ .main-nav[data-ssr='true'] &:not(.slide-in):not(.slide-in-l2r) {
219
+ opacity: 1;
220
+ animation: none;
221
+ }
222
+
218
223
  &_order-line {
219
224
  color: $blue;
220
225
  }
@@ -947,6 +952,10 @@
947
952
  padding: 0;
948
953
  gap: 30px;
949
954
 
955
+ &-banner {
956
+ display: none;
957
+ }
958
+
950
959
  &__label {
951
960
  margin-bottom: 10px;
952
961
  padding: 0 10px;
package/src/sitemap.html CHANGED
@@ -921,6 +921,17 @@
921
921
  </a>
922
922
  </li>
923
923
  </ul>
924
+ <h3>
925
+ Old Navigation
926
+ </h3>
927
+ <ul>
928
+ <li>
929
+ <span class="page-id">1</span>
930
+ <a href="page_old-navigation.html" target="_blank">
931
+ Page with old navigation
932
+ </a>
933
+ </li>
934
+ </ul>
924
935
  </div>
925
936
  <div class="col">
926
937
  <h3>Basket</h3>