{#
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.
#}
<div class="ec-newTopicRole">
<div class="ec-secNewHeading is-center text-center bgextend bgLRextendTrigger">
<div class="bgappearTrigger">
<p class="ec-secNewHeading__en scroll-fadein">{{ 'TOPICS'|trans }}</p>
<p class="ec-secNewHeading__ja scroll-fadein">{{ 'トピックス'|trans }}</p>
</div>
</div>
{% if Blogs is defined and Blogs|length > 0 %}
<div class="ec-topicRole__list scroll-fadein-delay1">
{% for Blog in Blogs %}
<div class="ec-topicRole__listItem ">
<a href="{{ url('cm_blog_pro_page_detail', {'id': Blog.slug ? Blog.slug : Blog.id}) }}">
<img src="{{ asset(Blog.getMainListImage|no_image_product, 'save_image') }}" />
</a>
<p class="ec-topicRole__listItemTitle">{{ Blog.getTitle|length > 45 ? Blog.getTitle|striptags|replace({(' '):' '})|slice(0, 45)|raw ~ '...' : Blog.getTitle|raw }}</p>
</div>
{% endfor %}
</div>
{% else %}
<div class="ec-newTopicRole__defined scroll-fadein-delay1">
<div class="ec-newTopicRole__defined__block">
<div class="ec-newTopicRole__defined__block__inner">
<img src="{{ asset("assets/img/common/logo.png", "user_data") }}" alt="株式会社ジュークボックス" width="70" height="64" loading="lazy">
<p class="ec-newTopicRole__defined__block__name">株式会社ジュークボックス</p>
</div>
</div>
<p class="ec-newTopicRole__defined__text">只今準備中です。</p>
</div>
{% endif %}
</div>
{% block javascript %}
<script>
$(function() {
var itemLength = $(".ec-topicRole__listItem") ? $(".ec-topicRole__listItem").length : 3;
$('.ec-topicRole__list').slick({
dots: false,
arrows: false,
autoplay: false,
speed: 300,
slidesToShow: itemLength,
responsive: [
{
breakpoint: 769,
settings: {
initialSlide: 0,
slidesToShow: 1.5,
infinite: false
}
}
]
});
});
</script>
{% endblock javascript %}