{% block main %}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NAKATOMI ナビゲーション</title>
<style>
/* --- 全体ボックス --- */
.box_main_list {
background-color: #999999;
width: 100%;
height: auto;
margin-top: 4vh;
}
/* --- aタグの色維持 --- */
a,a:hover,a:visited{
color: inherit;
text-decoration: none;
}
/* --- ナビ全体 --- */
#g_navi {
position: relative;
width: 100%;
background: #097ecc;
z-index: 10000;
font-size: 16px;
}
/* --- メニュー(PC用) --- */
#g_navi ul {
display: flex;
margin: 0 auto;
padding: 0 3%;
width: 94%;
max-width: 1280px;
list-style-type: none;
transition: transform 0.3s ease;
}
#g_navi ul li {
position: relative;
width: 25%;
}
#g_navi ul li:first-child::before {
position: absolute;
display: block;
content: "";
top: 25%;
left: 0;
width: 1px;
height: 50%;
background-color: #DDD;
}
#g_navi ul li::after {
position: absolute;
display: block;
content: "";
top: 25%;
right: 0;
width: 1px;
height: 50%;
background-color: #DDD;
}
#g_navi ul li a {
display: flex;
align-items: center;
justify-content: center;
padding: 12px 10px;
color: #fff;
text-align: center;
transition: background-color 0.3s ease, color 0.3s ease;
}
#g_navi ul li a:hover {
background-color: #DDD;
color: #097ecc;
}
/* --- ハンバーガーボタン --- */
.hamburger {
display: none;
flex-direction: column;
justify-content: center;
cursor: pointer;
padding: 12px;
margin-left: 10px;
z-index: 10001;
}
.hamburger span {
height: 3px;
width: 25px;
background: #fff;
margin: 4px 0;
border-radius: 2px;
transition: all 0.4s ease;
}
/* --- 背景のフェード用 --- */
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
opacity: 0;
visibility: hidden;
transition: all 0.4s ease;
z-index: 9998;
}
/* --- スマホ用デザイン --- */
@media (max-width: 768px) {
#g_navi ul {
position: fixed;
top: 0;
right: 0;
height: 100vh;
width: 70%;
background: #097ecc;
flex-direction: column;
justify-content: start;
align-items: center;
transform: translateX(100%);
transition: transform 0.4s ease;
padding-top: 80px;
}
#g_navi ul.active {
transform: translateX(0);
}
#g_navi ul li {
width: 100%;
border-bottom: 1px solid #DDD;
}
.hamburger {
display: flex;
position: absolute;
top: 10px;
left: 10px;
}
/* ハンバーガー→×アニメーション */
.hamburger.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
opacity: 0;
}
.hamburger.active span:nth-child(3) {
transform: rotate(-45deg) translate(6px, -7px);
}
/* フェード背景有効化 */
.overlay.active {
opacity: 1;
visibility: visible;
}
}
</style>
</head>
<body>
<div class="box_main_list">
<nav id="g_navi">
<!-- ハンバーガー -->
<div class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
</div>
<!-- メニュー -->
<ul id="nav_menu">
<li><a href="https://www.nakatomishop.com/">NAKATOMI OFFICIAL</a></li>
<li><a href="https://www.nakatomishop.com/products/list?category_id=79#tab-link">2026 SUMMER CATALOG</a></li>
<li><a href="https://www.nakatomishop.com/contact/product_fix">NEW MODEL</a></li>
<li><a href="https://www.nakatomishop.com/contact">SHOP ORIGINAL</a></li>
</ul>
</nav>
</div>
<!-- 背景フェード -->
<div class="overlay" id="overlay"></div>
<script>
/* --- ハンバーガーメニュー開閉 --- */
const hamburger = document.getElementById('hamburger');
const navMenu = document.getElementById('nav_menu');
const overlay = document.getElementById('overlay');
hamburger.addEventListener('click', () => {
hamburger.classList.toggle('active');
navMenu.classList.toggle('active');
overlay.classList.toggle('active');
});
/* --- 背景クリックで閉じる --- */
overlay.addEventListener('click', () => {
hamburger.classList.remove('active');
navMenu.classList.remove('active');
overlay.classList.remove('active');
});
</script>
</body>
</html>
{% endblock %}