stack/src/components/base-header/base-header.twig line 1

Open in your IDE?
  1. {%- set class_name = [
  2.   'base-header',
  3.   'd-flex',
  4.   'flex-column',
  5.   'gap-3',
  6.   'text-center',
  7.   'align-items-center',
  8.   props.variant in ['left'] ? '--' ~ props.variant : null,
  9.   props.spacing in ['none', 'sm', 'lg'] ? '--spacing-' ~ props.spacing : null,
  10.   props.extra_class|default(false) ? props.extra_class : null
  11. ]|join(' ')|trim -%}
  12. {%- set attrs = [
  13.   'class="' ~ class_name ~ '"',
  14. ] -%}
  15. {%- if props.id is defined %}
  16.   {% set attrs = attrs|merge(['id="' ~ props.id ~ '"']) %}
  17. {%- endif -%}
  18. {%- set attrs = attrs|join(' ')|trim -%}
  19. <header {{ attrs|raw }}>
  20.   {% if props.overline %}
  21.     {% include "@Components/base-overline/base-overline.twig" with {props: props.overline} %}
  22.   {% endif %}
  23.   {% include "@Components/base-heading/base-heading.twig" with {props: props.heading} %}
  24.   {% if props.perex %}
  25.     <div class="base-header__description d-flex flex-column gap-2 mb-0">{{ props.perex|raw }}</div>
  26.   {% endif %}
  27.   {% block content %}{# content #}{% endblock %}
  28.   {% if props.buttons %}
  29.     {% include "@Components/groups/buttons-group/buttons-group.twig" with {props: {
  30.       buttons: props.buttons,
  31.       align: props.variant,
  32.     }} %}
  33.   {% endif %}
  34. </header>