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

Open in your IDE?
  1. {#
    This file is part of EC-CUBE
    
    Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
    
    http://www.ec-cube.co.jp/
    
    For the full copyright and license information, please view the LICENSE
    file that was distributed with this source code.
    #}
    {% set NewsList = repository('Eccube\\Entity\\News').getList() %}
    
    {#<div class="ec-role">
        <div class="ec-newsRole">
            <div class="ec-secHeading">
                <span class="ec-secHeading__en">{{ 'NEWS'|trans }}</span>
                <span class="ec-secHeading__line"></span>
                <span class="ec-secHeading__ja">{{ '新着情報'|trans }}</span>
            </div>
            <div class="ec-newsRole__news">
                {% for News in NewsList %}
                    <div class="ec-newsRole__newsItem">
                        <div class="ec-newsRole__newsHeading">
                            <div class="ec-newsRole__newsDate">
                                {{ News.publish_date|date_day }}
                            </div>
                            <div class="ec-newsRole__newsColumn">
                                <div class="ec-newsRole__newsTitle">
                                    {{ News.title }}
                                </div>
                                {% if News.description or News.url %}
                                    <div class="ec-newsRole__newsClose">
                                        <a class="ec-newsRole__newsCloseBtn">
                                            <i class="fas fa-angle-down"></i>
                                        </a>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                        <div class="ec-newsRole__newsDescription">
                            {{ News.description|raw|nl2br }}
                            {% if News.url %}
                                <br>
                                <a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}>{{ '詳しくはこちら'|trans }}</a>
                            {% endif %}
                        </div>
                    </div>
                {% endfor %}
            </div>
        </div>
    </div>#}
    <section class="rf-topics-section d-none" id="topics">
        <div class="container">
            <h3 class="rf-topics-title">TOPICS</h3>
            <div class="rf-topics">
                {% for News in NewsList %}
                    <article class="rf-topic">
                        <p class="rf-topic-date">{{ News.publish_date|date_day }}</p>
                        <h3 class="rf-topic-title">{{ News.title }}</h3>
                        {% if News.description %}
                            <p class="rf-topic-text">{{ News.description|raw|nl2br }}</p>
                        {% endif %}
                    </article>
                {% endfor %}
            </div>
        </div>
    </section>