app/template/default/Artists/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% block javascript %}
  10. <script>
  11. </script>
  12. {% endblock %}
  13. {% block stylesheet %}
  14.     <style>
  15.         .artists-title {
  16.             margin-left: 5%;
  17.             font-weight: bold;
  18.         }
  19.         .artist-flex {
  20.             background-color: #f4f1ee;
  21.             padding: 20px;
  22.             padding-left: 5%;
  23.             margin-top: 50px;
  24.             margin: 3%;
  25.             display: flex;
  26.             flex-wrap: wrap;
  27.             border-radius: 10px;
  28.         }
  29.         .artist-img-wrapper {
  30.             padding: 10px;
  31.             margin: 10px;
  32.             border-radius: 5px;
  33.             font-size: 20px;
  34.             width: 45%;
  35.             position: relative;
  36.             flex-wrap: wrap;
  37.         }
  38.         .artist-img-wrapper img {
  39.             min-width: 600px;
  40.             max-width: 600px;
  41.             width: 600px;
  42.             height: 300px;
  43.         }
  44.         .artist-img-wrapper2 {
  45.             position: absolute;
  46.             bottom: 20px;
  47.             left: 77%;
  48.             width: 50%;
  49.         }
  50.         /* 770以下の時 */
  51.         @media screen and (max-width: 790px) {
  52.         .under790 {
  53.             width: 46%;
  54.         }
  55.         .under790-2 {
  56.             display: none;
  57.         }
  58.         }
  59.         /* 620以下の時 */
  60.         @media screen and (max-width: 620px) {
  61.         .under620 {
  62.             width: 100%;
  63.         }
  64.         }
  65.         .artist-img-wrapper a {
  66.             color: black;
  67.         }
  68.         .artist-img-wrapper a:hover {
  69.             color: #d5a770;
  70.         }
  71.         .artist-img-wrapper p {
  72.             font-size: 20px;
  73.             margin-top: 5px;
  74.         }
  75.         .artist-img-wrapper img {
  76.             min-width: 100%;
  77.             width: 100%;
  78.             height: 400px;
  79.             border-radius: 5%;
  80.         }
  81.         .header-photo {
  82.             position: relative;
  83.         }
  84.         .header-photo h2 {/*h2タグを画像の真ん中に*/
  85.             position: absolute;
  86.             top: 50%;
  87.             left: 50%;
  88.             -ms-transform: translate(-50%,-50%);
  89.             -webkit-transform: translate(-50%,-50%);
  90.             transform: translate(-50%,-50%);
  91.             margin:0;/*余計な隙間を除く*/
  92.             padding:0;/*余計な隙間を除く*/
  93.             color: white;/*文字色*/
  94.             font-size: 40px;/*文字サイズ*/
  95.             text-align:center;/*pタグ内で更に中央寄せ*/
  96.             font-family: 'Quicksand',sans-serif;
  97.             font-weight: "bold";
  98.         }
  99.         .header-photo img {
  100.             width: 99.5%;
  101.         }
  102.         .artist-art img {
  103.             width: 300px;
  104.             height: 300px;
  105.         }
  106.         .img-wrapper-artist {
  107.         }
  108.         .img-wrapper-artist img {
  109.             padding-bottom: 5px;
  110.         }
  111.         .top-left {
  112.             position: absolute;
  113.             top: 25px;
  114.             left: 25px;
  115.             color: white;
  116.         }
  117.     </style>
  118. {% endblock %}
  119. {% block main %}
  120.     <div class="header-photo">
  121.         <img src="https://sh-cdn.singulart.com/eyJidWNrZXQiOiJzaW5ndWxhcnQtd2Vic2l0ZS1wcm9kIiwia2V5IjoiYXJ0aXN0c1wvdjJcL3BpY3R1cmVzXC9jcm9wcGVkXC9zdHVkaW9cL2Jhc2VcLzEzMzZfc3R1ZGlvXzAwNzY1OGQ0NDRlMWE1MjhiOWRlODIxYmQ0MTRiNzEzLmpwZWciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjEyMDAsImhlaWdodCI6NDYwLCJmaXQiOiJjb3ZlciJ9LCJ0b0Zvcm1hdCI6IndlYnAiLCJ3ZWJwIjp7InF1YWxpdHkiOjgwfX19?signature=8dd9a04e219b34454723ae1876cda86063e22f77b898d6d073c648889889b95e">
  122.         <h2 class="artists-title">芸術家</h2>
  123.     </div>
  124.     <div class="artist-flex">        
  125.         {% for artist in artists %}
  126.             <div class="artist-img-wrapper under790 under620">
  127.                 <a href="/artists/detail/{{ artist.id }}">
  128.                     {# artist写真 #}
  129.                     <img src="{{ asset(artist.image |no_image_product, 'user_data') }}" alt=artist.name>
  130.                     {# artistが出品した写真(3枚まで) #}
  131.                     <div class="artist-img-wrapper2">
  132.                         {% for i in 0 .. num - 1 %}
  133.                             {% if selectedProducts is defined %}
  134.                                 {% for selectedProduct in selectedProducts[i] %}
  135.                                     {% if selectedProduct.artist_id == artist.id %}
  136.                                     {% if loop.index < 4 %}
  137.                                         <div class="img-wrapper-artist">
  138.                                             <a href="{{ url('product_detail', {'id': selectedProduct.id}) }}">
  139.                                                 <img class="img" src="{{ asset(selectedProduct.main_list_image|no_image_product, 'save_image') }}" alt="{{ selectedProduct.name }}" {% if loop.index > 5 %} loading="lazy"{% endif %}>
  140.                                             </a>
  141.                                         </div>
  142.                                     {% endif %}
  143.                                     {% endif %}
  144.                                 {% endfor %}
  145.                             {% endif %}
  146.                         {% endfor %}
  147.                     </div>
  148.                     <p class="fontweight-bold top-left">{{ artist.name }}</p>
  149.                 </a>
  150.             </div>
  151.         {% endfor %}
  152.     </div>
  153. {% endblock %}