{% extends 'default_frame.twig' %}
{% block main %}
{{ include('Block/banner.twig', { 'image': asset('assets/img/topic.png', "user_data"), 'title': 'TOPICS', 'subtitle': 'トピックス' }) }}
<div class="topic">
<div class="topic__container">
<div class="topic__list">
{% if pagination.totalItemCount > 0 %}
<div class="topic__list__inner">
{% for Blog in pagination %}
<a class="topic__post" href="{{ url('topic_detail', {'id': Blog.slug ? Blog.slug : Blog.id}) }}">
<div class="topic__post__image">
<img src="{{ asset(Blog.getMainListImage|no_image_product, 'save_image') }}" />
</div>
<div class="topic__post__content">
<h2 class="topic__post__title">
{{ Blog.getTitle|length > 45 ? Blog.getTitle|striptags|replace({(' '):' '})|slice(0, 45)|raw ~ '...' : Blog.getTitle|raw }}
</h2>
<p class="topic__post__date">
{{ Blog.release_date|date('Y年m月d日')}}
</p>
<p class="topic__post__desc">
{{ Blog.getFigCaption }}
</p>
</div>
</a>
{% endfor %}
</div>
<div class="ec-pagerRole">
{% include "pager.twig" with {'pages': pagination.paginationData, 'routes' : 'topic'} %}
</div>
{% endif %}
</div>
<div class="topic__archive">
<div class="topic__archive__title">
月別アーカイブ
</div>
<div class="topic__archive__list">
{% for key, month in monthArr %}
<a href="{{ url('topic', {date: key}) }}">{{ month }}</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}