{#
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: -45px;
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;
}
.front_page .slick-dots li button::before{
border: 0;
}
.slick-dots li button:before {
content: " ";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: 1;
background-color: #CCC;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: 1;
background-color: #cee1d0;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
{% endblock %}
{% block javascript %}
<script>
$(function() {
$(window).scroll(function () {
var now = $(window).scrollTop();
var pos = 50 - now;
if(pos < 8){
pos = 8;
}
$('.ec-headerNavSP').css('top', pos);
});
$('.main_visual').slick({
centerMode: true,
centerPadding: '25vw',
infinite: true,
dots: true,
arrows: false,
autoplay: true,
speed: 300,
responsive: [
{
breakpoint: 600,
settings: {
centerMode: true,
centerPadding: '5vw'
}
},
{
breakpoint: 1281,
settings: {
centerMode: true,
centerPadding: '18vw'
}
}
]
});
});
</script>
{% endblock javascript %}
{% block main %}
<div class="ec-sliderRole">
<div class="main_visual">
{% for key, blog in Blogs %}
<div class="item slick-slide">
<a href="{{ url("blog_view", { id : blog.ID}) }}">
<img src="{{ blog.img_src.sizes.large }}" alt="{{ blog.post_title }}">
</a>
</div>
{% endfor %}
</div>
</div>
{% endblock %}