{% requireAdmin %}

{% extends "_layouts/cp" %}
{% set title = "Settings"|t('app') %}


{% block content %}
    {% for category, items in craft.cp.settings(80) %}
        <h2>{{ category }}</h2>

        <ul class="icons">
            {% for handle, item in items %}
                {% set icon = item.iconMask ?? item.icon %}
                <li>
                    <a href="{% if item.url is defined %}{{ url(item.url) }}{% else %}{{ url('settings/'~handle) }}{% endif %}">
                        <div class="icon{% if item.iconMask is defined %} icon-mask{% endif %}" aria-hidden="true">
                            {{ svg(icon, sanitize=true, namespace=true) }}
                        </div>
                        {{ item.label }}
                    </a>
                </li>
            {% endfor %}
        </ul>

        {% if not loop.last %}
            <hr>
        {% endif %}
    {% endfor %}
{% endblock %}
