yeti_theme-8.x-1.x-dev/templates/region/region--titlebar-right.html.twig
templates/region/region--titlebar-right.html.twig
{#
/**
* @file
* Yeti theme override to display Messages region.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: HTML attributes for the containing element.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: HTML attributes for the title element.
* - content_attributes: HTML attributes for the content element.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
* - 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/titlebar') }}
{{ attach_library('yeti/topbar') }}
{%
set classes = [
'top-bar-right',
'region-' ~ region|clean_class,
]
%}
{% set heading_id = 'titlebar-right-menu' %}
{% if content %}
<nav{{ attributes.addClass(classes) }}
role="navigation"
aria-labelledby="{{ heading_id }}"
{{ attributes|without('role', 'aria-labelledby') }}>
{# Label. If not displayed, we still provide it for screen readers. #}
{% if not configuration.label_display %}
{% set title_attributes = title_attributes.addClass('show-for-sr') %}
{% endif %}
{{ title_prefix }}
<h2{{ title_attributes.setAttribute('id', heading_id) }}>{{ configuration.label }}</h2>
{{ title_suffix }}
<div class="menu-right">
{% block content %}
{{ content }}
{% endblock %}
</div>
</nav>
{% endif %}