{% extends 'base_m.html.twig' %}
{% block title %}{{ current_cat.title }} - {{ cover('site','title') }}{% endblock %}
{% block keywords %}{{ current_cat.keywords }}{% endblock %}
{% block description %}{{ current_cat.description }}{% endblock %}
{% block container %}

    <nav data-am-widget="menu" class="am-menu  am-menu-default" style="background-color: #f6f6f6;border-bottom: 1px solid #f1f1f1;">
        <a href="javascript: void(0)" class="am-menu-toggle">
            <i class="am-menu-toggle-icon am-icon-bars"></i>
        </a>
        <ul class="am-menu-nav am-avg-sm-4">
            {% for son_cat in cover('category',{'parent_id':current_cat.parent_id,'except':current_cat.id}) %}
                <li><a href="{{ son_cat.url }}">{{ son_cat.title }}</a></li>
            {% endfor %}
        </ul>
    </nav>
    <div data-am-widget="list_news" class="am-list-news am-list-news-default" >
        
        <div class="am-list-news-bd">
            <ul class="am-list">

    {% if has_content %}

        {% for list in items %}
            {% if list.cover is empty %}
                <li class="am-g am-list-item-desced">

                    <div class=" am-list-main">
                        <h3 class="am-list-item-hd"><a href="{{ list.url }}" class="">{{ list.title }}</a></h3>
                        <div class="am-list-item-text">{{ list.create_time|date('Y-m-d H:i:s') }} </div>
                    </div>
                </li>

                {% else %}

                    <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                        <div class="am-u-sm-4 am-list-thumb">
                            <a href="{{ list.url }}" class="">
                                <img src="{{ list.cover }}" alt="{{ list.title }}"/>
                            </a>
                        </div>

                        <div class=" am-u-sm-8 am-list-main">
                            <h3 class="am-list-item-hd"><a href="{{ list.url }}" class="">{{ list.title }}</a></h3>
                            <div class="am-list-item-text">{{ list.create_time|date('Y-m-d H:i:s') }} </div>
                        </div>
                    </li>

            {% endif %}
        {% endfor%}

    {% endif %}





            </ul>


            <ul class="am-pagination cv-center">
                {% if has_last_page %}
                    <li><a href="{{ last_page_url }}">&laquo; 上一页</a></li>
                {% endif %}
                {% if has_next_page %}
                    <li><a href="{{ next_page_url }}">下一页 &raquo;</a></li>
                {% endif %}
            </ul>
        </div>

    </div>

{% endblock %}