-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.7.0-dev' of github.com:ec-europa/europa-component-li…
…brary into FRONT-3542-optgroup
- Loading branch information
Showing
162 changed files
with
9,493 additions
and
4,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ECL Banner | ||
|
||
npm package: `@ecl/twig-component-banner` | ||
|
||
```shell | ||
npm install --save @ecl/twig-component-banner | ||
``` | ||
|
||
### Parameters | ||
|
||
- **"variant"** (string) (default: 'primary') Variant of banner (can be 'primary', 'image','image-shade','image-gradient') | ||
- **"size"** (string) (default: 'm') Size of the banner (can be 's', 'm', 'l') | ||
- **"title"** (string) (default: '') Title of banner | ||
- **"image"** (string) (default: '') Image for banner (required for image banner type) | ||
- **"credit"** (string) (default: '') Credit for the image | ||
- **"description"** (string) (default: '') Description of banner | ||
- **"centered"** (bool) (default: true) Define if banner should be centered | ||
- **"full_width"** (bools) (default: false) Extends the banner to whole viewport when used inside the grid | ||
- **"link"** (associative array) (default: predefined structure) predefined structure for the 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' | ||
|
||
### Example: | ||
|
||
<!-- prettier-ignore --> | ||
```twig | ||
{% include '@ecl/banner/banner.html.twig' with { | ||
title: 'EU Budget for the future', | ||
description: 'Innovation, economy, environment and geopolitics', | ||
centered: true, | ||
variant: 'image', | ||
image: 'url/path-to-image', | ||
credit: '© Copyright', | ||
link: { | ||
link: { | ||
label: 'Subscribe', | ||
icon_position: 'after', | ||
}, | ||
icon: { | ||
path: 'path-to-the-icon-file', | ||
... | ||
}, | ||
}, | ||
} %} | ||
``` |
Oops, something went wrong.