{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block stylesheet %}
<style>
.ec-headerNavSP {
display: none;
border: 1px solid #eee;
box-shadow: 1px 1px 1px #c5c5c5;
font-size: 22px;
padding: 28px;
}
</style>
{% endblock %}
<div class="ec-headerNavSP">
<i class="fas fa-bars"></i>
</div>
{% block javascript %}
<script>
const spNavModule = () => {
const spNavAnimation = () => {
const spNav = document.querySelector('.ec-headerNavSP')
const navBorderline = 150
if(window.innerWidth < 768) {
window.pageYOffset > navBorderline ?
spNav.style.display = "block" :
spNav.style.display = "none"
}
}
window.addEventListener('scroll', spNavAnimation)
}
const exceptList = ['cart', 'shopping', 'entry', 'contact', 'mypage/login', 'mypage/change', 'mypage/delivery', 'mypage/withdraw']
const path = location.pathname
for(let pattern of exceptList) {
let reg = new RegExp('^\/' + pattern + '.*', 'i')
result = reg.test(path) ? true : false
if(result === true) break
}
result === false ? spNavModule() : null
</script>
{% endblock %}