app/template/kaiino/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: -45px;
  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.         .front_page .slick-dots li button::before{
  55.           border: 0;
  56.         }
  57.         .slick-dots li button:before {
  58.             content: " ";
  59.             line-height: 20px;
  60.             position: absolute;
  61.             top: 0;
  62.             left: 0;
  63.             width: 12px;
  64.             height: 12px;
  65.             text-align: center;
  66.             opacity: 1;
  67.             background-color: #CCC;
  68.             border-radius: 50%;
  69.         }
  70.         .slick-dots li.slick-active button:before {
  71.             opacity: 1;
  72.             background-color: #cee1d0;
  73.         }
  74.         .slick-dots li button.thumbnail img {
  75.             width: 0;
  76.             height: 0;
  77.         }
  78.     </style>
  79. {% endblock %}
  80. {% block javascript %}
  81.     <script>
  82.         $(function() {
  83.           
  84.           $(window).scroll(function () {
  85.             var now = $(window).scrollTop();
  86.             var pos = 50 - now;
  87.             if(pos < 8){
  88.               pos = 8;
  89.             }
  90.             $('.ec-headerNavSP').css('top', pos);
  91.           });
  92.           
  93.             $('.main_visual').slick({
  94.               centerMode: true,
  95.               centerPadding: '25vw',
  96.               infinite: true,
  97.               dots: true,
  98.               arrows: false,
  99.               autoplay: true,
  100.               speed: 300,
  101.               responsive: [
  102.                 {
  103.                   breakpoint: 600,
  104.                   settings: {
  105.                     centerMode: true,
  106.                     centerPadding: '5vw'
  107.                   }
  108.                 },
  109.                 {
  110.                   breakpoint: 1281,
  111.                   settings: {
  112.                     centerMode: true,
  113.                     centerPadding: '18vw'
  114.                   }
  115.                 }
  116.               ]
  117.             });
  118.         });
  119.     </script>
  120. {% endblock javascript %}
  121. {% block main %}
  122.   
  123.     <div class="ec-sliderRole">
  124.         <div class="main_visual">
  125.           {% for key, blog in Blogs %}
  126.           <div class="item slick-slide">
  127.             <a href="{{ url("blog_view", { id : blog.ID}) }}">
  128.              <img src="{{ blog.img_src.sizes.large }}" alt="{{ blog.post_title }}">
  129.             </a>
  130.           </div>
  131.           {% endfor %}
  132.         </div>
  133.     </div>
  134.             
  135. {% endblock %}