Mercurial > hg > isophonics-drupal-site
annotate core/modules/toolbar/templates/toolbar.html.twig @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 {# |
Chris@0 | 2 /** |
Chris@0 | 3 * @file |
Chris@0 | 4 * Default theme implementation 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 * @ingroup themeable |
Chris@0 | 23 */ |
Chris@0 | 24 #} |
Chris@0 | 25 <div{{ attributes.addClass('toolbar') }}> |
Chris@0 | 26 <nav{{ toolbar_attributes.addClass('toolbar-bar') }}> |
Chris@0 | 27 <h2 class="visually-hidden">{{ toolbar_heading }}</h2> |
Chris@0 | 28 {% for key, tab in tabs %} |
Chris@0 | 29 {% set tray = trays[key] %} |
Chris@0 | 30 <div{{ tab.attributes.addClass('toolbar-tab') }}> |
Chris@0 | 31 {{ tab.link }} |
Chris@0 | 32 {% spaceless %} |
Chris@0 | 33 <div{{ tray.attributes }}> |
Chris@0 | 34 {% if tray.label %} |
Chris@0 | 35 <nav class="toolbar-lining clearfix" role="navigation" aria-label="{{ tray.label }}"> |
Chris@0 | 36 <h3 class="toolbar-tray-name visually-hidden">{{ tray.label }}</h3> |
Chris@0 | 37 {% else %} |
Chris@0 | 38 <nav class="toolbar-lining clearfix" role="navigation"> |
Chris@0 | 39 {% endif %} |
Chris@0 | 40 {{ tray.links }} |
Chris@0 | 41 </nav> |
Chris@0 | 42 </div> |
Chris@0 | 43 {% endspaceless %} |
Chris@0 | 44 </div> |
Chris@0 | 45 {% endfor %} |
Chris@0 | 46 </nav> |
Chris@0 | 47 {{ remainder }} |
Chris@0 | 48 </div> |