{#
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.
#}
{% set body_class = 'front_page' %}
{% block stylesheet %}
<style>
.slider {
opacity: 0;
transition: opacity .3s linear;
}
.slider.slick-initialized {
opacity: 1;
}
</style>
{% endblock %}
{% block javascript %}
<script>
$(document).ready(function(){
var $id = {{ id }};
var matchingElement = $('[id="product_carousel__' + $id + '"]');
matchingElement.not('.slick-initialized').slick({
slidesToShow: 4,
slidesToScroll: 1,
accessibility: true,
prevArrow: '<div class="prev-arrow h-full absolute left-[-1.4vw] lg:left-0 top-[50%] translate-y-[-50%] flex items-center justify-center z-20 hover"><img class="w-2 h-5" src="{{ asset('assets/img/top/prev_arrow.svg') }}" /></div>',
nextArrow: '<div class="next-arrow h-full absolute right-0 lg:right-[5vw] lessThanLg:pl-0 xxl:pl-[1.5vw] top-[50%] translate-y-[-50%] flex items-center z-20 hover"><img class="w-2 h-5" src="{{ asset('assets/img/top/next_arrow.svg') }}" /></div>',
infinite: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 4,
slidesToScroll: 1,
infinite: true,
appendArrows: $('[id="arrow-box__' + $id + '"]'),
}
},
]
});
});
</script>
{% endblock javascript %}
{% block main %}
<div class="{{class}} flex flex-col w-full items-end">
<div class="flex flex-col w-full">
<div class="flex justify-between w-full xl:pl-3 md:justify-center md:gap-x-[max(6.4vw,24px)]">
<img src="{{ asset(image) }}" alt="商品画像" class="w-[max(44.27vw,850px)] xxl:w-[800px] h-auto max-w-[850px] lg:hidden xxl:pr-3" loading="lazy">
<img src="{{ asset(spimage) }}" alt="商品画像" class="w-full max-w-[350px] sm:w-[68vw] h-auto ml-6 md:ml-0 hidden lg:block" loading="lazy">
<div class="flex font-extralight gap-7 md:gap-2 xl:pr-[max(3.75vw,22px)]">
<p class="text-[22px] [writing-mode:vertical-rl] md:text-xs tracking-[6px] md:tracking-[3px]">{{subtitle}}</p>
<p class="text-[36px] [writing-mode:vertical-rl] md:text-lg items-center tracking-[14px] md:tracking-[10px]">{{title}}</p>
</div>
</div>
{# スライダー #}
<div class="bg-white relative ml-auto w-[41.66vw] max-w-[808px] mr-7 lg:mr-0 mt-[-5.6vw] lg:mt-[0px] flex box-border lg:w-full">
<div id="arrow-box__{{id}}"></div>
<div id="product_carousel__{{ id }}" class="relative mx-10 md:mx-4 gap-x-2 md:gap-x-5 w-[40vw] items-center box-border lg:w-[100vw]">
{# アイテム #}
{% for images in productImages %}
{% for image in images %}
{% if id == image.category_id %}
<a href={{ url('product_detail', {'id': image.product_id}) }} class="slick-slide w-[8.85vw] drop-shadow-[0_8px_3px_rgba(0,0,0,0.08)] lg:w-[22.9vw] items-center mt-10 md:mt-6 mb-10 product-list box-border hover cursor-pointer" ontouchstart = "">
{% if image.file_name %}
<img src="{{ asset(image.file_name,'save_image') }}" alt="" class="w-[8.85vw] h-[8.85vw] lg:w-[22.9vw] lg:h-[22.9vw]" loading="lazy">
{% else %}
<img src="" alt="" class="w-[8.85vw] h-[8.85vw] lg:w-[22.9vw] lg:h-[22.9vw]" loading="lazy">
{% endif %}
<p class="w-[8.85vw] bg-white lg:w-[22.9vw] h-[74px] md:h-[60px] lg:text-[min(3.2vw,18px)] text-lg py-2 px-3 text-center flex justify-center items-center leading-normal">{{image.name}}</p>
</a>
{% endif %}
{% endfor %}
{% endfor %}
</div>
</div>
</div>
<a
href="{{url('product_list',{'category_id':id})}}"
class="flex xl:mr-7 ml-auto md:ml-0 md:h-[46px] md:w-[156px] w-[240px] h-[60px] bg-[#EFEEE8] gap-x-5 items-center justify-center border-b-[1px] border-manakaBlack bottom-0 hover cursor-pointer drop-shadow-[0_10px_5px_rgba(0,0,0,0.08)]">
<p class="md:text-sm tracking-widest">商品一覧</p>
<img src="{{ asset('assets/img/top/arrow_link.svg') }}" alt="矢印">
</a>
</div>
{% endblock %}