{% 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 %}

    {#<img class="am-img-responsive" src="http://localhost/niukou/resources/upload/20170731/38f694e082d1aa3cecb202dbb9f27e25.jpg">#}

    <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>



    {% if has_content %}
        <ul data-am-widget="gallery" class="am-gallery am-avg-sm-1 am-avg-md-3 am-avg-lg-4 am-gallery-default cv-product-list-box" >
            {% for list in items %}
                <li>
                    <div class="am-gallery-item">
                        <img src="{{ list.cover }}"  alt="{{ list.title }}"/>
                        <h3 class="am-gallery-title">{{ list.title }}</h3>
                        <div class="expore"><a href="{{ list.url }}">探索更多 ></a></div>
                    </div>
                </li>
            {% endfor %}
        </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>
    {% endif %}

{% endblock %}