bootstrap_italia-8.x-0.x-dev/templates/modules/toc-js.html.twig
templates/modules/toc-js.html.twig
{#
/**
* @file
* Default theme implementation to display a responsive table of contents.
*
* Returns HTML for a responsive table of contents.
*
* Available variables:
* - entity: the entity the TOC belongs to.
* - title: the title to display for the table of content.
* - tag: the tag to use for the title.
*
* @ingroup themeable
*/
#}
{% apply spaceless %}
<div id="sticky-anchor"></div>
<nav class="navbar it-navscroll-wrapper it-bottom-navscroll navbar-expand-lg" data-bs-navscroll>
<button
class="custom-navbar-toggler"
type="button"
aria-controls="navbar-table-of-contents"
aria-expanded="false"
aria-label="{{ 'Toggle navigation'|t }}"
data-bs-target="#navbar-table-of-contents"
data-bs-toggle="navbarcollapsible"
>
<span class="it-list"></span>
{{ title }}
</button>
<div class="navbar-collapsable" id="navbar-table-of-contents">
<div class="overlay"></div>
<div class="close-div visually-hidden">
<button class="btn close-menu" type="button">
<span class="it-close"></span>
{{ 'Close'|t }}
</button>
</div>
<a class="it-back-button" href="#">
{% include '@bi-bcl/icon/icon.html.twig' with {
name: 'it-chevron-left',
size: 'sm',
color: 'primary',
alignment: 'top'
} %}
<span>{{ 'Close menu'|t }}</span>
</a>
<div class="menu-wrapper">
<div {{ attributes.addClass(['link-list-wrapper', 'menu-link-list']) }}>
<h3 {{ title_attributes.addClass('no_toc') }}>{{ title }}</h3>
<nav role="navigation" aria-label="{{ title }}"></nav>
</div>
</div>
</div>
</nav>
{% endapply %}
