yeti_theme-8.x-1.x-dev/templates/region/region--off-canvas-right.html.twig
templates/region/region--off-canvas-right.html.twig
{#
/**
* @file
* Yeti theme override to display off-canvas right region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*/
#}
{{ attach_library('yeti/regions.off_canvas_right') }}
{%
set wrapper_classes = [
'off-canvas-wrapper',
'region-' ~ region|clean_class,
]
%}
{%
set inner_classes = [
'off-canvas-wrapper-inner',
]
%}
{%
set content_classes = [
'off-canvas-content',
]
%}
{%
set classes = [
'off-canvas',
'position-right',
'is-closed',
]
%}
{% if content %}
<div{{ attributes.addClass(wrapper_classes) }}>
<div{{ attributes.addClass(inner_classes) }} data-off-canvas-wrapper>
<aside{{ attributes.addClass(classes) }} id="off-canvas-right" data-off-canvas>
<button class="close-button" aria-label="Close menu" type="button" data-close>
<span aria-hidden="true">×</span>
</button>
<div{{ attributes.addClass(content_classes) }} data-off-canvas-content>
{{ content }}
</div>
</aside>
</div>
</div>
{% endif %}