{#
Plugin Name: JoolenCategoryBannerText42
Copyright(c) joolen inc. All Rights Reserved.
https://www.joolen.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<style>
#category_banner_text img{
width: 100%;
}
.category_banner_inner{
margin-top: 20px;
margin-bottom: 20px;
}
.category_banner_textarea{
margin-top: 20px;
padding: 15px 20px;
background: rgb(248, 248, 248);
word-break: break-all;
}
@media only screen and (max-width: 767px){
.category_banner_inner{
margin-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
}
.category_banner_textarea{
margin-top: 10px;
padding: 10px 15px;
}
}
.slick-slider {
margin-bottom: 50px;
}
.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;
}
.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;
}
</style>
<script>
$(function() {
$('.main_visual').slick({
dots: true,
arrows: false,
autoplay: true,
speed: 300
});
});
</script>
{% if (CategoryBanners is defined and CategoryBanners | length > 0) or (CategoryBannerText is defined and CategoryBannerText) %}
<div id="category_banner_text" class="ec-sliderRole">
<div class="category_banner_inner">
{# バナー #}
{% if CategoryBanners | length > 0 %}
<div class="main_visual">
{% for CategoryBanner in CategoryBanners %}
<img src="{{ asset(CategoryBanner.file_name|no_image_product, 'save_image') }}">
{% endfor %}
</div>
{% endif %}
{# テキスト #}
{% if CategoryBannerText %}
{% set text = CategoryBannerText.description %}
{% if text != null and text != ''%}
<p class="category_banner_textarea">{{ text |raw}}</p>
{% endif %}
{% endif %}
</div>
</div>
{% endif %}