Skip to content

Commit

Permalink
Merge pull request #1507 from openeuropa/EWPP-4701
Browse files Browse the repository at this point in the history
EWPP-4701: Contextual links on highighted lists.
  • Loading branch information
upchuk authored Oct 11, 2024
2 parents 0b086c3 + 017504a commit f0b4064
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@
{% endif %}
{% if items is not empty and _columns == 4 %}
<div class="ecl-row ecl-u-border-color-neutral ecl-u-border-width-1 ecl-u-border-bottom ecl-u-pb-l">
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column">
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column contextual-region">
{{ items.0 }}
</div>
{% if items|length > 1 %}
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column">
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column contextual-region">
{% for item in items|slice(1, 2) %}
{{ item }}
{% endfor %}
</div>
{% endif %}
{% if items.3 is defined and items.3 is not empty %}
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column">
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column contextual-region">
{{ items.3 }}
</div>
{% endif %}
{% if items|length > 4 %}
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column">
<div class="ecl-col-l-3 ecl-u-d-flex ecl-u-flex-column contextual-region">
{% for item in items|slice(4, 2) %}
{{ item }}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'image_position': (loop.first or loop.index == 4) ? 'top' : '',
'divider': (loop.index == 2 or loop.index == 5) ? true : false,
'extra_classes': (loop.index == 2 or loop.index == 5) ? 'ecl-u-flex-grow-1 ecl-u-mb-m' : 'ecl-u-flex-grow-1',
'contextual_links': item.contextual_links
}, 'default') %}
{% set _items = _items|merge([_item]) %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'image_position': 'top',
'divider': true,
'extra_classes': 'ecl-u-flex-grow-1',
'contextual_links': highlighted_item.contextual_links
}, 'default') %}
{% endif %}

Expand All @@ -44,6 +45,7 @@
'image_position': loop.first ? 'top' : '',
'divider': true,
'extra_classes': loop.last ? 'ecl-u-flex-grow-1' : 'ecl-u-flex-grow-1 ecl-u-mb-m',
'contextual_links': item.contextual_links
}, 'default') %}
{% set _items = _items|merge([_item]) %}
{% endfor %}
Expand Down

0 comments on commit f0b4064

Please sign in to comment.