{#
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' %}
{% block javascript %}
<script>
$(function () {
$('#js-slider-5').slick({
arrows: false, // 前・次のボタンを表示する
autoplaySpeed: 25000, // スライドさせるスピード(ミリ秒)
fade: true, // スライドをフェードイン・フェードアウト
autoplay: true,
infinite: true,
asNavFor: "#js-slider-6"
});
});
$('#js-slider-5').on('afterChange', function (slick, currentSlide) {
makeQR();
});
var id = {{id}}
$('#js-slider-5').on('beforeChange', function (slick, currentSlide) {
var idNum = {{productId}}[currentSlide['currentSlide'] + 1];
var qrtext = `https://tas-lab.net/products/detail/${idNum}/${id}`;
localStorage.setItem("demo", qrtext);
});
var makeQR = function() {
var qrtext2 = localStorage.getItem("demo");
$("#img-qr").html("");
$("#img-qr").qrcode({text:qrtext2});
}
$(function () {
$('#js-slider-6').slick({
arrows: false, // 前・次のボタンを表示する
autoplaySpeed: 25000, // スライドさせるスピード(ミリ秒)
fade: true, // スライドをフェードイン・フェードアウト
autoplay: true,
infinite: true,
});
});
</script>
{% endblock %}
{% block stylesheet %}
<style>
ol,
ul {
padding-left: 0;
}
.sliderMakerAll {
}
.sliderMaker {
float: left;
width: 50%;
padding: 3% 3%;
}
.sliderMaker2 {
float: left;
width: 50%;
padding: 2% 0 2% 11%;
}
.img-wrap-slider {
box-shadow: 10px 10px 15px -10px;
}
.img-slider {
width: 100%;
min-height: 90vh;
max-height: 90vh;
box-shadow: 10px 10px 15px -10px;
border-radius: 6px;
}
.qrCode{
float: left;
width: 50%;
height: auto;
padding: 10% 15% 8% 15%;
}
.design_card {
float: left;
background: #EDE5D5;
box-shadow: 10px 10px 10px -10px;
margin: 10px;
width: 400px;
height: auto;
text-align: center;
border-radius: 6px;
}
.design_card_title {
border-bottom: 2px solid #d5a770;
}
.design_card_technique {
margin: 10px 0;
}
{# ipad #}
@media screen and (max-width: 821px) and (min-width: 416px) {
.sliderMakerAll {
clear: both;
}
.sliderMaker {
clear: both;
width: 100%;
}
.img-wrap-slider {
border-radius: 10px;
}
.img-slider {
width: 100%;
min-height: 50vh;
max-height: 50vh;
border-radius: 10px;
}
.qrCode {
clear: both;
width: 100%;
padding: 4%;
text-align: center;
}
.sliderMaker2 {
clear: both;
width: 100%;
margin-left: 14%;
}
}
{# ihone #}
@media screen and (max-width: 415px ) {
.sliderMakerAll {
clear: both;
}
.sliderMaker {
clear: both;
width: 100%;
}
.img-wrap-slider {
border-radius: 10px;
}
.img-slider {
width: 100%;
min-height: 50vh;
max-height: 50vh;
border-radius: 10px;
}
.qrCode {
clear: both;
width: 100%;
min-height: 30vh;
max-height: 30vh;
padding: 3%;
margin-top: -4%;
text-align: center;
}
.sliderMaker2 {
clear: both;
width: 100%;
min-height: 20vh;
max-height: 20vh;
padding: 20px 0 0 6px;
}
}
</style>
{% endblock %}
{% block main %}
<div class="sliderMakerAll">
<ul id="js-slider-5" class="sliderMaker">
{% for product in products %}
{% if product.ProductImage[0] is defined %}
<li>
<div>
<div class="img-wrap-slider"><img class="img-slider" src="{{ asset(product.ProductImage[0], 'save_image') }}" /></div>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
<div id='img-qr' class="qrCode"></div>
<ul id="js-slider-6" class="sliderMaker2">
{% for product in products %}
{% if product.ProductImage[0] is defined %}
<li>
<div class="design_card">
<h2 class="fontWeightBold design_card_title">{{ product.name|trans }}</h2>
<h3 class="fontWeightBold design_card_technique">{{ product.getProductionTechnique|trans }}</h3>
<h3 class="fontWeightBold design_card_technique">{{ product.getProductionSizeVertical }} x {{ product.getProductionSizeWidth}} cm</h3>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endblock %}