{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'front_page' %}
{% block stylesheet %}
<style>
.slick-slider {
margin-bottom: 30px;
}
.slick-dots {
position: absolute;
bottom: -25px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: " ";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
.slick-prev, .slick-next {
font-size: 0;
line-height: 0;
position: absolute;
top: 50%;
display: block;
width: 60px;
height: 60px;
padding: 0;
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
transform: translate(0, -50%);
cursor: pointer;
color: transparent;
border: none;
outline: none;
background: transparent;
}
.slick-prev {
left: 0;
z-index: 1;
}
.slick-next {
right: 0;
z-index: 1;
}
.slick-prev:before, .slick-next:before {
font-family: 'slick';
font-size: 40px;
line-height: 1;
opacity: 1;
color: white;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.slick-prev:before {
content: url(/html/user_data/assets/img/common/btn_carousel_l.webp);
}
.slick-next:before {
content: url(/html/user_data/assets/img/common/btn_carousel_r.webp);
}
.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus {
color: transparent;
outline: none;
background: transparent;
}
.slick-prev:hover:before,
.slick-prev:focus:before,
.slick-next:hover:before,
.slick-next:focus:before {
opacity: 1;
}
.slick-prev.slick-disabled:before,
.slick-next.slick-disabled:before {
opacity: .25;
}
.slick-track{
position: relative;
top: 0;
left: 0;
display: flex;
margin-left: auto;
margin-right: auto;
}
</style>
{% endblock %}
{% block javascript %}
<script>
$(function() {
let width = $(window).width();
var photo_count = 1;
if (width <= 768) {
} else if (width <= 1024) {
// タブレット
photo_count = 3;
} else {
// PC
photo_count = 3;
}
$('.main_visual').slick({
dots: false,
autoplay: true,
speed: 300,
centerMode: true,
centerPadding: '20%',
arrows: true,
infinite: true,
slidesToShow: photo_count
});
});
</script>
{% endblock javascript %}
{% block main %}
{% endblock %}