app/template/default/Block/recommend.twig line 1

Open in your IDE?
  1. {% block main %}
  2. <!DOCTYPE html>
  3. <html lang="ja">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>NAKATOMI ナビゲーション</title>
  8. <style>
  9. /* --- 全体ボックス --- */
  10. .box_main_list {
  11.   background-color: #999999;    
  12.   width: 100%;
  13.   height: auto;
  14.   margin-top: 4vh;
  15. }
  16. /* --- aタグの色維持 --- */
  17. a,a:hover,a:visited{
  18.   color: inherit;
  19.   text-decoration: none;
  20. }
  21. /* --- ナビ全体 --- */
  22. #g_navi {
  23.   position: relative;
  24.   width: 100%;
  25.   background: #097ecc;
  26.   z-index: 10000;
  27.   font-size: 16px;
  28. }
  29. /* --- メニュー(PC用) --- */
  30. #g_navi ul {
  31.   display: flex;
  32.   margin: 0 auto;
  33.   padding: 0 3%;
  34.   width: 94%;
  35.   max-width: 1280px;
  36.   list-style-type: none;
  37.   transition: transform 0.3s ease;
  38. }
  39. #g_navi ul li {
  40.   position: relative;
  41.   width: 25%;
  42. }
  43. #g_navi ul li:first-child::before {
  44.   position: absolute;
  45.   display: block;
  46.   content: "";
  47.   top: 25%;
  48.   left: 0;
  49.   width: 1px;
  50.   height: 50%;
  51.   background-color: #DDD;
  52. }
  53. #g_navi ul li::after {
  54.   position: absolute;
  55.   display: block;
  56.   content: "";
  57.   top: 25%;
  58.   right: 0;
  59.   width: 1px;
  60.   height: 50%;
  61.   background-color: #DDD;
  62. }
  63. #g_navi ul li a {
  64.   display: flex;
  65.   align-items: center;
  66.   justify-content: center;
  67.   padding: 12px 10px;
  68.   color: #fff;
  69.   text-align: center;
  70.   transition: background-color 0.3s ease, color 0.3s ease;
  71. }
  72. #g_navi ul li a:hover {
  73.   background-color: #DDD;
  74.   color: #097ecc;
  75. }
  76. /* --- ハンバーガーボタン --- */
  77. .hamburger {
  78.   display: none;
  79.   flex-direction: column;
  80.   justify-content: center;
  81.   cursor: pointer;
  82.   padding: 12px;
  83.   margin-left: 10px;
  84.   z-index: 10001;
  85. }
  86. .hamburger span {
  87.   height: 3px;
  88.   width: 25px;
  89.   background: #fff;
  90.   margin: 4px 0;
  91.   border-radius: 2px;
  92.   transition: all 0.4s ease;
  93. }
  94. /* --- 背景のフェード用 --- */
  95. .overlay {
  96.   position: fixed;
  97.   top: 0;
  98.   left: 0;
  99.   width: 100%;
  100.   height: 100%;
  101.   background-color: rgba(0,0,0,0.5);
  102.   opacity: 0;
  103.   visibility: hidden;
  104.   transition: all 0.4s ease;
  105.   z-index: 9998;
  106. }
  107. /* --- スマホ用デザイン --- */
  108. @media (max-width: 768px) {
  109.   #g_navi ul {
  110.     position: fixed;
  111.     top: 0;
  112.     right: 0;
  113.     height: 100vh;
  114.     width: 70%;
  115.     background: #097ecc;
  116.     flex-direction: column;
  117.     justify-content: start;
  118.     align-items: center;
  119.     transform: translateX(100%);
  120.     transition: transform 0.4s ease;
  121.     padding-top: 80px;
  122.   }
  123.   #g_navi ul.active {
  124.     transform: translateX(0);
  125.   }
  126.   #g_navi ul li {
  127.     width: 100%;
  128.     border-bottom: 1px solid #DDD;
  129.   }
  130.   .hamburger {
  131.     display: flex;
  132.     position: absolute;
  133.     top: 10px;
  134.     left: 10px;
  135.   }
  136.   /* ハンバーガー→×アニメーション */
  137.   .hamburger.active span:nth-child(1) {
  138.     transform: rotate(45deg) translate(5px, 6px);
  139.   }
  140.   .hamburger.active span:nth-child(2) {
  141.     opacity: 0;
  142.   }
  143.   .hamburger.active span:nth-child(3) {
  144.     transform: rotate(-45deg) translate(6px, -7px);
  145.   }
  146.   /* フェード背景有効化 */
  147.   .overlay.active {
  148.     opacity: 1;
  149.     visibility: visible;
  150.   }
  151. }
  152. </style>
  153. </head>
  154. <body>
  155. <div class="box_main_list">
  156.   <nav id="g_navi">
  157.     <!-- ハンバーガー -->
  158.     <div class="hamburger" id="hamburger">
  159.       <span></span>
  160.       <span></span>
  161.       <span></span>
  162.     </div>
  163.     <!-- メニュー -->
  164.     <ul id="nav_menu">
  165.       <li><a href="https://www.nakatomishop.com/">NAKATOMI OFFICIAL</a></li>
  166.       <li><a href="https://www.nakatomishop.com/products/list?category_id=79#tab-link">2026 SUMMER CATALOG</a></li>
  167.       <li><a href="https://www.nakatomishop.com/contact/product_fix">NEW MODEL</a></li>
  168.       <li><a href="https://www.nakatomishop.com/contact">SHOP ORIGINAL</a></li>
  169.     </ul>
  170.   </nav>
  171. </div>
  172. <!-- 背景フェード -->
  173. <div class="overlay" id="overlay"></div>
  174. <script>
  175. /* --- ハンバーガーメニュー開閉 --- */
  176. const hamburger = document.getElementById('hamburger');
  177. const navMenu = document.getElementById('nav_menu');
  178. const overlay = document.getElementById('overlay');
  179. hamburger.addEventListener('click', () => {
  180.   hamburger.classList.toggle('active');
  181.   navMenu.classList.toggle('active');
  182.   overlay.classList.toggle('active');
  183. });
  184. /* --- 背景クリックで閉じる --- */
  185. overlay.addEventListener('click', () => {
  186.   hamburger.classList.remove('active');
  187.   navMenu.classList.remove('active');
  188.   overlay.classList.remove('active');
  189. });
  190. </script>
  191. </body>
  192. </html>
  193. {% endblock %}