app/template/default/JoolenCategoryIcon4/Resource/template/default/category_icon_pc.twig line 1

Open in your IDE?
  1. {#
  2. Plugin Name: JoolenCategoryIcon4
  3. Copyright(c) joolen inc. All Rights Reserved.
  4. https://www.joolen.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. {# アイコン用CSS #}
  9. <style>
  10.     .l-categorynav_list_pc .l-categorynav_img{
  11.         width: 100%;
  12.         max-width: 60px;
  13.     }
  14.     .l-categorynav_list_pc .l-categorynav_title{
  15.         margin-left: 10px;
  16.     }
  17.     .ec-itemNav__nav li ul li .l-categorynav_list_pc{
  18.         position: relative;
  19.         min-height: 84px;
  20.         display: flex;
  21.         align-items: center;
  22.     }
  23.     .ec-itemNav__nav li ul li .l-categorynav_list_pc .l-categorynav_img{
  24.         width: 100%;
  25.         max-width: 50px;
  26.     }
  27.     .ec-itemNav__nav li ul li .l-categorynav_list_pc .l-categorynav_title{
  28.         -webkit-line-clamp: 2;
  29.         -webkit-box-orient: vertical;
  30.         overflow: hidden;
  31.     }
  32.     @media only screen and (min-width: 768px){
  33.         .ec-itemNav__nav{
  34.             text-align: left;
  35.             display: flex;
  36.             flex-wrap: wrap;
  37.             align-items: center;
  38.             justify-content: center;
  39.         }
  40.         .ec-itemNav__nav li a {
  41.             display: flex;
  42.             align-items: center;
  43.         }
  44.         .ec-itemNav__nav li ul li:hover > ul > li{
  45.             width: 100%;
  46.         }
  47.         .ec-itemNav__nav li ul li ul:before{
  48.             top: 30px;
  49.         }
  50.     }
  51. </style>
  52. {# アイコン画像の差し込み #}
  53. <script type="text/javascript">
  54.     {% if categoryImages is defined %}
  55.     $(function () {
  56.         {% for categoryId, categoryImage in categoryImages %}
  57.             $("#category_icon_pc_{{ categoryId }}").before('<img src="{{ asset(categoryImage|no_image_product, 'save_image') }}" class="l-categorynav_img">');
  58.         {% endfor %}
  59.     });
  60.     {% endif %}
  61. </script>