Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(navigation-list): Revamp using content-block component - FRONT-3607 #2468

Merged
merged 6 commits into from May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 55 additions & 1 deletion src/implementations/twig/components/navigation-list/README.md
Expand Up @@ -8,9 +8,63 @@ npm install --save @ecl/twig-component-navigation-list

### Parameters

- **"items"** (array) (default: []): array of list_illustration_item
- **"border"** (boolean) (default: false): Is there an extra border and padding?
- **"image"** (associative array) (default: {}):
- **"src"** (string) (default: ''): Path to the image
- **"alt"** (string) (default: '')
- **"title"** (associative array) (default: {}): Predefined structure compatible with Link component
- **"description"** (string) (default: ''): Description of the navigation list
- **"links"** (array) (default: []): Array or multi array of ECL Links
- **"column"** (number) (default: 2): number of columns (2 or 3)
- **"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'

<!-- prettier-ignore -->
```twig
{% include '@ecl/navigation-list/navigation-list.html.twig' with {

items: [
{
image: {
src: 'https://inno-ecl.s3.amazonaws.com/media/examples/example-image.jpg',
size: 'l',
},
title: {
type: 'standalone',
label: 'Title 1',
path: exampleLink,
},
description:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus gravida ipsum ut lorem cursus, quis tincidunt sem viverra. Nunc vestibulum, mauris quis porta venenatis, justo odio commodo tellus',
links: [
[
{
link: {
label: 'Primary link 1',
path: exampleLink,
},
},
{
link: {
label: 'Primary link 2',
path: exampleLink,
},
},
...
],
[
{
link: {
label: 'Secondary link 1',
path: exampleLink,
},
},
...
],
],
},
...
} %}
```