You are here

layout--oneplusfourgrid-section.html.twig in Drupal 8

Default theme implementation to display a one plus four grid layout.

Available variables:

  • content: The content for this layout.
  • attributes: HTML attributes for the layout <div>.

File

core/profiles/demo_umami/themes/umami/layouts/oneplusfourgrid_section/layout--oneplusfourgrid-section.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a one plus four grid layout.
  5. *
  6. * Available variables:
  7. * - content: The content for this layout.
  8. * - attributes: HTML attributes for the layout <div>.
  9. *
  10. * @ingroup themeable
  11. */
  12. #}
  13. {%
  14. set classes = [
  15. 'layout',
  16. 'layout--oneplusfourgrid-section',
  17. ]
  18. %}
  19. {% if content %}
  20. <div{{ attributes.addClass(classes) }}>
  21. {% if content.first %}
  22. <div{{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  23. {{ content.first }}
  24. </div>
  25. {% endif %}
  26. {% if content.second or content.third or content.fourth or content.fifth %}
  27. <div class="layout__four-grid-group">
  28. {% endif %}
  29. {% if content.second %}
  30. <div{{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  31. {{ content.second }}
  32. </div>
  33. {% endif %}
  34. {% if content.third %}
  35. <div{{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  36. {{ content.third }}
  37. </div>
  38. {% endif %}
  39. {% if content.fourth %}
  40. <div{{ region_attributes.fourth.addClass('layout__region', 'layout__region--fourth') }}>
  41. {{ content.fourth }}
  42. </div>
  43. {% endif %}
  44. {% if content.fifth %}
  45. <div{{ region_attributes.fifth.addClass('layout__region', 'layout__region--fifth') }}>
  46. {{ content.fifth }}
  47. </div>
  48. {% endif %}
  49. {% if content.second or content.third or content.fourth or content.fifth %}
  50. </div>
  51. {% endif %}
  52. </div>
  53. {% endif %}

Related topics