{% extends request.ajax ? "layout_blank.html.twig" : "layout_default.html.twig" %}

{% block meta_title %}{{ article.title }}{% endblock %}

{% block body_class %}kb-article{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item">
    <a href="{{ 'support/kb'|link }}">{{ 'Knowledge base'|trans }}</a>
</li>
<li class="breadcrumb-item">
    <a href="{{ 'support/kb'|link }}/{{ article.category.slug }}">{{ article.category.title }}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{{ article.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">
                        <h5 class="mb-1">{{ article.title }}</h5>
                        <span class="small text-muted">{{ article.views }} {{ 'views'|trans }}</span>
                </div>
            </div>
            <div class="card-body">
                <div class="list-group ms-2">
                    {{ article.content|markdown }}
                </div>
            </div>
            <div class="card-footer">
                <a href="{{ 'support/kb'|link }}" class="btn btn-primary btn-sm" type="button">{{ 'Back to all knowledge base articles'|trans }}</a>

                <a href="{{ 'support/kb'|link }}/{{ article.category.slug }}" class="btn btn-primary btn-sm" type="button">{{ 'Similar articles'|trans }}</a>
            </div>
        </div>
    </div>
</div>
{% endblock %}
