app/template/default/Block/new_topic.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. <div class="ec-newTopicRole">
  9.     <div class="ec-secNewHeading is-center text-center bgextend bgLRextendTrigger">
  10.         <div class="bgappearTrigger">
  11.             <p class="ec-secNewHeading__en scroll-fadein">{{ 'TOPICS'|trans }}</p>
  12.             <p class="ec-secNewHeading__ja scroll-fadein">{{ 'トピックス'|trans }}</p>
  13.         </div>
  14.     </div>
  15.     {% if Blogs is defined and Blogs|length > 0 %}
  16.         <div class="ec-topicRole__list scroll-fadein-delay1">
  17.             {% for Blog in Blogs %}
  18.                 <div class="ec-topicRole__listItem ">
  19.                     <a href="{{ url('cm_blog_pro_page_detail', {'id': Blog.slug ? Blog.slug : Blog.id}) }}">
  20.                         <img src="{{ asset(Blog.getMainListImage|no_image_product, 'save_image') }}" />
  21.                     </a>
  22.                     <p class="ec-topicRole__listItemTitle">{{ Blog.getTitle|length > 45 ? Blog.getTitle|striptags|replace({('&nbsp;'):' '})|slice(0, 45)|raw ~ '...' : Blog.getTitle|raw }}</p>
  23.                 </div>
  24.             {% endfor %}
  25.         </div>
  26.     {% else %}
  27.         <div class="ec-newTopicRole__defined scroll-fadein-delay1">
  28.             <div class="ec-newTopicRole__defined__block">
  29.                 <div class="ec-newTopicRole__defined__block__inner">
  30.                     <img src="{{ asset("assets/img/common/logo.png", "user_data") }}" alt="株式会社ジュークボックス"  width="70" height="64" loading="lazy">
  31.                     <p class="ec-newTopicRole__defined__block__name">株式会社ジュークボックス</p>
  32.                 </div>
  33.             </div>
  34.             
  35.             <p class="ec-newTopicRole__defined__text">只今準備中です。</p>
  36.         </div>
  37.     {% endif %}
  38.    
  39. </div>
  40. {% block javascript %}
  41.     <script>
  42.         $(function() {
  43.             var itemLength = $(".ec-topicRole__listItem") ? $(".ec-topicRole__listItem").length : 3;
  44.             $('.ec-topicRole__list').slick({
  45.                 dots: false,
  46.                 arrows: false,
  47.                 autoplay: false,
  48.                 speed: 300,
  49.                 slidesToShow: itemLength,
  50.                 responsive: [
  51.                     {
  52.                         breakpoint: 769,
  53.                         settings: {
  54.                             initialSlide: 0,
  55.                             slidesToShow: 1.5,
  56.                             infinite: false
  57.                         }
  58.                     }
  59.                 ]
  60.             });
  61.         });
  62.     </script>
  63. {% endblock javascript %}