{% extends "wagtail_design_system/base.html" %}

{% load static design_system_tags wagtailcore_tags wagtailimages_tags i18n %}

{% block title %}
    <title>{{ page.seo_title|default:page.title }} — {{ settings('wagtail_design_system.WagtailDesignSystemConfig', use_default_site=True).site_title }}</title>
{% endblock title %}

{% if page.search_description %}
    {% block description %}
        <meta name="description" content="{{ page.search_description }}" />
    {% endblock description %}
{% endif %}

{% block content %}
    {% include "sites_faciles/messages.html" %}

    <div class="design-system-container design-system-my-6w">
        {% design_system_breadcrumb breadcrumb %}
        <h1>{% translate "Categories" %}</h1>
        <ul>
            {% for category in categories|dictsort:"cat_name" %}
                <li>
                    <a href="{% url 'design_system_blog:category' page.slug category.cat_slug %}"><strong>{{ category.cat_name }}</strong> ({{ category.cat_count }})</a>
                </li>
            {% endfor %}
        </ul>
    </div>

{% endblock content %}
