{% load wagtailadmin_tags i18n %}
<!-- Wagtail user bar embed code -->
<template id="wagtail-userbar-template">
    <div class="w-userbar w-userbar--{{ position|default:'bottom-right' }}" data-wagtail-userbar part="userbar">
        <link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/core.css' %}">
        {% hook_output 'insert_global_admin_css' %}
        {% hook_output 'insert_editor_css' %}
        <div class="w-userbar-nav">

            <svg class="w-hidden">
                <defs>
                    {% include "wagtailadmin/icons/wagtail.svg" %}
                    {% include "wagtailadmin/icons/key.svg" %}
                    {% include "wagtailadmin/icons/folder-open-inverse.svg" %}
                    {% include "wagtailadmin/icons/edit.svg" %}
                    {% include "wagtailadmin/icons/plus.svg" %}
                    {% include "wagtailadmin/icons/check.svg" %}
                    {% include "wagtailadmin/icons/cross.svg" %}
                    {% include "wagtailadmin/icons/crosshairs.svg" %}
                </defs>
            </svg>

            <button aria-controls="wagtail-userbar-items" aria-haspopup="true" class="w-userbar-trigger" id="wagtail-userbar-trigger" data-wagtail-userbar-trigger>
                {% block branding_logo %}
                    {% comment %} Intentionally not using the icon template tag to show as SVG only {% endcomment %}
                    <svg class="w-userbar-icon" aria-hidden="true">
                        <use href="#icon-wagtail-icon"></use>
                    </svg>
                {% endblock %}
                <span class="w-sr-only">{% trans 'View Wagtail quick actions' %}</span>
            </button>
            <ul aria-labelledby="wagtail-userbar-trigger" class="w-userbar-items" id="wagtail-userbar-items" role="menu">
                {% for item in items %}
                    {{ item|safe }}
                {% endfor %}
            </ul>
        </div>
    </div>
    <div data-a11y-result-outline-container></div>
</template>
<wagtail-userbar></wagtail-userbar>
<script src="{% versioned_static 'wagtailadmin/js/vendor.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/userbar.js' %}"></script>
<!-- end Wagtail user bar embed code -->
