This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/core/themes/bartik/templates/block--system-menu-block.html.twig

22 lines
779 B
Twig

{% extends "@classy/block/block--system-menu-block.html.twig" %}
{#
/**
* @file
* Bartik's theme implementation for a menu block.
*
* @ingroup themeable
*/
#}
{% set show_anchor = "show-" ~ attributes.id|clean_id %}
{% set hide_anchor = "hide-" ~ attributes.id|clean_id %}
{% block content %}
<div{{ content_attributes.addClass('content') }}>
{# When rendering a menu without label, render a menu toggle. #}
<div class="menu-toggle-target menu-toggle-target-show" id="{{ show_anchor }}"></div>
<div class="menu-toggle-target" id="{{ hide_anchor }}"></div>
<a class="menu-toggle" href="#{{ show_anchor }}">{{ 'Menu'|t }}</a>
<a class="menu-toggle menu-toggle--hide" href="#{{ hide_anchor }}">{{ 'Menu'|t }}</a>
{{ content }}
</div>
{% endblock %}