@ilo-org/twig 0.2.21 → 0.2.23

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,9 +1,9 @@
1
1
 
2
- > @ilo-org/twig@0.2.21 build:lib /home/runner/work/designsystem/designsystem/packages/twig
2
+ > @ilo-org/twig@0.2.23 build:lib /home/runner/work/designsystem/designsystem/packages/twig
3
3
  > node importprefix.js && node importsvgs.js && pnpm output
4
4
 
5
5
  theme prefix added
6
6
 
7
- > @ilo-org/twig@0.2.21 output /home/runner/work/designsystem/designsystem/packages/twig
7
+ > @ilo-org/twig@0.2.23 output /home/runner/work/designsystem/designsystem/packages/twig
8
8
  > node outputtwigs.js
9
9
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ilo-org/twig
2
2
 
3
+ ## 0.2.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 3134bcadf: Add blocks to wrap pictures in card component
8
+
9
+ ## 0.2.22
10
+
11
+ ### Patch Changes
12
+
13
+ - 31f3c3790: Added a block to wrap the image on the Hero component. That allows Drupal to include responsive images.
14
+
3
15
  ## 0.2.21
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilo-org/twig",
3
- "version": "0.2.21",
3
+ "version": "0.2.23",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Twig components for the ILO's Design System",
6
6
  "main": "",
@@ -10,7 +10,11 @@
10
10
  {% endif %}
11
11
  <div class="{{prefix}}--card--wrap">
12
12
  {% if image %}
13
- <div class="{{prefix}}--card--image--wrapper"><picture><img class="{{prefix}}--card--image" src="{{image}}" alt="{{title}}"></picture></div>
13
+ <div class="{{prefix}}--card--image--wrapper">
14
+ {% block card_image %}
15
+ <picture><img class="{{prefix}}--card--image" src="{{image}}" alt="{{title}}"></picture>
16
+ {% endblock %}
17
+ </div>
14
18
  {% endif %}
15
19
  <div class="{{prefix}}--card--content">
16
20
  {% if eyebrow %}
@@ -20,7 +24,11 @@
20
24
  <h5 class="{{prefix}}--card--title">{{title}}</h5>
21
25
  {% endif %}
22
26
  {% if type == "multilink" or type == "data" and image %}
23
- <div class="{{prefix}}--card--image--wrapper"><picture><img class="{{prefix}}--card--image" src="{{image}}" alt="{{title}}"></picture></div>
27
+ <div class="{{prefix}}--card--image--wrapper">
28
+ {% block card_image_multilink_or_data %}
29
+ <picture><img class="{{prefix}}--card--image" src="{{image}}" alt="{{title}}"></picture>
30
+ {% endblock %}
31
+ </div>
24
32
  {% endif %}
25
33
  {% if intro %}
26
34
  <p class="{{prefix}}--card--intro">{{intro}}</p>
@@ -9,15 +9,17 @@
9
9
  prefix: prefix,
10
10
  } only %}
11
11
  {% endif %}
12
- {% if not image %}
13
- {% else %}
14
- {% include "@components/image/image.twig" with {
15
- alt: image.alt,
16
- prefix: prefix,
17
- url: image.url,
18
- ishero: "true"
19
- } only %}
20
- {% endif %}
12
+ {% block hero_image %}
13
+ {% if not image %}
14
+ {% else %}
15
+ {% include "@components/image/image.twig" with {
16
+ alt: image.alt,
17
+ prefix: prefix,
18
+ url: image.url,
19
+ ishero: "true"
20
+ } only %}
21
+ {% endif %}
22
+ {% endblock %}
21
23
  {% include "@components/herocard/herocard.twig" with {
22
24
  alignment: herocard.alignment,
23
25
  eyebrow: herocard.eyebrow,