{#
This file is part of EC-CUBE
Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.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="b-news">
<div class="b-news__body">
<h2 class="b-news__title c-animation-fade js-animation-fade">
<span class="b-news__title--main">{{ 'News'|trans }}</span>
<span class="b-news__title--sub">{{ 'Information & Updates'|trans }}</span>
</h2>
<div class="b-news__contents c-animation-fade js-animation-fade" id="js-news__contents">
{% for News in NewsList %}
<section class="b-news__post js-news__post">
<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 %}">
<div class="b-news__post-heading-contents">
<p class="b-news__post-date">{{ News.publish_date|date_day }}</p>
<h3 class="b-news__post-title">{{ News.title }}</h3>
</div>
{% if News.description or News.url %}
<div class="b-news__post-actions">
<i class="b-news__post-actions-icon c-animation--rotate-forward material-icons">expand_more</i>
</div>
{% endif %}
</header>
<div class="b-news__post-contents js-news__post-contents">
{{ News.description|raw|nl2br }}{% if News.url %}<a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}>{{ '詳しくはこちら'|trans }}</a>{% endif %}
</div>
</section>
{% endfor %}
{% if NewsList|length > 5 %}
<div class="b-news__actions" id="js-news__actions">
<div class="b-news__actions-item">
<button class="c-button mdc-button" id="js-news-button" data-mdc-auto-init="MDCRipple">
<span class="c-button__label mdc-button__label">もっと見る</span>
</button>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{# scriptはindex.twigに記載 #}