{% extends 'base.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 %}

    <div class="sui-navbar cv-subnav" style="border-bottom: 1px solid #e9e9e9">
        <div class="navbar-inner">
            <div class="sui-container">
                <a href="#" class="sui-brand">{{ current_cat.title }}</a>
                <ul class="sui-nav pull-right" style="margin-right: 30px;">
                    {% 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>
            </div>
        </div>
    </div>



    {% if has_content %}
        <div class="cv-product-list cv-mt-20">
            <div class="sui-container">
                <div class="sui-row">
                    {% for list in items %}
                        <div class="span3">
                            <div class="cv-product-thumbnails">
                                <a href="{{ list.url }}"><img src="{{ list.cover }}" /></a>
                            </div>
                            <div class="info">
                                <h3 class="title">{{ list.title }}</h3>
                                <p class="desc">{{ list.description }}</p>
                                <button class=""><a href="{{ list.url }}">探索更多 ></a></button>
                            </div>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>
        <div class="sui-pagination pagination-large cv-center">
            <ul>
                {% if has_last_page %}
                    <li class="prev"><a href="{{ last_page_url }}">«上一页</a></li>
                {% endif %}
                {% if has_next_page %}
                    <li class="next"><a href="{{ next_page_url }}">下一页»</a></li>
                {% endif %}
            </ul>
        </div>
    {% endif %}

{% endblock %}