-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Grsm
committed
Nov 23, 2022
1 parent
1d507f1
commit 03a1984
Showing
8 changed files
with
131 additions
and
80 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const breadCrumbs = () => { | ||
if (window.matchMedia('(max-width: 575.98px)').matches) { | ||
const breadcrumbs = document.querySelector('#breadcrumbs'), | ||
breadCrumbsBtn = document.querySelector('.bread-home__btn'), | ||
breadCrumbsLi = document.querySelectorAll('.breadcrumbs li:not(:first-child)'); | ||
|
||
breadCrumbsBtn.addEventListener('click', () => { | ||
breadcrumbs.classList.toggle('is-show'); | ||
|
||
breadCrumbsLi.forEach(li => { | ||
li.classList.toggle('fadeIn'); | ||
}); | ||
}); | ||
} | ||
}; | ||
|
||
export default breadCrumbs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
<div class="container breadcrumbs__container animated faster fadeIn"> | ||
<ul class="list-reset breadcrumbs" id="breadcrumbs"> | ||
<li><a href="/"><img loading="lazy" src="/img/icon-home.svg" class="image" width="24" height="25" alt="Home"></a></li> | ||
<li><a href="/catalog-1.html">Brands</a></li> | ||
<li><a href="/catalog-2.html">Catalog</a></li> | ||
<li><a href="/product-card.html">Product</a></li> | ||
<li class="bread-home"> | ||
<a href="/"><img loading="lazy" src="/img/icon-home.svg" class="image" width="24" height="25" alt="Home"><span>Main</span></a> | ||
<span class="bread-home__btn"> | ||
<img loading="lazy" src="/img/angle-down.svg" class="b-icon bread-home__btn--open" width="12" height="8" alt="X"> | ||
<img loading="lazy" src="/img/icon-close.svg" class="b-icon bread-home__btn--close" width="12" height="12" alt="X"> | ||
</span> | ||
</li> | ||
<li class="animated faster"><a href="/catalog-1.html">Brands</a></li> | ||
<li class="animated faster"><a href="/catalog-2.html">Catalog</a></li> | ||
<li class="animated faster"><a href="/product-card.html">Product</a></li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters