app/template/bravers/index.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. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'front_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.         .slick-slider {
  13.             margin-bottom: 30px;
  14.         }
  15.         .slick-dots {
  16.             position: absolute;
  17.             bottom: -46px;
  18.             display: block;
  19.             width: 100%;
  20.             padding: 0;
  21.             list-style: none;
  22.             text-align: center;
  23.         }
  24.         .slick-dots li {
  25.             position: relative;
  26.             display: inline-block;
  27.             width: 20px;
  28.             height: 20px;
  29.             margin: 0 5px;
  30.             padding: 0;
  31.             cursor: pointer;
  32.         }
  33.         .slick-dots li button {
  34.             font-size: 0;
  35.             line-height: 0;
  36.             display: block;
  37.             width: 20px;
  38.             height: 20px;
  39.             padding: 5px;
  40.             cursor: pointer;
  41.             color: transparent;
  42.             border: 0;
  43.             outline: none;
  44.             background: transparent;
  45.         }
  46.         .slick-dots li button:hover,
  47.         .slick-dots li button:focus {
  48.             outline: none;
  49.         }
  50.         .slick-dots li button:hover:before,
  51.         .slick-dots li button:focus:before {
  52.             opacity: 1;
  53.         }
  54.         .slick-dots li button:before {
  55.             content: " ";
  56.             line-height: 20px;
  57.             position: absolute;
  58.             top: 0;
  59.             left: 0;
  60.             width: 16px;
  61.             height: 16px;
  62.             text-align: center;
  63.             opacity: .25;
  64.             background-color: #D8D8D8;
  65.             border-radius: 50%;
  66.         }
  67.         .slick-dots li.slick-active button:before {
  68.             background-color: #3F5794;
  69.             opacity: 1;
  70.         }
  71.         .slick-dots li button.thumbnail img {
  72.             width: 0;
  73.             height: 0;
  74.         }
  75.         .main_visual .slick-list .slick-track .slick-slide img{
  76.             width: 100%;
  77.         }
  78.         @media screen and (max-width: 768px) {
  79.             .slick-dots {
  80.                 bottom: -36px;
  81.             }
  82.             .slick-dots li {
  83.                 margin: 0 2px;
  84.                 width: 16px;
  85.                 height: 16px;
  86.             }
  87.             .slick-dots li button {
  88.                 width: 16px;
  89.                 height: 16px;
  90.                 padding: 2px;
  91.             }
  92.            .slick-dots li button:before {
  93.             width: 12px;
  94.             height: 12px;
  95.         }
  96.         }
  97.     </style>
  98. {% endblock %}
  99. {% block javascript %}
  100.     <script>
  101.         $(function() {
  102.             $('.main_visual').slick({
  103.                 dots: true,
  104.                 arrows: false,
  105.                 autoplay: true,
  106.                 centerMode:true,        //追記
  107.                 centerPadding:"20%",    //追記
  108.                 speed: 300,
  109.                 responsive: [
  110.                     {
  111.                         breakpoint: 759, // 759px以下のサイズに適用
  112.                         settings: {
  113.                         centerPadding:"15%",    //追記
  114.                         },
  115.                     },
  116.                 ],
  117.             });
  118.         });
  119.     </script>
  120. {% endblock javascript %}
  121. {% block main %}
  122.         <div class="main_visual bottom-space">
  123.             <div class="item slick-slide"><img src="{{ asset('assets/img/top/hero/banner01.jpg') }}"></div>
  124.             <div class="item slick-slide"><img src="{{ asset('assets/img/top/hero/banner02.jpg') }}"></div>
  125.             <a href="" class="item slick-slide"><img src="{{ asset('assets/img/top/hero/banner03.jpg') }}"></a>
  126.         </div>
  127. {% endblock %}