{% 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">
        <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.id}) %}
                        <li><a href="{{ son_cat.url }}">{{ son_cat.title }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>


    <div style="width: 100%;background-color: #f6f6f6;padding-top: 20px;">
        <div class="sui-container">
            {% if has_content %}
                {% for arc in items %}
                    {% if arc.cover is empty %}
                        <a href="{{ arc.url }}">
                            <div class="cv-newsroom-box">
                                <div class="sui-row" style="height: 70px; background-color: #fff;padding: 25px 15px 0 15px;">
                                    <div class="span3" style="margin-top: 10px;">
                                        <p class="data-e" style="color: #FFA955;">新闻稿</p>
                                        <p class="data-e">{{ arc.create_time|date('Y-m-d H:i:s') }}</p>
                                    </div>
                                    <div class="span8" style="margin-left: 0;">
                                        <p class="data-t">{{ arc.title }}</p>
                                        <p style=" color: #005aab;">了解更多 ></p>
                                    </div>
                                </div>
                            </div>
                        </a>
                    {% else %}
                        <div class="cv-case-box">
                            <div class="img"><img src="{{ arc.cover }}" /></div>
                            <div class="cap">
                                <h1 class="title">{{ arc.title }}</h1>
                                <p class="desc">{{ arc.description }}</p>
                                <p><button class="visit"><a href="{{ arc.url }}">查看项目详细</a></button></p>
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% else %}
                没有内容
            {% endif %}


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

        </div>

    </div>

{% endblock %}