{% 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="javascript:window.location.reload();" 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:#f3f3f3;padding-top: 20px;">
        <div class="sui-container">
            <div class="sui-row">
                {% for k,cat in cover('category',{'parent_id':current_cat.id}) %}
                    {% if k is odd %}
                        <a href="{{ cat.url }}">
                            <div class="span6">
                                <div class="cv-product">
                                    <div class="img">
                                        <img src="{{ cat.logo }}">
                                    </div>
                                    <div class="text">
                                        <h1>{{ cat.title }}</h1>
                                        <p>{{ cat.description }}</p>
                                    </div>
                                </div>
                            </div>
                        </a>
                        {% else %}
                            <a href="{{ cat.url }}">
                                <div class="span6">
                                    <div class="cv-product">
                                        <div class="text">
                                            <h1>{{ cat.title }}</h1>
                                            <p>{{ cat.description }}</p>
                                        </div>
                                        <div class="img">
                                            <img src="{{ cat.logo }}">
                                        </div>
                                    </div>
                                </div>
                            </a>
                    {% endif %}
                {% endfor %}
            </div>
        </div>

    </div>

{% endblock %}