<commit_before>{% if authorize(['admin.login', 'admin.super']) %}
    <nav id="admin-sidebar" data-quickopen="{{ config.plugins.admin.sidebar.activate == 'hover' ? 'true' : 'false' }}" data-quickopen-delay="{{ config.plugins.admin.sidebar.hover_delay }}">
        {% if config.plugins.admin.sidebar.activate != 'hover' %}
            <div id="open-handle" data-sidebar-toggle><i class="fa fa-angle-double-right"></i></div>
        {% endif %}

        <div id="admin-logo">
            {% include 'partials/logo.html.twig' %}
        </div>

        {% include 'partials/nav-user-details.html.twig' %}

        <div class="admin-menu-wrapper">
            <ul id="admin-menu">
                <li class="{{ (location == 'dashboard') ? 'selected' : '' }}">
                    <a href="{{ base_url_relative }}"><i class="fa fa-fw fa-th"></i><em>{{ "PLUGIN_ADMIN.DASHBOARD"|tu }}</em></a>
                </li>
                {% if authorize(['admin.configuration', 'admin.super']) %}
                    <li class="{{ (location == 'system' or location == 'site' or location == 'config') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/config/system"><i class="fa fa-fw fa-wrench"></i><em>{{ "PLUGIN_ADMIN.CONFIGURATION"|tu }}</em></a>
                    </li>
                {% endif %}
                {% if authorize(['admin.pages', 'admin.super']) %}
                    <li class="{{ (location == 'pages') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/pages">
                            <i class="fa fa-fw fa-file-text-o"></i>
                            <em>{{ "PLUGIN_ADMIN.PAGES"|tu }}</em>
                            <span class="badges">
                                <span class="badge count">{{ admin.pagesCount }}</span>
                            </span>
                        </a>
                    </li>
                {% endif %}
                {% if grav.twig.plugins_hooked_nav %}
                    {% for label, item in grav.twig.plugins_hooked_nav %}
                        {% if authorize([item.authorize ?: ('admin.' ~ (item.location ?: item.route)), 'admin.super']) %}
                            <li class="{{ (location == (item.location ?: item.route)) ? 'selected' : '' }}">
                                <a href="{{ base_url_relative }}/{{ item.route ?: item.location }}">
                                    <i class="fa fa-fw {{ item.icon }}"></i>
                                    <em>{{ label|tu }}</em>
                                </a>
                            </li>
                        {% endif %}
                    {% endfor %}
                {% endif %}
                {% if authorize(['admin.plugins', 'admin.super']) %}
                    <li class="{{ (location == 'plugins') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/plugins">
                            <i class="fa fa-fw fa-plug"></i>
                            <em>{{ "PLUGIN_ADMIN.PLUGINS"|tu }}</em>
                            <span class="badges">
                                <span class="badge updates"></span>
                                <span class="badge count">{{ admin.plugins|length }}</span>
                            </span><commit_msg>Add badge to plugins hooked nav (#1147)<commit_after>{% if authorize(['admin.login', 'admin.super']) %}
    <nav id="admin-sidebar" data-quickopen="{{ config.plugins.admin.sidebar.activate == 'hover' ? 'true' : 'false' }}" data-quickopen-delay="{{ config.plugins.admin.sidebar.hover_delay }}">
        {% if config.plugins.admin.sidebar.activate != 'hover' %}
            <div id="open-handle" data-sidebar-toggle><i class="fa fa-angle-double-right"></i></div>
        {% endif %}

        <div id="admin-logo">
            {% include 'partials/logo.html.twig' %}
        </div>

        {% include 'partials/nav-user-details.html.twig' %}

        <div class="admin-menu-wrapper">
            <ul id="admin-menu">
                <li class="{{ (location == 'dashboard') ? 'selected' : '' }}">
                    <a href="{{ base_url_relative }}"><i class="fa fa-fw fa-th"></i><em>{{ "PLUGIN_ADMIN.DASHBOARD"|tu }}</em></a>
                </li>
                {% if authorize(['admin.configuration', 'admin.super']) %}
                    <li class="{{ (location == 'system' or location == 'site' or location == 'config') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/config/system"><i class="fa fa-fw fa-wrench"></i><em>{{ "PLUGIN_ADMIN.CONFIGURATION"|tu }}</em></a>
                    </li>
                {% endif %}
                {% if authorize(['admin.pages', 'admin.super']) %}
                    <li class="{{ (location == 'pages') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/pages">
                            <i class="fa fa-fw fa-file-text-o"></i>
                            <em>{{ "PLUGIN_ADMIN.PAGES"|tu }}</em>
                            <span class="badges">
                                <span class="badge count">{{ admin.pagesCount }}</span>
                            </span>
                        </a>
                    </li>
                {% endif %}
                {% if grav.twig.plugins_hooked_nav %}
                    {% for label, item in grav.twig.plugins_hooked_nav %}
                        {% if authorize([item.authorize ?: ('admin.' ~ (item.location ?: item.route)), 'admin.super']) %}
                            <li class="{{ (location == (item.location ?: item.route)) ? 'selected' : '' }}">
                                <a href="{{ base_url_relative }}/{{ item.route ?: item.location }}">
                                    <i class="fa fa-fw {{ item.icon }}"></i>
                                    <em>{{ label|tu }}</em>
                                    {% if item.badge %}
                                    <span class="badges {% if item.badge.updates is defined %}with-updates{% endif %}">
                                        {% if item.badge.updates is defined %}<span class="badge updates">{{ item.badge.updates }}</span>{% endif %}
                                        <span class="badge count">{{ item.badge.count }}</span>
                                    </span>
                                    {% endif %}
                                </a>
                            </li>
                        {% endif %}
                    {% endfor %}
                {% endif %}
                {% if authorize(['admin.plugins', 'admin.super']) %}
                    <li class="{{ (location == 'plugins') ? 'selected' : '' }}">
                        <a href="{{ base_url_relative }}/plugins">
                            <i class="fa fa-fw fa-plug"></i>
                            <em>{{ "PLUGIN_ADMIN.PLUGINS"|tu }}</em>
                            <span class="badges">
                                <span class="badge updates"></span>
                                <span class="badge count">{{ admin.plugins|length }}</span>
                            </span>
{'fraction_non_alphanumeric': 0.18147368421052631, 'fraction_numerical': 0.0005614035087719298, 'mean_word_length': 1.320416802344513, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3097352', 'n_tokens_mistral': 2023, 'n_tokens_neox': 1832, 'n_words': 372}