{#
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() {
var listLength = $(this).find('.ec-newsRole__newsItem').length;
if (listLength > 5) {
$(this).find('.ec-newsRole__newsItem:gt(4)').each(function() {
$(this).hide();
});
$(this).append('<a id="news_readmore" class="ec-inlineBtn--top">{{ 'more'|trans }}</a>');
var dispNum = 5;
$(this).find('#news_readmore').click(function() {
dispNum += 5;
$(this).parent().find('.ec-newsRole__newsItem:lt(' + dispNum + ')').show();
if (dispNum >= listLength) {
$(this).hide();
}
})
}
});
$('.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');
$newsDescription.slideDown(300);
} else {
$newsItem.removeClass('is_active');
$newsDescription.slideUp(300);
}
return false;
});
});
</script>
{% endblock %}
<div class="ec-role">
<div class="ec-newsRole mt_middle">
<div class="ec-secHeading">
<span class="ec-secHeading__en font_e">{{ '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 font_e">
{{ News.publish_date|date_format('', 'Y.m.d') }}
</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">
▼
</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>
<div class="top_banner mt_large">
<a href="{{ url('product_list', {'category_id': '2'}) }}"><img src="{{ asset('assets/img/top/banner01.jpg') }}" alt="Re:>>> あの頃の美しい髪を取り戻す" width="600" height="367"></a>
<a href="{{ url('product_list', {'category_id': '8'}) }}"><img src="{{ asset('assets/img/top/banner03.jpg') }}" alt="Re:>>> Class S シリーズ なりたい髪に私は変わる" width="600" height="367"></a>
<a href="{{ url('product_list', {'category_id': '12'}) }}"><img src="{{ asset('assets/img/top/banner04.jpg') }}" alt="KASUI" width="600" height="367"></a>
<a href="{{ url('product_list', {'category_id': '17'}) }}"><img src="{{ asset('assets/img/top/banner05.jpg') }}" alt="muts hair touch" width="600" height="367"></a>
</div>