app/template/default/Category/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. {% set mypageno = 'index' %}
  10. {% set body_class = 'mypage' %}
  11. {% block stylesheet %}
  12.     <style>
  13.         .header-photo {
  14.             position: relative;
  15.         }
  16.         .header-photo div {
  17.             position: absolute;
  18.             top: 50%;
  19.             left: 50%;
  20.             -ms-transform: translate(-50%,-50%);
  21.             -webkit-transform: translate(-50%,-50%);
  22.             transform: translate(-50%,-50%);
  23.             margin:0;/*余計な隙間を除く*/
  24.             padding:0;/*余計な隙間を除く*/
  25.             color: white;/*文字色*/
  26.             font-size: 40px;/*文字サイズ*/
  27.             text-align:center;/*pタグ内で更に中央寄せ*/
  28.             font-family: 'Quicksand',sans-serif;
  29.             font-weight: "bold";
  30.         }
  31.         .header-photo img {
  32.             width: 99.5%;
  33.         }
  34.         .artists-title {
  35.             margin-left: 5%;
  36.             font-weight: bold;
  37.         }
  38.         .img-wrapper p {
  39.             color: black;
  40.         }
  41.         /* 922以下の時 */
  42.         @media screen and (max-width: 580px) {
  43.             .header-photo div {
  44.                 font-size: 30px;
  45.             }
  46.         }
  47.     </style>
  48. {% endblock %}
  49. {% block main %}
  50. <div class="header-photo">
  51.     <img src="https://uploads-ssl.webflow.com/631e594043d13c32e2c927d9/631e60467a1cf632e0fb11da_high-road.jpg">
  52.     <div class="artists-title">カテゴリー</div>
  53. </div>
  54. <div class="artCategory-flex-page">
  55.     {% for category in categories %}
  56.         <div class="img-wrapper">
  57.             <a href="/products/list?category_id={{category.id}}">
  58.                 <img src="{{ asset(category.category_image |no_image_product, 'user_data') }}" alt=category.name>
  59.                 <p>{{ category.name }}</p>
  60.             </a>
  61.         </div>
  62.     {% endfor %}
  63. </div>
  64. {% endblock %}