-
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.
feat(page-header): add site-wide components - FRONT-3546 (#2337)
Co-authored-by: Romain Emery <emery.romain@gmail.com> Co-authored-by: planctus <davidepuntoferrante@gmail.com>
- Loading branch information
1 parent
d40bec9
commit 75acda6
Showing
44 changed files
with
2,214 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__snapshots__ | ||
*.js |
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,45 @@ | ||
# ECL Page Header component | ||
|
||
npm package: `@ecl/twig-component-page-header` | ||
|
||
```shell | ||
npm install --save @ecl/twig-component-page-header | ||
``` | ||
|
||
### Parameters | ||
|
||
- **"variant"** (string) (default: '') options: [ negative ] Negative style with a darker background (only for EC) | ||
- **"title"** (string) (default: '') Title of header | ||
- **"hide_title"** (boolean) (default: false) Hide the h1 title, for screen reader only | ||
- **"description"** (string) (default: '') Description of header | ||
- **"thumbnail"** (associative array) (default: {}) Thumbnail dipslayed alongside the description | ||
- "alt" (string) Alternative text | ||
- "src" (string) Image path | ||
- **"meta"** (array) (default: []) Meta of header | ||
- **"breadcrumb"** (associative array) (default: '') Predefined structure for the ECL Breadcrumb | ||
- **"background_image_url"** (string) (default: '') Background image url | ||
- **"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/page-header/page-header.html.twig' with { | ||
title: 'Page title', | ||
description: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium', | ||
meta: 'News article | 17 October 2015', | ||
breadcrumb: { | ||
links: [ | ||
{ | ||
label: 'Link 1', | ||
path: '/example' | ||
}, | ||
], | ||
icon_file_path: '/path-to-the-icons-file', | ||
navigation_text: 'You are here:', | ||
}, | ||
} %} | ||
``` |
Oops, something went wrong.
75acda6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Deployed on https://v3--europa-component-library.netlify.app