src/Eccube/Resource/template/default/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.         .main_visual {
  13.             margin-left: calc(-50vw + 50%);
  14.             width: 100vw;
  15.         }
  16.         .slick-slider {
  17.             margin-bottom: 30px;
  18.         }
  19.         .slick-dots {
  20.             position: absolute;
  21.             bottom: -45px;
  22.             display: block;
  23.             width: 100%;
  24.             padding: 0;
  25.             list-style: none;
  26.             text-align: center;
  27.         }
  28.         .slick-dots li {
  29.             position: relative;
  30.             display: inline-block;
  31.             width: 20px;
  32.             height: 20px;
  33.             margin: 0 5px;
  34.             padding: 0;
  35.             cursor: pointer;
  36.         }
  37.         .slick-dots li button {
  38.             font-size: 0;
  39.             line-height: 0;
  40.             display: block;
  41.             width: 20px;
  42.             height: 20px;
  43.             padding: 5px;
  44.             cursor: pointer;
  45.             color: transparent;
  46.             border: 0;
  47.             outline: none;
  48.             background: transparent;
  49.         }
  50.         .slick-dots li button:hover,
  51.         .slick-dots li button:focus {
  52.             outline: none;
  53.         }
  54.         .slick-dots li button:hover:before,
  55.         .slick-dots li button:focus:before {
  56.             opacity: 1;
  57.         }
  58.         .slick-dots li button:before {
  59.             content: " ";
  60.             line-height: 20px;
  61.             position: absolute;
  62.             top: 0;
  63.             left: 0;
  64.             width: 12px;
  65.             height: 12px;
  66.             text-align: center;
  67.             opacity: .25;
  68.             background-color: black;
  69.             border-radius: 50%;
  70.         }
  71.         .slick-dots li.slick-active button:before {
  72.             opacity: .75;
  73.             background-color: black;
  74.         }
  75.         .slick-dots li button.thumbnail img {
  76.             width: 0;
  77.             height: 0;
  78.         }
  79.         @media screen and (max-width:480px) {
  80.             .slick-list {
  81.                 margin: 0 1rem;
  82.             }
  83.         }
  84.     </style>
  85. {% endblock %}
  86. {% block javascript %}
  87.     <script>
  88.         $(function() {
  89.             $('.main_visual').slick({
  90.                 dots: true,
  91.                 arrows: false,
  92.                 centerMode: true,
  93.                 centerPadding: "10%",
  94.                 autoplay: true,
  95.                 speed: 600,
  96.                 responsive: [{
  97.                     breakpoint: 480,
  98.                     settings: {
  99.                         slidesToShow: 1,
  100.                         centerPadding: "0"
  101.                     }
  102.                 }]
  103.             });
  104.         });
  105.     </script>
  106. {% endblock javascript %}
  107. {% block main %}
  108.     <div class="ec-sliderRole">
  109.         <div class="main_visual">
  110.             <div class="item slick-slide">
  111.                 <a href="{{ url('product_list') }}?category_id=5">
  112.                     <picture>
  113.                         <source media="(max-width: 480px)" srcset="/html/template/default/assets/img/top/univatown_slider1_SP.png">
  114.                         <img src="/html/template/default/assets/img/top/univatown_slider1.png" alt="スライド画像1">
  115.                     </picture>
  116.                 </a>
  117.             </div>
  118.             <div class="item slick-slide">
  119.                 <a href="{{ url('product_list') }}?category_id=1">
  120.                     <picture>
  121.                         <source media="(max-width: 480px)" srcset="/html/template/default/assets/img/top/univatown_slider2_SP.png">
  122.                         <img src="/html/template/default/assets/img/top/univatown_slider2.png" alt="スライド画像2">
  123.                     </picture>
  124.                 </a>
  125.             </div>
  126.             <div class="item slick-slide">
  127.                 <a href="{{ url('product_list') }}?category_id=2">
  128.                     <picture>
  129.                         <source media="(max-width: 480px)" srcset="/html/template/default/assets/img/top/univatown_slider3_SP.png">
  130.                         <img src="/html/template/default/assets/img/top/univatown_slider3.png" alt="スライド画像3">
  131.                     </picture>
  132.                 </a>
  133.             </div>
  134.         </div>
  135.     </div>
  136. {% endblock %}