@openeuropa/bcl-card-layout 1.10.9 → 1.10.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - type (string) (default: 'group')
5
3
  options: ['group', 'grid', 'masonry']
@@ -20,7 +18,7 @@
20
18
  - card_layout_card
21
19
  #}
22
20
 
23
- {% set _type = type|default('group') %}
21
+ {%- set _type = type|default('group') %}
24
22
  {% set _items = items|default([]) %}
25
23
  {% set _grid_columns = grid_columns|default(1) %}
26
24
  {% set _responsiveness = responsiveness|default('md') %}
@@ -29,59 +27,58 @@
29
27
  {% set _equal_height = equal_height ?? false %}
30
28
  {% set _cols_extra_classes = cols_extra_classes|default('') %}
31
29
 
32
- {% set _cols_classes = 'col' %}
30
+ {%- set _cols_classes = 'col' %}
33
31
 
34
- {% if _cols_extra_classes is not empty %}
35
- {% set _cols_classes = _cols_classes ~ ' ' ~ _cols_extra_classes %}
32
+ {%- if _cols_extra_classes is not empty %}
33
+ {%- set _cols_classes = _cols_classes ~ ' ' ~ _cols_extra_classes %}
36
34
  {% endif %}
37
35
  {% if _type == 'group' %}
38
- {% set _classes = ['card-group'] %}
36
+ {%- set _classes = ['card-group'] %}
39
37
  {% elseif type == 'grid' or type == 'masonry' %}
40
- {% set _classes = ['row', 'row-cols-' ~ _grid_columns] %}
41
- {% if _responsive_columns is not empty %}
42
- {% set _classes = _classes|merge(['row-cols-' ~ _responsiveness ~ '-' ~ _responsive_columns]) %}
43
- {% endif %}
44
- {% if _gutter is not empty %}
45
- {% set _classes = _classes|merge(['g-' ~ _gutter]) %}
46
- {% endif %}
38
+ {%- set _classes = ['row', 'row-cols-' ~ _grid_columns] %}
39
+ {%- if _responsive_columns is not empty %}
40
+ {%- set _classes = _classes|merge(['row-cols-' ~ _responsiveness ~ '-' ~ _responsive_columns]) %}
41
+ {%- endif %}
42
+ {%- if _gutter is not empty %}
43
+ {%- set _classes = _classes|merge(['g-' ~ _gutter]) %}
44
+ {%- endif %}
47
45
  {% endif %}
48
46
 
49
- {% if attributes is empty %}
50
- {% set attributes = create_attribute() %}
47
+ {%- if attributes is empty %}
48
+ {%- set attributes = create_attribute() %}
51
49
  {% endif %}
52
50
 
53
- {% set attributes = attributes.addClass(_classes) %}
51
+ {%- set attributes = attributes.addClass(_classes) -%}
54
52
 
55
53
  <div
56
54
  {{ attributes }}
57
- {% if _type == 'masonry' %}
55
+ {%- if _type == 'masonry' %}
58
56
  data-masonry='{"percentPosition": true }'
59
57
  {% endif %}
60
58
  >
61
- {% if _items is not empty and _items is iterable %}
62
- {% for _item in _items %}
63
- {% if _item.attributes is empty %}
64
- {% set _item = _item|merge({
59
+ {%- if _items is not empty and _items is iterable %}
60
+ {%- for _item in _items %}
61
+ {%- if _item.attributes is empty %}
62
+ {%- set _item = _item|merge({
65
63
  attributes: create_attribute()
66
64
  }) %}
67
- {% endif %}
68
- {% if _equal_height %}
69
- {% set _item = _item|merge({
65
+ {%- endif %}
66
+ {%- if _equal_height %}
67
+ {%- set _item = _item|merge({
70
68
  attributes: _item.attributes.addClass('h-100')
71
69
  })
72
70
  %}
73
- {% endif %}
74
- {% if _type == 'grid' or _type == 'masonry' %}
71
+ {%- endif %}
72
+ {%- if _type == 'grid' or _type == 'masonry' -%}
75
73
  <div class="{{ _cols_classes }}">
76
- {% endif %}
77
- {% block card_layout_card %}
78
- {% include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
79
- {% endblock %}
80
- {% if _type == 'grid' or _type == 'masonry' %}
74
+ {%- endif %}
75
+ {%- block card_layout_card %}
76
+ {%- include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
77
+ {%- endblock %}
78
+ {%- if _type == 'grid' or _type == 'masonry' -%}
81
79
  </div>
82
- {% endif %}
83
- {% endfor %}
84
- {% endif %}
80
+ {%- endif %}
81
+ {%- endfor %}
82
+ {% endif -%}
85
83
  </div>
86
-
87
- {% endapply %}
84
+ {#--#}
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@openeuropa/bcl-card-layout",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.9",
5
+ "version": "1.10.11",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL card layout",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-card": "^1.10.9"
11
+ "@openeuropa/bcl-card": "^1.10.11"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -24,5 +24,5 @@
24
24
  "design-system",
25
25
  "twig"
26
26
  ],
27
- "gitHead": "cb9864341bfc98404071520d61568bd18e17e1fe"
27
+ "gitHead": "82aecf2f60f8bd8f9afd447ea0d044396f085823"
28
28
  }