@openeuropa/bcl-featured-media 0.27.0 → 0.28.0

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,11 +1,13 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - with_text (boolean) (default: false)
5
4
  - title (string) (default: '')
6
5
  - title_tag (string) (default: 'h2')
7
6
  - title_link: (link object) (default: {})
8
7
  - title_attributes: (drupal attrs)
8
+ - with_text (boolean) (default: false)
9
+ - alignment: (string) (default: "right")
10
+ - options ['left', 'right']
9
11
  - image: (string) (default: "")
10
12
  - poster_image: (string) (default: "")
11
13
  - content: (string) (default: "")
@@ -39,22 +41,24 @@
39
41
  {% set _title_link = title_link|default({}) %}
40
42
  {% set _title_attributes = title_attributes ?: create_attribute() %}
41
43
  {% set _with_text = with_text|default(false) %}
42
- {% set _wrapper_classes = 'bcl-featured-item' %}
43
- {% set _description = description|default('') %}
44
- {% set _embedded_media = embedded_media|default('') %}
44
+ {% set _alignment = alignment|default('right') %}
45
45
  {% set _image = image|default('') %}
46
46
  {% set _poster_image = poster_image|default('') %}
47
47
  {% set _content = content|default('') %}
48
- {% set _alignment = alignment|default('right') %}
48
+ {% set _wrapper_classes = wrapper_classes|default('') %}
49
49
  {% set _content_classes = content_classes|default('') %}
50
+ {% set _read_more = read_more|default({}) %}
51
+ {% set _description = description|default('') %}
50
52
  {% set _ratio = ratio|default('16x9') %}
51
53
  {% set _sources = sources|default([]) %}
52
54
  {% set _tracks = tracks|default([]) %}
55
+ {% set _embedded_media = embedded_media|default('') %}
56
+
57
+ {% set _classes = 'bcl-featured-item' %}
53
58
  {% set _col_classes = 'col-12 col-md-6' %}
54
- {% set _read_more = read_more|default({}) %}
55
59
 
56
- {% if wrapper_classes is defined and wrapper_classes is not empty %}
57
- {% set _wrapper_classes = _wrapper_classes ~ ' ' ~ wrapper_classes %}
60
+ {% if _wrapper_classes is not empty %}
61
+ {% set _classes = _classes ~ ' ' ~ wrapper_classes %}
58
62
  {% endif %}
59
63
 
60
64
  {% if attributes is empty %}
@@ -77,7 +81,7 @@
77
81
  {% endif %}
78
82
 
79
83
  {% if _with_text %}
80
- <div class="{{ _wrapper_classes }}">
84
+ <div class="{{ _classes }}">
81
85
  <div class="row">
82
86
  {% endif %}
83
87
 
@@ -91,14 +95,14 @@
91
95
  {%- endif -%}
92
96
 
93
97
  {% if _with_text %}
94
- <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '1' : '2' }}">
95
- {{- _description|default('') -}}
98
+ <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '1' : '2' }}">
99
+ {{- _description|default('') -}}
96
100
 
97
- {% if _read_more is not empty %}
98
- {% include '@oe-bcl/bcl-link/link.html.twig' with _read_more only %}
99
- {% endif %}
100
- </div>
101
- <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '2 mt-4 mt-md-0' : '1' }}">
101
+ {% if _read_more is not empty %}
102
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _read_more only %}
103
+ {% endif %}
104
+ </div>
105
+ <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '2 mt-4 mt-md-0' : '1' }}">
102
106
  {% endif %}
103
107
 
104
108
  <figure
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@openeuropa/bcl-featured-media",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.27.0",
5
+ "version": "0.28.0",
6
6
  "description": "OE - BCL featured media",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-heading": "^0.27.0",
12
- "@openeuropa/bcl-link": "^0.27.0"
11
+ "@openeuropa/bcl-heading": "^0.28.0",
12
+ "@openeuropa/bcl-link": "^0.28.0"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "design-system",
26
26
  "twig"
27
27
  ],
28
- "gitHead": "1ab38cd93a2d4c52119fcc6a2f7cc56ceaa95dbf"
28
+ "gitHead": "9ceb916258c8c7331f37bbb7c4380a2121440e12"
29
29
  }