diff --git a/templates/component/hero.twig b/templates/component/hero.twig new file mode 100644 index 000000000..c58d76cb1 --- /dev/null +++ b/templates/component/hero.twig @@ -0,0 +1,86 @@ +{# +{% embed '@hdbt/component/hero.twig' with { + design: content.field_hero_design[0]['#markup'], + title: content.field_hero_title, + description: content.field_hero_desc, + image: content.field_hero_image, + } %} +{% endembed %} +#} + +{% if design == "background-image" %} + {% set design_class = "hero--with-image-bottom" %} +{% elseif design == "diagonal" %} + {% set design_class = "hero--diagonal" %} +{% elseif design == "with-image-bottom" %} + {% set design_class = "hero--with-image-bottom" %} +{% elseif design == "with-image-left" %} + {% set design_class = "hero--with-image-left" %} +{% elseif design == "with-image-right" %} + {% set design_class = "hero--with-image-right" %} +{% elseif design == "without-image-center" %} + {% set design_class = "hero--without-image-left" %} +{% elseif design == "without-image-left" %} + {% set design_class = "hero--without-image-left" %} +{% elseif design == "with-search" %} + {% set design_class = "hero--with-search" %} +{% endif %} + + +{% set hero_wrapper_attributes = { + 'class': [ + 'hero', + design_class ? design_class, + ] +} %} + +