app/template/default/Block/header0.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. {% block stylesheet %}
  9.     <link rel="stylesheet" href="{{ asset('assets/css/main_module_commom.css', 'user_data') }}">
  10.     <link rel="stylesheet" href="{{ asset('assets/css/header_style.css', 'user_data') }}">
  11. {% endblock %}
  12. {% block javascript %}
  13.     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  14.     <script src="{{ asset('assets/js/header.js', 'user_data') }}"></script>
  15. {% endblock  %}
  16. <div class="fixed-header">
  17.     <section>
  18.     <div id="site_header">
  19.         <div class="header_logo">
  20.             <a href="{{url('homepage')}}">
  21.                 <img src="{{ asset('assets/img/common/header_logo_0.png', 'user_data') }}">
  22.             </a>
  23.         </div>
  24.         <div class="header_menus">
  25.             <div class="header_inner1">
  26.                 {{ render(path('block_search_product')) }}
  27.                 <div class="header_link1 pc">
  28.                     <ul class="link1">
  29.                         <li><a href="https://photo-pub.co.jp/news">NEWS</a></li>
  30.                         <li><a href="https://photo-pub.co.jp/company">会社概要</a></li>
  31.                         <li><a href="{{ url('contact') }}">お問い合わせ</a></li>
  32.                         <li><a href="{{ url('opinion') }}">意見箱</a></li>
  33.                     </ul>
  34.                 </div>
  35.                 <div class="header_link2">
  36.                     {{ include('Block/login.twig', {parent_template: 'header0.twig'}) }}
  37.                 </div>
  38.                 <div class="hamburger-menu sp">
  39.                     <button id="hamburger" class="hamburger">
  40.                         <span></span>
  41.                         <span></span>
  42.                         <span></span>
  43.                     </button>
  44.                     <nav id="menus" class="menus">
  45.                         <ul class="hamburger-tabs">
  46.                             <li class="menu-item">
  47.                                 <a href="{{ url('homepage') }}">TOP</a>
  48.                             </li>
  49.                             <li class="menu-item">
  50.                                 <a href="{{ url('homepage') }}">フォトパブ堂書店</a>
  51.                                 <ul class="submenu">
  52.                                     <li><span></span><a href="{{ url('books') }}">  フォトパブ堂書店TOP</a></li>
  53.                                     {% set AllCategories = repository('Eccube\\Entity\\Category').getList() %}
  54.                                     {% set Categories = AllCategories|filter(c => c.id is not null and c.id == 1) %}
  55.                                     {% for Category in Categories %}
  56.                                         {% for Child in Category.Children %}
  57.                                             <li>
  58.                                                 <span><a href="{{ url('product_list') }}?category_id={{ Child.id }}">{{ Child }}</a></span>
  59.                                             </li>
  60.                                         {% endfor %}
  61.                                     {% endfor %}
  62.                                 </ul>
  63.                             </li>
  64.                             <li class="menu-item">
  65.                                 <a href="{{ url('homepage') }}">フォトパブ写真館</a>
  66.                                 <ul class="submenu">
  67.                                     <li><span></span><a href="{{ url('photos') }}">  フォトパブ写真館TOP</a></li>
  68.                                     {% set AllCategories = repository('Eccube\\Entity\\Category').getList() %}
  69.                                     {% set Categories = AllCategories|filter(c => c.id is not null and c.id == 6) %}
  70.                                     {% for Category in Categories %}
  71.                                         {% for Child in Category.Children %}
  72.                                             <li>
  73.                                                 <span><a href="{{ url('photo-product_list') }}?category_id={{ Child.id }}">{{ Child }}</a></span>
  74.                                             </li>
  75.                                         {% endfor %}
  76.                                     {% endfor %}
  77.                                 </ul>
  78.                             </li>
  79.                             <li class="menu-item">
  80.                                 <a href="https://jihi.photo-pub.co.jp/">自費出版サービス</a>
  81.                                 <ul class="submenu">
  82.                                     <li><span></span><a href="https://jihi.photo-pub.co.jp/">自費出版について</a></li>
  83.                                     <li><span></span><a href="https://jihi.photo-pub.co.jp/calc.php">自動見積もり</a></li>
  84.                                     <li><span></span><a href="https://jihi.photo-pub.co.jp/qanda.php">出版までの流れ</a></li>
  85.                                     <li><span></span><a href="https://jihi.photo-pub.co.jp/inquiry">自費出版に関するご相談</a></li>
  86.                                 </ul>
  87.                             </li>
  88.                             <li class="menu-item">
  89.                                 <a href="https://photo-pub.co.jp/event">イベント情報</a>
  90.                                 <ul class="submenu">
  91.                                     <li><span></span><a href="https://photo-pub.co.jp/event">イベント一覧</a></li>
  92.                                 </ul>
  93.                             </li>
  94.                             <li class="menu-item">
  95.                                 <a href="https://photo-pub.co.jp/recruit">各種募集</a>
  96.                                 <ul class="submenu">
  97.                                     <li><span></span><a href="https://photo-pub.co.jp/recruit">募集一覧</a></li>
  98.                                 </ul>
  99.                             </li>
  100.                         </ul>
  101.                         <ul class="hamburger-links">
  102.                             <li><a href="https://photo-pub.co.jp/news">NEWS</a></li>
  103.                             <li><a href="https://photo-pub.co.jp/company">会社概要</a></li>
  104.                             <li><a href="{{ url('contact') }}">お問い合わせ</a></li>
  105.                             <li><a href="{{ url('opinion') }}">意見箱</a></li>
  106.                             <li><a href="{{url('help_privacy')}}">プライバシー<br class="br_linkbox">ポリシー</a></li>
  107.                             <li><a href="{{url('help_tradelaw')}}">特定商取引法<br class="br_linkbox">に基づく表記</a></li>
  108.                         </ul>
  109.                         <ul class="hamburger-sns">
  110.                             <li><a><img src="{{ asset('assets/img/common/sns_ic_insta.png', 'user_data') }}" alt="insta"></a></li>
  111.                             <li><a href="https://www.youtube.com/@%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96"><img src="{{ asset('assets/img/common/sns_ic_youtube.svg', 'user_data') }}" alt="youtube"></a></li>
  112.                             <li><a href="https://twitter.com/share?url=https://photo-pub.co.jp/&via=photopub402&hashtags=%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%B7%E3%83%B3%E3%82%B0&text=%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%83%95%E3%82%A9%E3%83%88%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%B7%E3%83%B3%E3%82%B0"><img src="{{ asset('assets/img/common/sns_ic_x.svg', 'user_data') }}" alt="x"></a></li>
  113.                             <li><a href="http://www.facebook.com/share.php?u=https://photo-pub.co.jp/"><img src="{{ asset('assets/img/common/sns_ic_fb.svg', 'user_data') }}" alt="fb"></a></li>
  114.                         </ul>
  115.                     </nav>
  116.                 </div>
  117.             </div>
  118.             <div class="header_inner2 pc">
  119.                 <ul class="select_btns">
  120.                     <li class="btn"><a href="{{ url('homepage') }}">TOP</a></li>
  121.                     <li class="btn"><a href="{{ url('homepage') }}books">フォトパブ堂書店</a></li>
  122.                     <li class="btn"><a href="{{ url('homepage') }}photos">フォトパブ写真館</a></li>
  123.                     <li class="btn"><a href="http://jihi.photo-pub.co.jp/">自費出版サービス</a></li>
  124.                     <li class="btn"><a href="https://photo-pub.co.jp/event">イベント情報</a></li>
  125.                     <li class="btn"><a href="https://photo-pub.co.jp/recruit">各種募集</a></li>
  126.                 </ul>
  127.             </div>
  128.         </div>
  129.     </div>
  130.     {#<div class="tabs">#}
  131.     {#    <ul class="tabs_inner">#}
  132.     {#        {% set Categories = repository('Eccube\\Entity\\Category').getList() %}#}
  133.     {#        {% macro tree(Category) %}#}
  134.     {#            {% from _self import tree %}#}
  135.     {#            <a href="{{ url('product_list') }}?category_id={{ Category.id }}">#}
  136.     {#                {{ Category.name }}#}
  137.     {#            </a>#}
  138.     {#            {% if Category.children|length > 0 %}#}
  139.     {#                <ul>#}
  140.     {#                    {% for ChildCategory in Category.children %}#}
  141.     {#                        <li>#}
  142.     {#                            {{ tree(ChildCategory) }}#}
  143.     {#                        </li>#}
  144.     {#                    {% endfor %}#}
  145.     {#                </ul>#}
  146.     {#            {% endif %}#}
  147.     {#        {% endmacro %}#}
  148.     
  149.             {# @see https://github.com/bolt/bolt/pull/2388 #}
  150.     {#        {% from _self import tree %}#}
  151.             
  152.     {#        <div class="ec-categoryNaviRole">#}
  153.     {#            <div class="ec-itemNav">#}
  154.     {#                <ul class="ec-itemNav__nav">#}
  155.     {#                    {% for Category in Categories %}#}
  156.     {#                        <li>#}
  157.     {#                            {{ tree(Category) }}#}
  158.     {#                        </li>#}
  159.     {#                    {% endfor %}#}
  160.     {#                </ul>#}
  161.     {#            </div>#}
  162.     {#        </div>#}
  163.     {#    </ul>#}
  164.     {#</div>#}
  165.     <div class="sp-search-form">
  166.         <form action="{{ path('product_list') }}" class="search-form sp">
  167.             <input type="text" class="search-form-input" placeholder="キーワード(タイトル、著者など)を入力">
  168.             <button type="submit" class="search-form-submit" aria-label="検索"></button>
  169.         </form>
  170.     </div>
  171. </section>
  172. </div>
  173. <style>
  174.     .fixed-header {
  175.     position: fixed;
  176.     top: 0;
  177.     left: 0;
  178.     width: 100%;
  179.     z-index: 9999;
  180.     background-color: #fff; /* 背景が透けないように */
  181.     box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 任意:影で浮かせる */
  182. }
  183. body {
  184.     padding-top: 100px; /* ヘッダーの高さに合わせて調整(例:80px) */
  185. }
  186. @media screen and (max-width: 820px) {
  187.     body {
  188.         padding-top: 120px; /* ヘッダーの高さに合わせて調整(例:80px) */
  189.     }
  190. }
  191. </style>