49 lines
1.8 KiB
Twig
49 lines
1.8 KiB
Twig
<aside class="admin-toolbar" id="admin-toolbar">
|
|
{# This lil' div will get the Drupal.displace() attributes added to it via JS. #}
|
|
<div class="admin-toolbar__displace-placeholder"></div>
|
|
{# ---- Start Gin Custom ---- #}
|
|
{% if icon_path %}
|
|
<div class="admin-toolbar__header">
|
|
<a class="admin-toolbar__logo" href="/">
|
|
<img alt="{{ 'Home'|t }}" src="{{ file_url(icon_path) }}" loading="eager" width=" 32" height=" 32">
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
{# ---- End Gin Custom ---- #}
|
|
|
|
{% set title_menu = 'admin-toolbar' %}
|
|
<h2 id="{{ title_menu }}" class="visually-hidden">{{ 'Administrative toolbar'|t }}</h2>
|
|
|
|
{# @todo - We should get rid of this ID below. #}
|
|
<nav id="menu-builder" class="admin-toolbar__content" aria-labelledby="{{ title_menu }}">
|
|
{# ---- Start Gin Custom ---- #}
|
|
{% if not icon_path %}
|
|
<div class="navigation-menu-wrapper menu--logo">
|
|
<h2 id="menu--logo" class="menu-title visually-hidden">{{ 'Home'|t }}</h2>
|
|
<ul class="toolbar-menu" data-once="toolbar-menu" aria-labelledby="menu--logo">
|
|
<li class="toolbar-menu__item toolbar-menu__item--level-1">
|
|
<a href="/" class="toolbar-link toolbar-link--has-icon toolbar-link--gin-home">
|
|
<span>{{ 'Home'|t }}</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{# ---- End Gin Custom ---- #}
|
|
{{ menu_top }}
|
|
{% for section in menu_middle %}
|
|
{{ section }}
|
|
{% endfor %}
|
|
</nav>
|
|
|
|
{# @todo - This sticky menu should exist under the <nav> landmark element above. #}
|
|
<div class="admin-toolbar__sticky-section">
|
|
{{ menu_bottom }}
|
|
</div>
|
|
</aside>
|
|
<script>
|
|
if (localStorage.getItem('Drupal.navigation.sidebarExpanded') !== 'false') {
|
|
document.documentElement.classList.add('admin-toolbar-expanded');
|
|
}
|
|
</script>
|