Skip to content

Commit cff3a23

Browse files
committed
Squashed 'template/pages/' changes from a930b56..a293c38
a293c38 Update with @ecomplus/storefront-template v2.0.0-beta.176 git-subtree-dir: template/pages git-subtree-split: a293c381891ff22e3b37d0671bb6954aa52798bf
1 parent 4258323 commit cff3a23

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

@/layout/header.ejs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,13 @@ const hasMegamenu = header.desktop_megamenu
255255
<% if (categories && categories.length) { %>
256256
<div class="d-none d-lg-block <%= isCategoriesNavFull ? 'col-12 order-lg-last' : 'col' %>">
257257
<nav class="header__nav<%= isCategoriesNavFull ? ' header__nav--full' : '' %>">
258-
<% categories.forEach(({ slug, name}) => { %>
258+
<% categories.forEach(({ slug, name, _id}) => { %>
259259
<% let $categoryLink %>
260260
<div class="d-inline-block">
261261
<a
262262
href="javascript:;"
263263
class="header__category"
264+
id="cd-<%= _id %>"
264265
<%- hasMegamenu
265266
? `onmouseover="toggleSubmenu('${slug}', this)" onclick="toggleSubmenu('${slug}', this, true)"`
266267
: `onclick="toggleSidenav('${slug}')"` %>
@@ -274,10 +275,10 @@ const hasMegamenu = header.desktop_megamenu
274275
<nav class="header__submenu" id="<%= `s-${slug.replace(/\//g, '_')}` %>">
275276
<% subcategories.forEach(subcategory => { %>
276277
<div>
277-
<a href="/<%= subcategory.slug %>"><%= subcategory.name %></a>
278+
<a id="sd-<%= subcategory._id %>" href="/<%= subcategory.slug %>"><%= subcategory.name %></a>
278279
<% const thirdCategories = _.categories.filter(({ parent }) => parent && parent.slug === subcategory.slug) %>
279280
<% thirdCategories.forEach(thirdCategory => { %>
280-
<a class="header__submenu-subcategory" href="/<%= thirdCategory.slug %>">
281+
<a id="td-<%= thirdCategory._id %>" class="header__submenu-subcategory" href="/<%= thirdCategory.slug %>">
281282
<%= thirdCategory.name %>
282283
</a>
283284
<% }) %>

@/sections/info-bar.ejs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const barCols = []
88
['promo', 'percent']
99
].forEach(([prop, icon]) => {
1010
if (info[prop] && info[prop].show) {
11-
const { link, text } = info[prop]
12-
barCols.push({ link, text, icon })
11+
const { link, title, text } = info[prop]
12+
barCols.push({ link, title, text, icon })
1313
}
1414
})
1515
%>
@@ -18,14 +18,21 @@ const barCols = []
1818
<section class="info-bar">
1919
<div class="container">
2020
<div class="info-bar__nav row">
21-
<% barCols.forEach(({ link, icon, text }) => { %>
21+
<% barCols.forEach(({ link, icon, title, text }) => { %>
2222
<div class="col-auto col-sm-6 col-lg">
2323
<a class="info-bar__item" href="<%= link || 'javascript:;' %>">
2424
<span class="rounded-icon">
2525
<i class="i-<%= icon %>"></i>
2626
</span>
2727
<div class="ml-2 ml-md-3">
28-
<%= text %>
28+
<% if(title) { %>
29+
<div class="info-bar__title">
30+
<%= title %>
31+
</div>
32+
<% } %>
33+
<div class="info-bar__text">
34+
<%= text %>
35+
</div>
2936
</div>
3037
</a>
3138
</div>

0 commit comments

Comments
 (0)