@ecl-twig/ec-component-hero-banner
v2.39.0
Published
ECL-Twig Hero Banner
Downloads
27
Readme
ECL-Twig Hero Banner
npm package: @ecl-twig/ec-component-hero-banner
npm install --save @ecl-twig/ec-component-hero-banner
Parameters
- "type" (string) (default: 'default') Type of banner (can be 'default','image','image-shade','primary')
- "title" (string) (default: '') Title of banner
- "image" (string) (default: '') Image for banner (required for image banner type)
- "description" (string) (default: '') Description of banner
- "centered" (bool) (default: true) Define if banner should be centered
- [DEPRECATED] "button" (associative array) (default: predefined structure) predefined structure for EC Button component
- "link" (associative array) (default: predefined structure) predefined structure for EC Link component
- "extra_classes" (optional) (string) (default: '') Extra classes (space separated)
- "extra_attributes" (optional) (array) (default: []) Extra attributes
- "name" (string) Attribute name, eg. 'data-test'
- "value" (string) Attribute value, eg: 'data-test-1',
- "_compliance_": (optional) (boolean) (default: false) Activates debug
- "_compliance_inner_check_" (optional) (boolean) (default: false) Inline compliance report
Example :
{% include '@ecl-twig/ec-component-hero-banner/ecl-hero-banner.html.twig' with {
title: 'EU Budget for the future',
description: 'The European Commission has put forward ambitious yet realistic proposals for a modern EU budget. It is time for an EU budget that reflects rapid developments in innovation, the economy, the environment and geopolitics, amongst others.',
centered: true,
type: 'image',
image: 'url/path-to-image',
link: {
link: {
label: 'Subscribe',
icon_position: 'after',
},
icon: {
path: 'path-to-the-icon-file',
...
},
},
} %}