{#
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>
</script>
{% endblock %}
{% block stylesheet %}
<style>
.artists-title {
margin-left: 5%;
font-weight: bold;
}
.artist-flex {
background-color: #f4f1ee;
padding: 20px;
padding-left: 5%;
margin-top: 50px;
margin: 3%;
display: flex;
flex-wrap: wrap;
border-radius: 10px;
}
.artist-img-wrapper {
padding: 10px;
margin: 10px;
border-radius: 5px;
font-size: 20px;
width: 45%;
position: relative;
flex-wrap: wrap;
}
.artist-img-wrapper img {
min-width: 600px;
max-width: 600px;
width: 600px;
height: 300px;
}
.artist-img-wrapper2 {
position: absolute;
bottom: 20px;
left: 77%;
width: 50%;
}
/* 770以下の時 */
@media screen and (max-width: 790px) {
.under790 {
width: 46%;
}
.under790-2 {
display: none;
}
}
/* 620以下の時 */
@media screen and (max-width: 620px) {
.under620 {
width: 100%;
}
}
.artist-img-wrapper a {
color: black;
}
.artist-img-wrapper a:hover {
color: #d5a770;
}
.artist-img-wrapper p {
font-size: 20px;
margin-top: 5px;
}
.artist-img-wrapper img {
min-width: 100%;
width: 100%;
height: 400px;
border-radius: 5%;
}
.header-photo {
position: relative;
}
.header-photo h2 {/*h2タグを画像の真ん中に*/
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
margin:0;/*余計な隙間を除く*/
padding:0;/*余計な隙間を除く*/
color: white;/*文字色*/
font-size: 40px;/*文字サイズ*/
text-align:center;/*pタグ内で更に中央寄せ*/
font-family: 'Quicksand',sans-serif;
font-weight: "bold";
}
.header-photo img {
width: 99.5%;
}
.artist-art img {
width: 300px;
height: 300px;
}
.img-wrapper-artist {
}
.img-wrapper-artist img {
padding-bottom: 5px;
}
.top-left {
position: absolute;
top: 25px;
left: 25px;
color: white;
}
</style>
{% endblock %}
{% block main %}
<div class="header-photo">
<img src="https://sh-cdn.singulart.com/eyJidWNrZXQiOiJzaW5ndWxhcnQtd2Vic2l0ZS1wcm9kIiwia2V5IjoiYXJ0aXN0c1wvdjJcL3BpY3R1cmVzXC9jcm9wcGVkXC9zdHVkaW9cL2Jhc2VcLzEzMzZfc3R1ZGlvXzAwNzY1OGQ0NDRlMWE1MjhiOWRlODIxYmQ0MTRiNzEzLmpwZWciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjEyMDAsImhlaWdodCI6NDYwLCJmaXQiOiJjb3ZlciJ9LCJ0b0Zvcm1hdCI6IndlYnAiLCJ3ZWJwIjp7InF1YWxpdHkiOjgwfX19?signature=8dd9a04e219b34454723ae1876cda86063e22f77b898d6d073c648889889b95e">
<h2 class="artists-title">芸術家</h2>
</div>
<div class="artist-flex">
{% for artist in artists %}
<div class="artist-img-wrapper under790 under620">
<a href="/artists/detail/{{ artist.id }}">
{# artist写真 #}
<img src="{{ asset(artist.image |no_image_product, 'user_data') }}" alt=artist.name>
{# artistが出品した写真(3枚まで) #}
<div class="artist-img-wrapper2">
{% for i in 0 .. num - 1 %}
{% if selectedProducts is defined %}
{% for selectedProduct in selectedProducts[i] %}
{% if selectedProduct.artist_id == artist.id %}
{% if loop.index < 4 %}
<div class="img-wrapper-artist">
<a href="{{ url('product_detail', {'id': selectedProduct.id}) }}">
<img class="img" src="{{ asset(selectedProduct.main_list_image|no_image_product, 'save_image') }}" alt="{{ selectedProduct.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
</a>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
<p class="fontweight-bold top-left">{{ artist.name }}</p>
</a>
</div>
{% endfor %}
</div>
{% endblock %}