"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/themes/stable/templates/navigation/toolbar.html.twig" (26 Nov 2020, 1598 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {#
    2 /**
    3  * @file
    4  * Theme override for the administrative toolbar.
    5  *
    6  * Available variables:
    7  * - attributes: HTML attributes for the wrapper.
    8  * - toolbar_attributes: HTML attributes to apply to the toolbar.
    9  * - toolbar_heading: The heading or label for the toolbar.
   10  * - tabs: List of tabs for the toolbar.
   11  *   - attributes: HTML attributes for the tab container.
   12  *   - link: Link or button for the menu tab.
   13  * - trays: Toolbar tray list, each associated with a tab. Each tray in trays
   14  *   contains:
   15  *   - attributes: HTML attributes to apply to the tray.
   16  *   - label: The tray's label.
   17  *   - links: The tray menu links.
   18  * - remainder: Any non-tray, non-tab elements left to be rendered.
   19  *
   20  * @see template_preprocess_toolbar()
   21  */
   22 #}
   23 <div{{ attributes.addClass('toolbar') }}>
   24   <nav{{ toolbar_attributes.addClass('toolbar-bar') }}>
   25     <h2 class="visually-hidden">{{ toolbar_heading }}</h2>
   26     {% for key, tab in tabs %}
   27       {% set tray = trays[key] %}
   28       <div{{ tab.attributes.addClass('toolbar-tab') }}>
   29         {{ tab.link }}
   30         {% spaceless %}
   31           <div{{ tray.attributes }}>
   32             {% if tray.label %}
   33               <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}">
   34                 <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3>
   35             {% else %}
   36               <nav class="toolbar-lining clearfix" role="navigation">
   37             {% endif %}
   38             {{ tray.links }}
   39             </nav>
   40           </div>
   41         {% endspaceless %}
   42       </div>
   43     {% endfor %}
   44   </nav>
   45   {{ remainder }}
   46 </div>