You are here

toc-responsive.html.twig in TOC API 8

Default theme implementation to display a responsive table of contents.

Returns HTML for a responsive table of contents.

Available variables:

  • desktop: A render array represent a table of content for desktop.
  • mobile: A render array represent a table of content for mobile.

File

templates/toc-responsive.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a responsive table of contents.
  5. *
  6. * Returns HTML for a responsive table of contents.
  7. *
  8. * Available variables:
  9. * - desktop: A render array represent a table of content for desktop.
  10. * - mobile: A render array represent a table of content for mobile.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {% set classes = ['toc', 'toc-responsive'] %}
  16. <div {{ attributes.addClass(classes) }}>
  17. {{ desktop }}
  18. {{ mobile }}
  19. </div>