1. 8.5.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  2. 8.5.x core/modules/system/templates/block--system-branding-block.html.twig
  3. 8.5.x core/profiles/demo_umami/themes/umami/templates/components/branding/block--system-branding-block.html.twig
  4. 8.5.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  5. 8.5.x core/themes/bartik/templates/block--system-branding-block.html.twig
  6. 8.0.x core/modules/system/templates/block--system-branding-block.html.twig
  7. 8.0.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  8. 8.0.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  9. 8.0.x core/themes/bartik/templates/block--system-branding-block.html.twig
  10. 8.1.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  11. 8.1.x core/modules/system/templates/block--system-branding-block.html.twig
  12. 8.1.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  13. 8.1.x core/themes/bartik/templates/block--system-branding-block.html.twig
  14. 8.2.x core/modules/system/templates/block--system-branding-block.html.twig
  15. 8.2.x core/themes/bartik/templates/block--system-branding-block.html.twig
  16. 8.2.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  17. 8.2.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  18. 8.3.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  19. 8.3.x core/modules/system/templates/block--system-branding-block.html.twig
  20. 8.3.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  21. 8.3.x core/themes/bartik/templates/block--system-branding-block.html.twig
  22. 8.4.x core/modules/system/templates/block--system-branding-block.html.twig
  23. 8.4.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  24. 8.4.x core/themes/classy/templates/block/block--system-branding-block.html.twig
  25. 8.4.x core/themes/bartik/templates/block--system-branding-block.html.twig
  26. 8.6.x core/profiles/demo_umami/themes/umami/templates/components/branding/block--system-branding-block.html.twig
  27. 8.6.x core/themes/stable/templates/block/block--system-branding-block.html.twig
  28. 8.6.x core/themes/bartik/templates/block--system-branding-block.html.twig
  29. 8.6.x core/modules/system/templates/block--system-branding-block.html.twig
  30. 8.6.x core/themes/classy/templates/block/block--system-branding-block.html.twig

Bartik's theme implementation for a branding block.

Each branding element variable (logo, name, slogan) is only available if enabled in the block configuration.

Available variables:

  • site_logo: Logo for site as defined in Appearance or theme settings.
  • site_name: Name for site as defined in Site information settings.
  • site_slogan: Slogan for site as defined in Site information settings.

File

core/themes/bartik/templates/block--system-branding-block.html.twig
View source
  1. {% extends "block.html.twig" %}
  2. {#
  3. /**
  4. * @file
  5. * Bartik's theme implementation for a branding block.
  6. *
  7. * Each branding element variable (logo, name, slogan) is only available if
  8. * enabled in the block configuration.
  9. *
  10. * Available variables:
  11. * - site_logo: Logo for site as defined in Appearance or theme settings.
  12. * - site_name: Name for site as defined in Site information settings.
  13. * - site_slogan: Slogan for site as defined in Site information settings.
  14. */
  15. #}
  16. {% set attributes = attributes.addClass('site-branding') %}
  17. {% block content %}
  18. {% if site_logo %}
  19. <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home" class="site-branding__logo">
  20. <img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
  21. </a>
  22. {% endif %}
  23. {% if site_name or site_slogan %}
  24. <div class="site-branding__text">
  25. {% if site_name %}
  26. <div class="site-branding__name">
  27. <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
  28. </div>
  29. {% endif %}
  30. {% if site_slogan %}
  31. <div class="site-branding__slogan">{{ site_slogan }}</div>
  32. {% endif %}
  33. </div>
  34. {% endif %}
  35. {% endblock %}