@openeuropa/bcl-gallery 0.21.0 → 0.24.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.
- package/gallery.html.twig +26 -22
- package/package.json +5 -4
package/gallery.html.twig
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
{#
|
|
4
4
|
Parameters:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
5
|
+
- id (string) (default: '')
|
|
6
|
+
- title (string) (default: '')
|
|
7
|
+
- title_tag (string) (default: 'h2')
|
|
8
|
+
- title_link: (link object) (default: {})
|
|
9
|
+
- title_attributes (drupal attrs)
|
|
10
|
+
- counter (string) (default: '')
|
|
11
|
+
- toggle_collapsed (string) (default: '')
|
|
12
|
+
- toggle_expanded (string) (default: '')
|
|
13
|
+
- next_label (string) (default: 'Next')
|
|
14
|
+
- prev_label (string) (default: 'Previous')
|
|
15
|
+
- max_visible_thumbnails (int) (default: 5)
|
|
16
|
+
- items (array of objects) format: [
|
|
15
17
|
{
|
|
16
18
|
thumbnails (string) img path
|
|
17
19
|
media: (string) <img> tag
|
|
@@ -20,23 +22,23 @@ Parameters:
|
|
|
20
22
|
caption_classes (string)
|
|
21
23
|
interval (integer) (default: 0)
|
|
22
24
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
25
|
+
]
|
|
26
|
+
- icon_path (string) (default: '')
|
|
27
|
+
- attributes (drupal attrs)
|
|
26
28
|
#}
|
|
27
29
|
|
|
28
|
-
{# Internal properties #}
|
|
29
|
-
|
|
30
30
|
{% set _id = id|default('gallery-' ~ random(1000)) %}
|
|
31
31
|
{% set _title = title|default('') %}
|
|
32
32
|
{% set _title_tag = title_tag|default('h2') %}
|
|
33
|
+
{% set _title_link = title_link|default({}) %}
|
|
34
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
33
35
|
{% set _counter = counter|default('') %}
|
|
34
36
|
{% set _toggle_collapsed = toggle_collapsed|default('') %}
|
|
35
37
|
{% set _toggle_expanded = toggle_expanded|default('') %}
|
|
36
38
|
{% set _next_label = next_label|default('Next') %}
|
|
37
39
|
{% set _prev_label = prev_label|default('Previous') %}
|
|
38
|
-
{% set _items = items|default([]) %}
|
|
39
40
|
{% set _max_visible_thumbnails = max_visible_thumbnails|default(5) %}
|
|
41
|
+
{% set _items = items|default([]) %}
|
|
40
42
|
{% set _icon_path = icon_path|default('') %}
|
|
41
43
|
|
|
42
44
|
{% set _carousel_items = [] %}
|
|
@@ -59,12 +61,14 @@ Parameters:
|
|
|
59
61
|
{% if _items is iterable %}
|
|
60
62
|
<div class="d-sm-flex flex-sm-row align-items-sm-center">
|
|
61
63
|
<div class="flex-sm-grow-1">
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
{% if _title is not empty %}
|
|
65
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
66
|
+
title: _title,
|
|
67
|
+
title_tag: _title_tag,
|
|
68
|
+
title_link: _title_link,
|
|
69
|
+
attributes: _title_attributes,
|
|
70
|
+
} only %}
|
|
71
|
+
{% endif %}
|
|
68
72
|
</div>
|
|
69
73
|
<div class="mb-3 mb-sm-0 fw-bold">
|
|
70
74
|
{%- if _counter is not empty -%}
|
package/package.json
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-gallery",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.24.0",
|
|
6
6
|
"description": "OE - BCL gallery",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-carousel": "^0.
|
|
12
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-carousel": "^0.24.0",
|
|
12
|
+
"@openeuropa/bcl-heading": "^0.24.0",
|
|
13
|
+
"@openeuropa/bcl-icon": "^0.24.0"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -25,5 +26,5 @@
|
|
|
25
26
|
"design-system",
|
|
26
27
|
"twig"
|
|
27
28
|
],
|
|
28
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a46bb6bc12771da4667516dc7b0665b00504ade2"
|
|
29
30
|
}
|