{% extends request.ajax ? "layout_blank.html.twig" : "layout_default.html.twig" %}
{% set active_menu = 'kb' %}

{% block meta_title %}{{ category.title }}{% endblock %}
{% block meta_description %}{{ category.description|default('Browse support articles in this knowledge base category.'|trans) }}{% endblock %}

{% block body_class %}kb-category{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item"><a href="{{ 'support/kb'|url }}">{{ 'Knowledge Base'|trans }}</a>
<li class="breadcrumb-item active" aria-current="page">{{ category.title }}</li>
{% endblock %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <div class="card mb-4">
            <div class="card-header py-3 py-3">
                <div class="d-flex justify-content-between align-items-center">
                    <div>
                        <h1 class="mb-1">{{ category.title }}</h1>
                        <span class="small text-muted">{{ category.description }}</span>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <div class="list-group ms-2">
                    {% for i, article in category.articles %}
                        <a class="list-group-item list-group-item-action" href='{{ "support/kb/#{article.category.slug}/#{article.slug}"|url }}'>{{ article.title }}</a>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
