app/template/ss4002/Block/news.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  4. http://www.lockon.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. {% set NewsList = repository('Eccube\\Entity\\News').getList() %}
  9. <div class="b-news">
  10.     <div class="b-news__body">
  11.         <h2 class="b-news__title c-animation-fade js-animation-fade">
  12.             <span class="b-news__title--main">{{ 'News'|trans }}</span>
  13.             <span class="b-news__title--sub">{{ 'Information & Updates'|trans }}</span>
  14.         </h2>
  15.         <div class="b-news__contents c-animation-fade js-animation-fade" id="js-news__contents">
  16.             {% for News in NewsList %}
  17.                 <section class="b-news__post js-news__post">
  18.                     <header class="b-news__post-heading{% if News.description or News.url %} js-news__post-heading{% endif %}{% if News.description or News.url %} has-link{% endif %}">
  19.                         <div class="b-news__post-heading-contents">
  20.                             <p class="b-news__post-date">{{ News.publish_date|date_day }}</p>
  21.                             <h3 class="b-news__post-title">{{ News.title }}</h3>
  22.                         </div>
  23.                         {% if News.description or News.url %}
  24.                             <div class="b-news__post-actions">
  25.                                 <i class="b-news__post-actions-icon c-animation--rotate-forward material-icons">expand_more</i>
  26.                             </div>
  27.                         {% endif %}
  28.                     </header>
  29.                     <div class="b-news__post-contents js-news__post-contents">
  30.                         {{ News.description|raw|nl2br }}{% if News.url %}<a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}>{{ '詳しくはこちら'|trans }}</a>{% endif %}
  31.                     </div>
  32.                 </section>
  33.             {% endfor %}
  34.             {% if NewsList|length > 5 %}
  35.                 <div class="b-news__actions" id="js-news__actions">
  36.                     <div class="b-news__actions-item">
  37.                         <button class="c-button mdc-button" id="js-news-button" data-mdc-auto-init="MDCRipple">
  38.                             <span class="c-button__label mdc-button__label">もっと見る</span>
  39.                         </button>
  40.                     </div>
  41.                 </div>
  42.             {% endif %}
  43.         </div>
  44.     </div>
  45. </div>
  46. {# scriptはindex.twigに記載 #}