top-bar--gin.html.twig

Same filename and directory in other branches
  1. main core/themes/admin/templates/navigation/top-bar--gin.html.twig

Default theme implementation for the navigation top bar.

Available variables:

  • local_tasks: The local tasks for the current route.

File

core/themes/admin/templates/navigation/top-bar--gin.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the navigation top bar.
  5. *
  6. * Available variables:
  7. * - local_tasks: The local tasks for the current route.
  8. *
  9. * @ingroup themeable
  10. */
  11. #}
  12. {% set attributes = create_attribute() %}
  13. {% if local_tasks %}
  14. {% set attributes = attributes.setAttribute('data-offset-top', '') %}
  15. {% endif %}
  16. <div {{ attributes.addClass('top-bar gin--navigation-top-bar').setAttribute('data-drupal-admin-styles', '') }}>
  17. <div class="top-bar__content">
  18. {% include '@navigation/toolbar-button.html.twig' ignore missing with {
  19. attributes: create_attribute({'aria-expanded': 'false', 'aria-controls': 'admin-toolbar'}),
  20. icon: 'burger',
  21. text: 'Expand sidebar'|t,
  22. extra_classes: 'top-bar__burger',
  23. } only %}
  24. <div class="top-bar__tools">
  25. {% if gin_breadcrumbs %}
  26. {{ gin_breadcrumbs }}
  27. {% endif %}
  28. {% if local_tasks %}
  29. {{ local_tasks }}
  30. {% endif %}
  31. {{- tools -}}
  32. </div>
  33. <div class="top-bar__context">
  34. {{- context -}}
  35. </div>
  36. <div class="top-bar__actions">
  37. {% if gin_local_actions %}
  38. <ul class="local-actions">
  39. {{ gin_local_actions }}
  40. </ul>
  41. {% endif %}
  42. {% if gin_form_actions %}
  43. {{ gin_form_actions }}
  44. {% endif %}
  45. {{- actions -}}
  46. </div>
  47. </div>
  48. </div>

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.