app/template/default/JoolenCategoryBannerText42/Resource/template/default/banner_text.twig line 1

Open in your IDE?
  1. {#
  2. Plugin Name: JoolenCategoryBannerText42
  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. <style>
  9.     #category_banner_text img{
  10.         width: 100%;
  11.     }
  12.     .category_banner_inner{
  13.         margin-top: 20px;
  14.         margin-bottom: 20px;
  15.     }
  16.     .category_banner_textarea{
  17.         margin-top: 20px;
  18.         padding: 15px 20px;
  19.         background: rgb(248, 248, 248);
  20.         word-break: break-all;
  21.     }
  22.     @media only screen and (max-width: 767px){
  23.         .category_banner_inner{
  24.             margin-bottom: 10px;
  25.             padding-left: 20px;
  26.             padding-right: 20px;
  27.         }
  28.         .category_banner_textarea{
  29.             margin-top: 10px;
  30.             padding: 10px 15px;
  31.         }
  32.     }
  33.     .slick-slider {
  34.         margin-bottom: 50px;
  35.     }
  36.     .slick-dots {
  37.         position: absolute;
  38.         bottom: -45px;
  39.         display: block;
  40.         width: 100%;
  41.         padding: 0;
  42.         list-style: none;
  43.         text-align: center;
  44.     }
  45.     .slick-dots li {
  46.         position: relative;
  47.         display: inline-block;
  48.         width: 20px;
  49.         height: 20px;
  50.         margin: 0 5px;
  51.         padding: 0;
  52.         cursor: pointer;
  53.     }
  54.     .slick-dots li button {
  55.         font-size: 0;
  56.         line-height: 0;
  57.         display: block;
  58.         width: 20px;
  59.         height: 20px;
  60.         padding: 5px;
  61.         cursor: pointer;
  62.         color: transparent;
  63.         border: 0;
  64.         outline: none;
  65.         background: transparent;
  66.     }
  67.     .slick-dots li button:hover,
  68.     .slick-dots li button:focus {
  69.         outline: none;
  70.     }
  71.     .slick-dots li button:hover:before,
  72.     .slick-dots li button:focus:before {
  73.         opacity: 1;
  74.     }
  75.     .slick-dots li button:before {
  76.         content: " ";
  77.         line-height: 20px;
  78.         position: absolute;
  79.         top: 0;
  80.         left: 0;
  81.         width: 12px;
  82.         height: 12px;
  83.         text-align: center;
  84.         opacity: .25;
  85.         background-color: black;
  86.         border-radius: 50%;
  87.     }
  88.     .slick-dots li.slick-active button:before {
  89.         opacity: .75;
  90.         background-color: black;
  91.     }
  92.     .slick-dots li button.thumbnail img {
  93.         width: 0;
  94.         height: 0;
  95.     }
  96. </style>
  97. <script>
  98.     $(function() {
  99.         $('.main_visual').slick({
  100.             dots: true,
  101.             arrows: false,
  102.             autoplay: true,
  103.             speed: 300
  104.         });
  105.     });
  106. </script>
  107. {% if (CategoryBanners is defined and CategoryBanners | length > 0) or (CategoryBannerText is defined and CategoryBannerText) %}
  108.     <div id="category_banner_text" class="ec-sliderRole">
  109.         <div class="category_banner_inner">
  110.             {# バナー #}
  111.             {% if CategoryBanners | length > 0 %}
  112.                 <div class="main_visual">
  113.                     {% for CategoryBanner in CategoryBanners %}
  114.                         <img src="{{ asset(CategoryBanner.file_name|no_image_product, 'save_image') }}">
  115.                     {% endfor %}
  116.                 </div>
  117.             {% endif %}
  118.             {# テキスト #}
  119.             {% if CategoryBannerText %}
  120.                 {% set text = CategoryBannerText.description %}
  121.                 {% if text != null and text != ''%}
  122.                     <p class="category_banner_textarea">{{ text |raw}}</p>
  123.                 {% endif %}
  124.             {% endif %}
  125.         </div>
  126.     </div>
  127. {% endif %}