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

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% set ListCategories = repository('Eccube\\Entity\\Category').getList() %}
  9. <div class="nav-bg"></div>
  10. <header>
  11.     <div class="ec-headerNaviRole">
  12.         <div class="ec-headerNaviRole__left">
  13.             <a href="/" class="logo"><img src="/html/user_data/assets/img/top/logo01.png?2022" alt="ロゴ"></a>
  14.             {# <div class="ec-headerNaviRole__search">
  15.                                                     {{ render(path('block_search_product')) }}
  16.                                                 </div>
  17.                                                 <div class="ec-headerRole__navSP">
  18.                                                     {{ include('Block/nav_sp.twig') }}
  19.                                                 </div> #}
  20.         </div>
  21.         <div class="ec-headerNaviRole__right">
  22.             <nav>
  23.                 <ul class="listType03">
  24.                     <li>
  25.                         <a href="/guide">はじめての方へ</a>
  26.                     </li>
  27.                     <li>
  28.                         <a href="{{ url('product_list',{'category_id':'22'}) }}">見守り・安否確認</a>
  29.                     </li>
  30.                     <li>
  31.                         <a href="{{ url('product_list',{'category_id':'7'}) }}">認知症サポート</a>
  32.                     </li>
  33.                     <li>
  34.                         <a href="{{ url('product_list') }}">商品・サービス一覧</a>
  35.                     </li>
  36.                     <li>
  37.                         <a href="/column">コラム</a>
  38.                     </li>
  39.                 </ul>
  40.             </nav>
  41.             <div class="container01">
  42.                 <button class="searchTrigger01">
  43.                     <img src="/html/user_data/assets/img/top/ico_search_sp01.png?20" alt="">
  44.                 </button>
  45.                 <div class="ec-headerNaviRole__search">
  46.                     {{ render(path('block_search_product')) }}
  47.                 </div>
  48.                 <div class="ec-headerRole__cart">
  49.                     {{ include('Block/cart.twig') }}
  50.                 </div>
  51.                 <!-- ↓メニューバー↓ -->
  52.                 <p id="btn_menu">
  53.                     <a class="nav-trigger nav-trigger01" data-cateid="mainMenu"><span></span>
  54.                     </a>
  55.                 </p>
  56.                 <!-- ↑メニューバー↑ -->
  57.                 <!-- ↓↓メインメニュー↓↓ -->
  58.                 <div id="mainMenu" class="menuBox">
  59.                     <div class="spNavOption sp">
  60.                         <p id="btn_menu"><a class="nav-trigger nav-trigger02 active">Menu<span></span></a></p>
  61.                     </div>
  62.                     {% if is_granted('ROLE_USER') %}
  63.                     <div class="menuBlock" id="member">
  64.                         <ul>
  65.                             <li class="blockTtl">
  66.                                 <span class="member">
  67.                                     {{ '%last_name% %first_name% 様'|trans({ '%last_name%': app.user.name01, '%first_name%': app.user.name02 }) }}
  68.                                 </span>
  69.                                 </li>
  70.                             <li><a href="/mypage/">マイページ</a></li>
  71.                             <li><a href="/mypage/favorite">お気に入り</a></li>
  72.                             <li><a href="/logout">ログアウト</a></li>
  73.                         </ul>
  74.                     </div>
  75.                     {% else %}
  76.                     <div class="menuBlock">
  77.                         <ul>
  78.                             <li><a href="/">トップページ</a></li>
  79.                         </ul>
  80.                     </div>
  81.                     <div class="menuBlock" id="guest">
  82.                         <ul>
  83.                             <li class="blockTtl"><span class="guest">ゲスト</span></li>
  84.                             <li><a href="/entry">新規会員登録</a></li>
  85.                             <li><a href="/mypage/login">ログイン</a></li>
  86.                         </ul>
  87.                     </div>
  88.                     {% endif %}
  89.                     <div class="menuBlock">
  90.                         <ul>
  91.                             <li class="blockTtl"><span class="search">カテゴリから探す</span></li>
  92.                             <li><a href="/products/list">商品一覧</a></li>
  93.                             {% for Category in ListCategories %}
  94.                                 {% if Category.Children is not empty %}
  95.                                 <li><a class="menuTrigger01" data-cateId="menu_{{ Category.id }}">{{ Category.name }}から探す</a></li>
  96.                                 {% else %}
  97.                                 <li><a href="{{ url('product_list',{category_id:Category.id}) }}">{{ Category.name }}から探す</a></li>
  98.                                 {% endif %}
  99.                             {% endfor %}
  100.                         </ul>
  101.                     </div>
  102.                     <div class="menuBlock" id="member">
  103.                         <ul>
  104.                             <li class="blockTtl"><span class="guide">ご利用ガイド</span></li>
  105.                             <li><a href="/guide">はじめてご利用の方へ</a></li>
  106.                             <li><a href="/user_data/help_order">ご注文方法</a></li>
  107.                             <li><a href="/user_data/help_send">返品・交換</a></li>
  108.                             <li><a href="{{ url('help_tradelaw') }}">特定商取引法に基づく表記</a></li>
  109.                             <li><a href="{{ url('help_agreement') }}">会員利用規約</a></li
  110.                         </ul>
  111.                     </div>
  112.                     <div class="menuBlock" id="aboutyasashiite">
  113.                         <ul>
  114.                             <li class="blockTtl"><span class="guide">その他</span></li>
  115.                             <li><a href="{{ url('help_about') }}">運営会社</a></li>
  116.                             <li><a href="{{ url('help_privacy') }}">プライバシーポリシー</a></li>
  117.                             <li><a href="/user_data/cookie_policy">クッキーポリシー</a></li>
  118.                             <li><a href="/column" target="_blank">ミマサポメディア</a></li>
  119.                             <li><a href="/contact">お問い合わせ</a></li>
  120.                         </ul>
  121.                     </div>
  122.                 </div>
  123.                 {% for Category in ListCategories  %}
  124.                 {% if Category.Children is not empty %}
  125.                 <div id="menu_{{ Category.id }}" class="menuBox">
  126.                     <div class="spNavOption">
  127.                         <a class="prevTrigger"><img src="/html/user_data/assets/img/common/ico_l_gray.png" alt=""></a>
  128.                         <p id="btn_menu"><a class="nav-trigger nav-trigger02 active">Menu<span></span></a></p>
  129.                     </div>
  130.                     <div class="menuBlock" id="pierce">
  131.                         <div class="menuBlock" id="pierce">
  132.                             <ul>
  133.                                 <li class="blockTtl"><span class="brand">{{ Category.name }}</span></li>
  134.                                 <li><a href="/products/list?category_id={{ Category.id }}">全ての{{ Category.name }}</a></li>
  135.                                 {% for Child in Category.Children %}
  136.                                 <li><a href="/products/list?category_id={{ Child.id }}">{{ Child.name }}</a></li>
  137.                                 {% endfor %}
  138.                             </ul>
  139.                         </div>
  140.                     </div>
  141.                 </div>
  142.                 {% endif %}
  143.                 {% endfor %}
  144.             </div>
  145.             {# <div class="ec-headerNaviRole__nav">
  146.                                                     {{ include('Block/login.twig') }}
  147.                                                 </div> #}
  148.         </div>
  149.     </div>
  150. </header>
  151. {% if body_class is defined and body_class == 'product_page list' %}
  152. <style>
  153. .mvType01{
  154.     background-image:url( {{ mv_path_pc }} )!important;
  155. }
  156. @media screen and (max-width: 768px){
  157.     .mvType01{
  158.         background-image:url( {{ mv_path_sp }} )!important;
  159.     }
  160. }
  161. </style>
  162. <section class="mvType01">
  163.     <div class="inner">
  164.         <div class="txtBox">
  165.             {% if Category is not null %}
  166.             {% for Cate in Category.path %}
  167.             <div class="tagBasic">{{ Cate.name }}</div>
  168.             {% endfor %}
  169.             {% endif %}
  170.             {% if Category is not null %}
  171.                 {% if Category.mv_html is not null %}
  172.                     {{ Category.mv_html|raw }}
  173.                 {% else %}
  174.                     <h1 class="ttl06">{{ Category.name }}</h1>
  175.                     <p></p>
  176.                 {% endif %}
  177.             {% elseif search_form.name.vars.value is not empty  %}
  178.                 <h1 class="ttl06">「{{ search_form.name.vars.value }}」での検索結果</h1>
  179.             {% else %}
  180.                 <h1 class="ttl06">全ての商品</h1>
  181.                 <p>全ての商品一覧です。</p>
  182.             {% endif %}
  183.         </div>
  184.     </div>
  185. </section>
  186. {% endif %}