app/template/BlackCherry/Block/footer.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. <style>
  10.     .search-menu {
  11.     background: #FFE8F2;
  12.     width: 100%;
  13.     height: 100vh;
  14.     position: fixed;
  15.     top: 0;
  16.     left: 0;
  17.     z-index: 99999;
  18.     overflow-y: auto;
  19.     padding: 1.2em;
  20.     box-sizing: border-box;
  21.     font-family: sans-serif;
  22.     }
  23.     .search-menu__header {
  24.     display: flex;
  25.     justify-content: flex-start;
  26.     align-items: center;
  27.     }
  28.     .close-btn {
  29.     background: none;
  30.     border: none;
  31.     font-size: 1.2em;
  32.     color: black;
  33.     text-align: center;
  34.     font-weight: bold;
  35.     }
  36.     .close-btn span {
  37.     font-size: 0.7em;
  38.     display: block;
  39.     }
  40.     .search-menu__title {
  41.     text-align: center;
  42.     font-size: 0.9em;
  43.     margin: 0.5em 0 1em;
  44.     color: #C60D69;
  45.     }
  46.     .search-menu__subtitle {
  47.     font-size: 0.8em;
  48.     text-align: center;
  49.     margin-top: 1.2em;
  50.     font-style: italic;
  51.     color: #black;
  52.     }
  53.     .input-text {
  54.     width: 100%;
  55.     padding: 0.7em;
  56.     margin-bottom: 1em;
  57.     border-radius: 5px;
  58.     border: none;
  59.     font-size: 1em;
  60.     box-sizing: border-box;
  61.     }
  62.     .form-group {
  63.     display: flex;
  64.     align-items: center;
  65.     margin-bottom: 0.8em;
  66.     }
  67.     .label-box {
  68.     background-color: #FC7CB3;
  69.     padding: 0.4em 0.8em;
  70.     border-radius: 3px;
  71.     font-size: 0.8em;
  72.     font-style: italic;
  73.     margin-right: 0.5em;
  74.     white-space: nowrap;
  75.     color: #444;
  76.     }
  77.     .select-box {
  78.     flex: 1;
  79.     padding: 0.5em;
  80.     border: none;
  81.     border-radius: 4px;
  82.     font-size: 1em;
  83.     }
  84.     .search-menu__buttons {
  85.     display: flex;
  86.     justify-content: space-between;
  87.     margin-top: 1.5em;
  88.     }
  89.     .btn-reset {
  90.     background: white;
  91.     border: 1px solid #aaa;
  92.     padding: 0.5em 1.2em;
  93.     border-radius: 5px;
  94.     font-weight: bold;
  95.     }
  96.     .btn-search {
  97.     background: #C60D69;
  98.     color: white;
  99.     border: none;
  100.     padding: 0.5em 2em;
  101.     border-radius: 5px;
  102.     font-weight: bold;
  103.     }
  104. </style>
  105. {% endblock %}
  106. {% block javascript %}
  107. <script>
  108.     var makers = {{ global_makers|map(m => {'id': m.id, 'name': m.name})|json_encode|raw }};
  109. </script>
  110. <script>
  111.   $(function () {
  112.        let select = $('#makerSelect'); // id="makerSelect" をターゲット
  113.       if (typeof makers !== 'undefined') {
  114.         makers.forEach(function (m) {
  115.           select.append($('<option>', { value: m.id, text: m.name }));
  116.         });
  117.         // URLパラメータ維持
  118.         const params = new URLSearchParams(window.location.search);
  119.         if (params.has('maker_id')) {
  120.           select.val(params.get('maker_id'));
  121.         }
  122.       }
  123.       
  124.     $('#searchMenu').hide();
  125.     $('#openSearchMenu').on('click', function () {
  126.       $('#searchMenu').fadeIn();
  127.     });
  128.     $('#closeSearchMenu').on('click', function () {
  129.       $('#searchMenu').fadeOut();
  130.     });
  131.   });
  132. </script>
  133. {% endblock %}
  134. <div class="ec-footerRole">
  135.     <div class="ec-footerRole__top"></div>
  136.     <div class="ec-footerRole__inner">
  137.         <div class="ec-footerTitle__logo">
  138.             <a href="{{ url('homepage') }}">
  139.                 <img src="{{ asset('assets/img/new/img_logo.png') }}" alt="logo" />
  140.             </a>
  141.         </div>
  142.     </div>
  143. </div>
  144. <div class="ec-footerRoleSP">
  145.     <ul>
  146.         <li>
  147.             <div id="openSearchMenu" class="ec-footerRoleSP_navi before-search">検索</div>
  148.         </li>
  149.         <li>
  150.             <a href="{{ url('cart') }}" class="ec-footerRoleSP_navi before-cart">カート</a>
  151.         </li>
  152.         <li>
  153.             <a href="{{ url('mypage_favorite') }}" class="ec-footerRoleSP_navi before-favorite">お気に入り</a>
  154.         </li>
  155.         <li>
  156.             <a href="{{ url('mypage') }}" class="ec-footerRoleSP_navi before-history">注文履歴</a>
  157.         </li>
  158.         <li>
  159.             <a href="{{ url('mypage') }}" class="ec-footerRoleSP_navi before-user">マイページ</a>
  160.         </li>
  161.     </ul>
  162. </div>
  163. <div id="searchMenu" class="search-menu" style="display: none;">
  164.   <div class="search-menu__header">
  165.     <button id="closeSearchMenu" class="close-btn">✕<br><span>CLOSE</span></button>
  166.   </div>
  167.   <div class="search-menu__body">
  168.     <p class="search-menu__title">検索メニュー</p>
  169.     <form method="get" class="searchform" action="{{ path('product_list') }}">
  170.       <input type="text" name="keyword" class="input-text" placeholder="フリーワード" />
  171.       <div class="form-group">
  172.         <label class="label-box">入荷日</label>
  173.         <input type="date" name="date" value="" class="select-box">
  174.       </div>
  175.       <div class="form-group">
  176.         <label class="label-box">メーカー</label>
  177.         <select name="maker_id" class="select-box" id="makerSelect">
  178.           <option value="">すべてのメーカー</option>
  179.           {# オプションはサーバ側でGET受信して処理 #}
  180.         </select>
  181.       </div>
  182.       <div class="search-menu__buttons">
  183.         <button type="reset" class="btn-reset">リセット</button>
  184.         <button type="submit" class="btn-search">検索</button>
  185.       </div>
  186.     </form>
  187.   </div>
  188. </div>