@ecl-twig/ec-component-hero-banner

2.39.0 • Public • Published

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',  
      ...  
    },  
  },  
} %}

Package Sidebar

Install

npm i @ecl-twig/ec-component-hero-banner

Weekly Downloads

15

Version

2.39.0

License

EUPL-1.1

Unpacked Size

20.1 kB

Total Files

4

Last publish

Collaborators

  • yhuard
  • planctus
  • kalin.chernev