Mercurial > hg > cmmr2012-drupal-site
annotate core/themes/classy/templates/navigation/toolbar.html.twig @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
rev | line source |
---|---|
Chris@0 | 1 {# |
Chris@0 | 2 /** |
Chris@0 | 3 * @file |
Chris@0 | 4 * Theme override for the administrative toolbar. |
Chris@0 | 5 * |
Chris@0 | 6 * Available variables: |
Chris@0 | 7 * - attributes: HTML attributes for the wrapper. |
Chris@0 | 8 * - toolbar_attributes: HTML attributes to apply to the toolbar. |
Chris@0 | 9 * - toolbar_heading: The heading or label for the toolbar. |
Chris@0 | 10 * - tabs: List of tabs for the toolbar. |
Chris@0 | 11 * - attributes: HTML attributes for the tab container. |
Chris@0 | 12 * - link: Link or button for the menu tab. |
Chris@0 | 13 * - trays: Toolbar tray list, each associated with a tab. Each tray in trays |
Chris@0 | 14 * contains: |
Chris@0 | 15 * - attributes: HTML attributes to apply to the tray. |
Chris@0 | 16 * - label: The tray's label. |
Chris@0 | 17 * - links: The tray menu links. |
Chris@0 | 18 * - remainder: Any non-tray, non-tab elements left to be rendered. |
Chris@0 | 19 * |
Chris@0 | 20 * @see template_preprocess_toolbar() |
Chris@0 | 21 */ |
Chris@0 | 22 #} |
Chris@0 | 23 <div{{ attributes.addClass('toolbar') }}> |
Chris@0 | 24 <nav{{ toolbar_attributes.addClass('toolbar-bar', 'clearfix') }}> |
Chris@0 | 25 <h2 class="visually-hidden">{{ toolbar_heading }}</h2> |
Chris@0 | 26 {% for key, tab in tabs %} |
Chris@0 | 27 {% set tray = trays[key] %} |
Chris@0 | 28 <div{{ tab.attributes.addClass('toolbar-tab') }}> |
Chris@0 | 29 {{ tab.link }} |
Chris@0 | 30 {% spaceless %} |
Chris@0 | 31 <div{{ tray.attributes }}> |
Chris@0 | 32 {% if tray.label %} |
Chris@0 | 33 <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}"> |
Chris@0 | 34 <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3> |
Chris@0 | 35 {% else %} |
Chris@0 | 36 <nav class="toolbar-lining clearfix" role="navigation"> |
Chris@0 | 37 {% endif %} |
Chris@0 | 38 {{ tray.links }} |
Chris@0 | 39 </nav> |
Chris@0 | 40 </div> |
Chris@0 | 41 {% endspaceless %} |
Chris@0 | 42 </div> |
Chris@0 | 43 {% endfor %} |
Chris@0 | 44 </nav> |
Chris@0 | 45 {{ remainder }} |
Chris@0 | 46 </div> |