app/template/default/Block/categorybannerCol3.twig line 1

Open in your IDE?
  1. {% block main %}
  2.   {% if CustomerKbn == "seller" %}
  3.   
  4.   {% else %}
  5.       <div class="categorybannerCol3_hdr">カテゴリから探す<span class="underline"></span></div>
  6.       <br>
  7.       <div class="ec-role">
  8.       <div class="ec-shelfRole123">
  9.           <div class="col2002">
  10.             <!-- 米穀市場 -->
  11.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=9"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/1_banner_kome-meigara/1_banner_kome-meigara_900-225.jpg" /></a></div>
  12.             <!-- 米穀の価格帯区分 -->
  13.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=24"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/31_banner_kome-price/31_banner_kome-price_900-225.jpg" /></a></div>
  14.             <!-- 米米穀の粒区分 -->
  15.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=25"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/32_banner_kome-tsubu/32_banner_kome-tsubu_900-225.jpg" /></a></div>
  16.             <!-- 米穀の精米別の区分 -->
  17.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=26"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/33_banner_seimai/33_banner_seimai_900-225.jpg" /></a></div>
  18.             <!-- 畜産品市場 -->
  19.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=10"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/12_banner_chikusan/12_banner_chikusan_900-225.jpg" /></a></div>
  20.             <!-- 水産品市場 -->            
  21.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=11"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/13_banner_suisan/13_banner_suisan_900-225.jpg" /></a></div>
  22.             <!-- 農産品市場 -->
  23.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=12"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/14_banner_nousan/14_banner_nousan_900-225.jpg" /></a></div>
  24.             <!-- 加工食品市場 -->
  25.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=13"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/15_banner_kashoku/15_banner_kashoku_900-225.jpg" /></a></div>
  26.             <!-- ノンフード市場 -->
  27.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=14"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/16_banner_non-food/16_banner_non-food_900-225.jpg" /></a></div>
  28.             <!-- 支払方法の区分 -->
  29.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=18"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/21_banner_payment/21_banner_payment_900-225.jpg" /></a></div>
  30.             <!-- 税・送料の区分 -->
  31.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=19"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/22_banner_tax-shipping/22_banner_tax-shipping_900-225.jpg" /></a></div>
  32.             <!-- ホット商品の区分 -->
  33.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=20"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/23_banner_hot-category/23_banner_hot-category_900-225.jpg" /></a></div>
  34.             <!-- ロット区分 -->
  35.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=21"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/24_banner_lot-product/24_banner_lot-product_900-225.jpg" /></a></div>
  36.             <!-- 商品の産地区分 -->
  37.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=22"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/25_banner_product-sanchi/25_banner_product-sanchi_900-225.jpg" /></a></div>
  38.             <!-- 限定企画の区分 -->
  39.             <div class="sidepic"><a href="{{ app.request.schemeAndHttpHost }}/products/list?category_id=23"><img src="{{ app.request.schemeAndHttpHost }}/img/banner/26_banner_gentei-kikaku/26_banner_gentei-kikaku_900-225.jpg" /></a></div>
  40.           </div>
  41.       </div>
  42.       </div>
  43.     {% endif %}
  44. {% endblock %}
  45. <style>
  46.     .col2003 {
  47.       display: grid;
  48.       grid-template-columns: repeat(3, 1fr); /* 3列のグリッド */
  49.       gap: 0; /* イメージ間の間隔を0に設定 */
  50.     }
  51.     .col2002 {
  52.       display: grid;
  53.       grid-template-columns: repeat(2, 1fr); /* 2列のグリッド */
  54.       gap: 10px; /* イメージ間の間隔 */
  55.     }
  56.     
  57.     .col2003 .sidepic {
  58.       text-align: center; /* 画像を中央揃えにするため */
  59.       margin: 0; /* 縦横のマージンを0に設定 */
  60.     }
  61.     
  62.     .col2003 .sidepic img {
  63.       max-width: 100%; /* 画像を親要素に合わせてサイズ調整 */
  64.       height: auto; /* アスペクト比を維持 */
  65.     }
  66.   .categorybannerCol3_hdr {
  67.     text-decoration: none;
  68.     font-size: 24px; 
  69.     text-align: center;
  70.     position: relative;
  71.     color: black;
  72.   }
  73.   .categorybannerCol3_hdr .underline {
  74.     position: absolute;
  75.     bottom: 0;
  76.     left: 0;
  77.     right: 0;
  78.     height: 1px;
  79.     background-color: green;
  80.   }
  81. .categorybannerCol3_hdr .underline {
  82.     position: absolute;
  83.     bottom: 0;
  84.     left: 50%; /* アンダーラインの位置を調整 */
  85.     transform: translateX(-50%); /* 中央に配置 */
  86.     width: 25%; /* アンダーラインの幅を調整 */
  87.     height: 2px;
  88.     background-color: green;
  89. }
  90. </style>