{#
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() %}
{% block javascript %}
<script>
/*
$(function() {
$('.ec-newsRole__news').each(function() {
$(this).parent().find('.ec-newsRole__newsItem').show();
});
$('.ec-newsRole__newsHeading').on('click', function() {
$newsItem = $(this).parent('.ec-newsRole__newsItem');
$newsDescription = $newsItem.children('.ec-newsRole__newsDescription');
if ($newsDescription.css('display') == 'none') {
$newsItem.addClass('is_active');
$(this).find('img').attr('src','{{ asset("assets/icon/side-arrow-right-gray2.svg") }}');
$newsDescription.slideDown(300);
$(this).find('img').css({
'transform':'rotate(90deg)'
});
} else {
$(this).find('img').attr('src','{{ asset("assets/icon/side-arrow-right-gray2.svg") }}');
$(this).find('img').css({
'transform':'rotate(0deg)'
});
$newsItem.removeClass('is_active');
$newsDescription.slideUp(300);
}
return false;
});
});*/
</script>
{% endblock %}
{% if NewsList|length > 0 %}
<div class="ec-role" id="news">
<div class="ec-newsRole ec-contentRole">
<div class="ec-secHeading">
<div>
<span class="ec-secHeading__en">{{ 'NEWS'|trans }}</span>
<img src="{{ asset('assets/icon/slash.svg') }}" alt="" class="ec-slash is-pc">
<span class="ec-secHeading__ja">{{ '新着情報'|trans }}</span>
</div>
</div>
<div class="ec-newsRole__news">
{% for News in NewsList %}
<div class="ec-newsRole__newsItem">
<a class="ec-newsRole__newsHeading" href="/news/view/{{ News.id }}">
<div class="ec-newsRole__newsDate">
{{ News.publish_date|date_day }}
</div>
<div class="ec-newsRole__newsColumn">
<div class="ec-newsRole__newsTitle">
{{ News.title|raw }}
</div>
</div>
</a>
</div>
{% endfor %}
</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|raw }}
</div>
{% if News.description or News.url %}
<div class="ec-newsRole__newsClose">
<a class="ec-newsRole__newsCloseBtn">
<img src="{{ asset("assets/icon/side-arrow-right-gray2.svg") }}" alt="">
</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>
{% endif %}