@ilo-org/twig 0.7.0 → 0.8.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.
Files changed (42) hide show
  1. package/.turbo/turbo-build:lib.log +2 -2
  2. package/CHANGELOG.md +43 -0
  3. package/package.json +2 -2
  4. package/src/patterns/components/card/card.twig +18 -119
  5. package/src/patterns/components/card/card.wingsuit.yml +162 -223
  6. package/src/patterns/components/card_data/card_data.stories.jsx +9 -0
  7. package/src/patterns/components/card_data/card_data.twig +49 -0
  8. package/src/patterns/components/card_data/card_data.wingsuit.yml +73 -0
  9. package/src/patterns/components/card_data/index.js +9 -0
  10. package/src/patterns/components/card_detail/card_detail.stories.jsx +9 -0
  11. package/src/patterns/components/card_detail/card_detail.twig +37 -0
  12. package/src/patterns/components/card_detail/card_detail.wingsuit.yml +73 -0
  13. package/src/patterns/components/card_detail/index.js +9 -0
  14. package/src/patterns/components/card_factlist/card_factlist.stories.jsx +9 -0
  15. package/src/patterns/components/card_factlist/card_factlist.twig +21 -0
  16. package/src/patterns/components/card_factlist/card_factlist.wingsuit.yml +49 -0
  17. package/src/patterns/components/card_factlist/index.js +9 -0
  18. package/src/patterns/components/card_feature/card_feature.stories.jsx +9 -0
  19. package/src/patterns/components/card_feature/card_feature.twig +39 -0
  20. package/src/patterns/components/card_feature/card_feature.wingsuit.yml +82 -0
  21. package/src/patterns/components/card_feature/index.js +9 -0
  22. package/src/patterns/components/card_multilink/card_multilink.stories.jsx +9 -0
  23. package/src/patterns/components/card_multilink/card_multilink.twig +42 -0
  24. package/src/patterns/components/card_multilink/card_multilink.wingsuit.yml +88 -0
  25. package/src/patterns/components/card_multilink/index.js +9 -0
  26. package/src/patterns/components/card_promo/card_promo.stories.jsx +9 -0
  27. package/src/patterns/components/card_promo/card_promo.twig +35 -0
  28. package/src/patterns/components/card_promo/card_promo.wingsuit.yml +73 -0
  29. package/src/patterns/components/card_promo/index.js +9 -0
  30. package/src/patterns/components/card_stat/card_stat.stories.jsx +9 -0
  31. package/src/patterns/components/card_stat/card_stat.twig +22 -0
  32. package/src/patterns/components/card_stat/card_stat.wingsuit.yml +48 -0
  33. package/src/patterns/components/card_stat/index.js +9 -0
  34. package/src/patterns/components/card_text/card_text.stories.jsx +9 -0
  35. package/src/patterns/components/card_text/card_text.twig +35 -0
  36. package/src/patterns/components/card_text/card_text.wingsuit.yml +59 -0
  37. package/src/patterns/components/card_text/index.js +9 -0
  38. package/src/patterns/components/cardgroup/cardgroup.twig +15 -20
  39. package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +69 -449
  40. package/src/patterns/components/hero/hero.twig +1 -1
  41. package/src/patterns/components/picture/index.js +6 -0
  42. package/src/patterns/components/picture/picture.twig +21 -0
@@ -1,279 +1,218 @@
1
1
  card:
2
2
  use: "@components/card/card.twig"
3
3
  label: Card
4
- description: Cards display prominent content of a page layout, with information and actions about a single subject, they typically contain a link to a new page or downloadable content.
4
+ description: Cards display prominent content of a page. This component is a wrapper around all of the card types in the design system except for the Hero Card. To use it, pass a `type` setting to the card and then pass the appropriate fields for that card type. For more information about the settings you can pass to each card type, see the documentation for that card.
5
+ visibility: storybook
5
6
  fields:
6
- title:
7
- type: string
8
- label: Title
9
- description: Title field for the card
10
- preview: Lorem ipsum
11
- intro:
12
- type: string
13
- label: Intro
14
- description: Intro copy text
15
- preview: "A toxic combination of mutually-reinforcing crises – inflation, debt, food and fuel price rises, geopolitical tensions and conflict, climate change – are threatening to increase poverty, inequality and discrimination worldwide."
16
- eyebrow:
17
- type: string
18
- label: Eyebrow
19
- description: Eyebrow copy
20
- preview: "Eyebrow"
7
+ cta:
8
+ type: object
9
+ label: cta
10
+ description: Renders a call to action button at the bottom of the card. This should include a `url` property for the link and a `label` property for the link text. Used by the `Feature Card`, `Promo Card` and `DataCard` types.
11
+ preview:
12
+ label: "Read more"
13
+ url: "https://www.ilo.org/"
14
+ dataset:
15
+ type: object
16
+ label: Dataset
17
+ description: Only used by the `Data Card`. Object that renders the different groups of content.
18
+ preview:
19
+ content:
20
+ items:
21
+ - label: Date
22
+ copy: 17 March 2022
23
+ - label: Event type
24
+ copy: Technical meeting of experts
25
+ files:
26
+ headline: Files
27
+ items:
28
+ - label: Meeting agenda
29
+ url: "https://www.ilo.org"
30
+ - label: Briefing notes
31
+ url: "https://www.ilo.org"
32
+ - label: Practical info
33
+ url: "https://www.ilo.org"
34
+ links:
35
+ headline: Languages
36
+ items:
37
+ - label: English
38
+ url: "https://www.ilo.org/search?q=link"
39
+ - label: Español
40
+ url: "https://www.ilo.org/search?q=hyperlink"
41
+ - label: Français
42
+ url: "https://www.ilo.org/search?q=url"
21
43
  date:
22
44
  type: object
23
45
  label: Date
24
- description: Date copy (human and Unix)
46
+ description: Date copy (human and Unix). Used by all cards except for the `Promo Card` and `Stat Card`.
25
47
  preview:
26
48
  human: 20 September 2022
27
49
  unix: 1670389200
28
- eventdetails:
50
+ dateExtra:
51
+ type: string
52
+ label: dateExtra
53
+ description: Strong date copy that could include other information such as the location of an event. Only used by `Details Card`.
54
+ preview: 20 September 2023 | Geneva
55
+ eyebrow:
29
56
  type: string
30
57
  label: Eyebrow
31
- description: Event details for `Detail` card
32
- preview: ""
58
+ description: Text appears above the title providing extra context. Used by all cards except for the `Feature Card`, `Text Card`, `Detail Card`, `Promo Card` and `Data Card`.
59
+ preview: "Podcast"
33
60
  image:
34
61
  type: object
35
62
  label: Image
36
- description: Image settings for the card. For responsive images, this can be an array of objects with an `src` property pointing to the image file and a `breakpoint` property which is either a number indicating the minimum viewport width at which the image should be displayed or a media query. For static images, this can be a string pointing to the image file.
63
+ description: Image settings for the card. This should include a `url`, which is an array of objects with an `src` property pointing to the image file and a `breakpoint` property which is either a number indicating the minimum viewport width at which the image should be displayed or a media query. It can also contain an `alt` property for the image's alt text and a `loading` property for the image's loading attribute. Used by `Detail Card`, `Feature Card`, `Multilink Card` and `Data Card`
37
64
  preview:
38
- - breakpoint: "(min-width: 0px)"
39
- src: "/images/small.jpg"
40
- - breakpoint: "(min-width: 800px)"
41
- src: "/images/medium.jpg"
42
- - breakpoint: "(min-width: 1200px)"
43
- src: "/images/large.jpg"
44
- - breakpoint: "(min-width: 1440px)"
45
- src: "/images/large.jpg"
46
- imageAlt:
65
+ alt: "Image alt text"
66
+ loading: "lazy"
67
+ url:
68
+ - breakpoint: "(min-width: 0px)"
69
+ src: "/images/small.jpg"
70
+ - breakpoint: "(min-width: 800px)"
71
+ src: "/images/medium.jpg"
72
+ - breakpoint: "(min-width: 1200px)"
73
+ src: "/images/large.jpg"
74
+ - breakpoint: "(min-width: 1440px)"
75
+ src: "/images/large.jpg"
76
+ intro:
47
77
  type: string
48
- label: Image Alt
49
- description: Alt text for the image
50
- preview: "This is the alt text for the image"
51
- profile:
52
- type: object
53
- label: Profile
54
- description: Profile to embed in the card for `Graphic Text`
55
- preview:
56
- list:
57
- type: object
58
- label: List
59
- description: List to embed in the card, specifically used for `Factlist`
60
- preview:
78
+ label: Intro
79
+ description: Intro text usually follows the Title providing more information about the Card. Used by `Text Card`, `Detail Card`, `Promo Card`, `Multilink Card` and`Stat Card`.
80
+ preview: "A toxic combination of mutually-reinforcing crises inflation, debt, food and fuel price rises, geopolitical tensions and conflict, climate change – are threatening to increase poverty, inequality and discrimination worldwide."
61
81
  link:
62
82
  type: string
63
83
  label: Link
64
- description: Link for clickable cards. Do no use on `Multilink`, `Factlist`, `Data`, or `Stat` cards.
84
+ description: The primary link for the card, activated by clicking on the card itself. Used by all cards except for the `Data Card`, `Stat Card` and `Facts Card`.
65
85
  preview: "https://www.ilo.org/"
66
- cta:
67
- type: object
68
- label: CTA
69
- description: Items for clickable CTA button. Button used for `Graphic Promo` card.
70
- source:
71
- type: object
72
- label: Source
73
- description: Source link for `Stat` cards
74
86
  linklist:
75
87
  type: object
76
88
  label: Link List
77
- description: Implementation of the LinkList component. Appears at the bottom of `Multilink` or `Feature` card.
78
- dataset:
89
+ description: Displays a list of links. See the `Link` component for more details on settings. Only used by the `Multilink Card`.
90
+ preview:
91
+ linkgroup:
92
+ - links:
93
+ - label: Read the press release
94
+ url: "https://www.ilo.org"
95
+ - label: See the statement
96
+ url: "https://www.ilo.org"
97
+ - label: Remarks to G7 Openening Session
98
+ url: "https://www.ilo.org"
99
+ list:
79
100
  type: object
80
- label: Dataset object
81
- description: Dataset object for the `Data` card. Array of Content (label, copy), Files object (optional headline, array of items with label and url) and Links object (optional headline, array of items with label and url)
101
+ label: List
102
+ description: List of facts or statistics. See the `List` component for a full list of options. Only used by `Factlist Card`.
82
103
  preview:
104
+ settings:
105
+ - ordered: unordered
106
+ - alignment: default
107
+ items:
108
+ - content: "Global employment growth will be only 1.0 per cent in 2023, less than half the level in 2022."
109
+ id: "list1"
110
+ - content: "The labour market deterioration is mainly due to emerging geopolitical tensions and the Ukraine conflict."
111
+ id: "list2"
112
+ - content: "The current slowdown means that many workers will have to accept lower quality jobs, often at very low pay."
113
+ id: "list3"
114
+ title:
115
+ type: string
116
+ label: Title
117
+ description: The main title of the card. Used by all cards except for the `Data Card`.
118
+ preview: Can digital technology be an equality machine?
83
119
  settings:
120
+ alignment:
121
+ type: select
122
+ label: Alignment
123
+ description: Positions the image to the right or to the left of the content when the card is displayed in a `wide` or `fluid` size. Has no effect if the card is displayed in a `standard` or `narrow` size. Only used by `Multilink Card`.
124
+ preview: "left"
125
+ options:
126
+ left: Left
127
+ right: Right
84
128
  color:
85
129
  type: select
86
130
  label: Color
87
- description: Color of the stat cards, options are `turquoise`, `green`, `yellow`, or `blue`. Only use for stat cards.
131
+ description: Used to set the color of `Stat Card`.
88
132
  options:
89
133
  turquoise: turquoise
90
134
  green: green
91
135
  yellow: yellow
92
136
  blue: blue
93
137
  preview: "blue"
94
- theme:
138
+ cornercut:
95
139
  type: select
96
- label: Theme
97
- description: The theme type for the card. Theme choice doesn't apply to these card types - `Multilink`, `Data`, `Stat` and `Detail`
140
+ label: cornercut
141
+ description: Allows user to set the cornercut of the card. This is only used by the `Promo Card`.
98
142
  required: false
99
- preview: "light"
143
+ preview: true
100
144
  options:
101
- dark: Dark
102
- light: Light
145
+ true: True
146
+ false: False
103
147
  size:
104
148
  type: select
105
149
  label: Size
106
- description: Size of the cards (usually reduces padding). `Wide` on Multilink and Feature cause a two column structure above a desktop breakpoint.
150
+ description: Sets the size of the card. If a card has two options, `standard` and `fluid` are used and `standard` is the default. If it has three options, `narrow`, `wide` and `fluid` are used and `narrow` is the default. If it has all four options `standard` is the default. `fluid` makes the card stretch to fit the size of its container. If the size is set to `fluid`, other styles from `wide` will be used.
151
+ required: false
107
152
  preview: "standard"
108
153
  options:
109
- wide: Wide
110
- standard: Standard
111
- narrow: Narrow
112
- cornercut:
113
- type: select
114
- label: Corner cut
115
- description: Setting for whether the card has a cut corner. The only cards that use this setting are `Graphic Promo` and `Factlist`.
116
- preview: cornercut
117
- options:
118
- cornercut: Corner cut
119
- corner: Corner
120
- alignment:
154
+ standard: standard
155
+ narrow: narrow
156
+ wide: wide
157
+ fluid: fluid
158
+ source:
159
+ type: object
160
+ label: Source
161
+ description: A stylized link used only by the `Stat Card` to indicate the source of a statistic.
162
+ preview:
163
+ label: "World Employment and Social Outlook: Trends 2023"
164
+ url: "https://www.ilo.org/global/research/global-reports/weso/WCMS_865332/lang--en/index.htm"
165
+ theme:
121
166
  type: select
122
- label: Alignment
123
- description: Set whether card image is right aligned or left aligned for `Multilink` cards.
124
- preview: left
167
+ label: Theme
168
+ description: Sets the card to appear as either light or dark. Used by all cards except for `Multilink Card`, `Data Card` and `Stat Card`.
169
+ required: false
170
+ preview: "dark"
125
171
  options:
126
- left: Left
127
- right: right
128
- isvideo:
172
+ dark: Dark
173
+ light: Light
174
+ type:
129
175
  type: select
130
- label: Is a Video
131
- description: Whether the card should display a video icon (for Feature card)
132
- preview: false
176
+ label: Type
177
+ description: Sets the type of card to render.
178
+ preview: "feature"
133
179
  options:
134
- true: True
135
- false: False
180
+ feature: Feature
181
+ text: Text
182
+ detail: Detail
183
+ promo: Promo
184
+ multilink: Multilink
185
+ data: Data
186
+ stat: Stat
187
+ factlist: Factlist
136
188
  variants:
137
- graphic:
138
- label: Graphic Text Card
139
- description: The graphic Card
140
- fields:
141
- title: "Why we need greater social justice"
142
- eyebrow: Podcast
143
- date:
144
- human: 20 September 2022
145
- unix: 1670389200
146
- link: "https:/www.ilo.org"
147
- profile:
148
- avatar: "/images/ilo-dg.jpg"
149
- description: "Gilbert Houngbo is the Director-General of the International Labour Organization"
150
- link:
151
- - label: "Optional Link"
152
- url: "https://www.ilo.org"
153
- name: "Gilbert Houngbo"
154
- role: "ILO Director-General"
155
- stat:
156
- label: Stat Card
157
- description: The stat Card
158
- settings:
159
- theme: light
160
- cornercut: cornercut
161
- fields:
162
- eyebrow: "Report"
163
- title: "Global employment growth down by half in 2023"
164
- intro: The current global economic slowdown is likely to force more workers to accept lower quality, poorly paid jobs which lack job security and social protection, so accentuating inequalities exacerbated by the COVID-19 crisis.
165
- source:
166
- label: "World Employment and Social Outlook: Trends 2023"
167
- url: "https://www.ilo.org/global/research/global-reports/weso/WCMS_865332/lang--en/index.htm"
168
- multilink:
169
- label: Multilink Card
170
- description: The multilink Card
171
- settings:
172
- theme: light
173
- fields:
174
- eyebrow: High-level meeting
175
- title: "ILO welcomes G7 call to make a just transition to a green economy happen"
176
- intro: "At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health."
177
- linklist:
178
- linkgroup:
179
- - links:
180
- - label: Read the press release
181
- url: "https://www.ilo.org"
182
- - label: See the statement
183
- url: "https://www.ilo.org"
184
- - label: Remarks to G7 Openening Session
185
- url: "https://www.ilo.org"
186
- graphicpromo:
187
- label: Graphic Promo Card
188
- description: The graphic promo Card
189
- fields:
190
- eyebrow: High-level meetings
191
- title: "ILO welcomes G7 call to make a just transition to a green economy happen"
192
- intro: "At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health."
193
- link: "https://www.ilo.org"
194
- cta:
195
- label: "Read the press release"
196
- url: "https://www.ilo.org"
189
+ basic:
190
+ label: Default
197
191
  feature:
198
192
  label: Feature Card
199
- description: The Feature Card
200
- fields:
201
- title: "ILO welcomes G7 call to make a just transition to a green economy happen"
202
- eyebrow: High-level meeting
203
- date:
204
- human: 17 March 2022
205
- unix: 1670389200
206
- link: "https://www.ilo.org/search?q=graphic"
207
- linklist:
208
- headline: ""
209
- linkgroup:
210
- - headline: ""
211
- links:
212
- - label: Read the press release
213
- url: "https://www.ilo.org"
193
+ settings:
194
+ type: feature
195
+ text:
196
+ label: Text Card
197
+ settings:
198
+ type: text
214
199
  detail:
215
200
  label: Detail Card
216
- description: The Detail Card
217
- fields:
218
- title: "Technical meeting on digitalization in the construction sector"
219
- intro: "The purpose of the meeting will be to discuss opportunities and challenges for the future of work in the construction industry as a vehicle to ensure a human-centred economic recovery."
220
- eyebrow: Meeting
221
- date:
222
- human: 17 March 2022
223
- unix: 1670389200
224
- link: "https://www.ilo.org"
225
- profile:
226
- eventdetails: "8:30 - 12:00 CET | Geneva"
227
- factlist:
228
- label: Fact List Card
229
- description: The Fact List Card
230
- fields:
231
- eyebrow: Report
232
- title: "Economic slowdown likely to force workers to accept lower quality jobs"
233
- image: ""
234
- list:
235
- settings:
236
- - ordered: unordered
237
- - alignment: default
238
- items:
239
- - content: "Global employment growth will be only 1.0 per cent in 2023, less than half the level in 2022."
240
- id: "list1"
241
- - content: "The labour market deterioration is mainly due to emerging geopolitical tensions and the Ukraine conflict."
242
- id: "list2"
243
- - content: "The current slowdown means that many workers will have to accept lower quality jobs, often at very low pay."
244
- id: "list3"
201
+ settings:
202
+ type: detail
203
+ promo:
204
+ label: Promo Card
205
+ settings:
206
+ type: promo
207
+ multilink:
208
+ label: Multilink Card
209
+ settings:
210
+ type: multilink
245
211
  data:
246
212
  label: Data Card
247
- description: The Data Card
248
- fields:
249
- title: Technical meeting on digitalization in the construction sector
250
- eyebrow: "Meeting"
251
- intro: The purpose of the meeting will be to discuss opportunities and challenges for the future of work in the construction industry as a vehicle to ensure a human-centred economic recovery.
252
- dataset:
253
- content:
254
- items:
255
- - label: Date
256
- copy: 17 March 2022
257
- - label: Event type
258
- copy: Technical meeting of experts
259
- files:
260
- headline: Files
261
- items:
262
- - label: Meeting agenda
263
- url: "https://www.ilo.org"
264
- - label: Briefing notes
265
- url: "https://www.ilo.org"
266
- - label: Practical info
267
- url: "https://www.ilo.org"
268
- links:
269
- headline: Languages
270
- items:
271
- - label: English
272
- url: "https://www.ilo.org/search?q=link"
273
- - label: Español
274
- url: "https://www.ilo.org/search?q=hyperlink"
275
- - label: Français
276
- url: "https://www.ilo.org/search?q=url"
277
213
  settings:
278
- theme: light
279
- visibility: storybook
214
+ type: data
215
+ stat:
216
+ label: Stat Card
217
+ settings:
218
+ type: stat
@@ -0,0 +1,9 @@
1
+ import "./index";
2
+
3
+ export default {};
4
+ const patternDefinition = require("./card_data.wingsuit.yml");
5
+
6
+ /* eslint-disable-next-line */
7
+ export const wingsuit = {
8
+ patternDefinition,
9
+ };
@@ -0,0 +1,49 @@
1
+ {#
2
+ DATA CARD COMPONENT
3
+ #}
4
+ <div class="{{prefix}}--card {{prefix}}--card__type__data {{prefix}}--card__size__{{size}}">
5
+ <div class="{{prefix}}--card--wrap">
6
+ <div class="{{prefix}}--card--content">
7
+ {% if eyebrow %}
8
+ <p class="{{prefix}}--card--eyebrow">{{eyebrow}}</p>
9
+ {% endif %}
10
+ {% if image %}
11
+ <div class="{{prefix}}--card--image--wrapper">
12
+ {% include "@components/picture/picture.twig" with {
13
+ image: image,
14
+ class: "card"
15
+ }
16
+ %}
17
+ </div>
18
+ {% endif %}
19
+ {% if dataset %}
20
+ {% if dataset.content %}
21
+ {% for item in dataset.content.items %}
22
+ <p class="{{prefix}}--card__type__data--content-label">{{ item.label }}</p>
23
+ <p class="{{prefix}}--card__type__data--content-copy">{{ item.copy }}</p>
24
+ {% endfor %}
25
+ {% endif %}
26
+ {% if dataset.files %}
27
+ <div class="{{prefix}}--card__type__data--content-files">
28
+ <p class="{{prefix}}--card__type__data--content-label">{{ dataset.files.headline }}</p>
29
+ {% for item in dataset.files.items %}
30
+ <a class="{{prefix}}--card__type__data--file {{prefix}}--button {{prefix}}--button--primary {{prefix}}--button--small" href="{{item.url}}"><span class="button__label" download>{{ item.label }}</span></a>
31
+ {% endfor %}
32
+ </div>
33
+ {% endif %}
34
+ {% if dataset.links %}
35
+ <div class="{{prefix}}--card__type__data--content-links">
36
+ <p class="{{prefix}}--card__type__data--content-label">{{ dataset.links.headline }}</p>
37
+ {% for item in dataset.links.items %}
38
+ {% include "@components/link/link.twig" with {
39
+ url: item.url,
40
+ label: item.label,
41
+ prefix: prefix
42
+ } %} <span>&nbsp;</span>
43
+ {% endfor %}
44
+ </div>
45
+ {% endif %}
46
+ {% endif %}
47
+ </div>
48
+ </div>
49
+ </div>
@@ -0,0 +1,73 @@
1
+ datacard:
2
+ use: "@components/card_data/card_data.twig"
3
+ label: Data Card
4
+ description: A data card component for organising data about things like publications or events.
5
+ visibility: storybook
6
+ fields:
7
+ dataset:
8
+ type: object
9
+ label: Dataset object
10
+ description: Array of Content (label, copy), Files object (optional headline, array of items with label and url) and Links object (optional headline, array of items with label and url)
11
+ preview:
12
+ content:
13
+ items:
14
+ - label: Date
15
+ copy: 17 March 2022
16
+ - label: Event type
17
+ copy: Technical meeting of experts
18
+ files:
19
+ headline: Files
20
+ items:
21
+ - label: Meeting agenda
22
+ url: "https://www.ilo.org"
23
+ - label: Briefing notes
24
+ url: "https://www.ilo.org"
25
+ - label: Practical info
26
+ url: "https://www.ilo.org"
27
+ links:
28
+ headline: Languages
29
+ items:
30
+ - label: English
31
+ url: "https://www.ilo.org/search?q=link"
32
+ - label: Español
33
+ url: "https://www.ilo.org/search?q=hyperlink"
34
+ - label: Français
35
+ url: "https://www.ilo.org/search?q=url"
36
+ eyebrow:
37
+ type: string
38
+ label: Eyebrow
39
+ description: Eyebrow copy
40
+ preview: "Podcast"
41
+ image:
42
+ type: object
43
+ label: Image
44
+ description: Image settings for the card. This should include a `url`, which is an array of objects with an `src` property pointing to the image file and a `breakpoint` property which is either a number indicating the minimum viewport width at which the image should be displayed or a media query. It should also contain an `alt` property for the image's alt text.
45
+ preview:
46
+ alt: "Image alt text"
47
+ loading: "lazy"
48
+ url:
49
+ - breakpoint: "(min-width: 0px)"
50
+ src: "/images/small.jpg"
51
+ - breakpoint: "(min-width: 800px)"
52
+ src: "/images/medium.jpg"
53
+ - breakpoint: "(min-width: 1200px)"
54
+ src: "/images/large.jpg"
55
+ - breakpoint: "(min-width: 1440px)"
56
+ src: "/images/large.jpg"
57
+ settings:
58
+ size:
59
+ type: select
60
+ label: size
61
+ description: Sets the size of the card. If not set, the card will appear as `narrow`.
62
+ required: false
63
+ preview: "narrow"
64
+ options:
65
+ narrow: narrow
66
+ wide: wide
67
+ fluid: fluid
68
+
69
+
70
+
71
+
72
+
73
+
@@ -0,0 +1,9 @@
1
+ import "./index";
2
+
3
+ export default {};
4
+ const patternDefinition = require("./card_data.wingsuit.yml");
5
+
6
+ /* eslint-disable-next-line */
7
+ export const wingsuit = {
8
+ patternDefinition,
9
+ };
@@ -0,0 +1,9 @@
1
+ import "./index";
2
+
3
+ export default {};
4
+ const patternDefinition = require("./card_detail.wingsuit.yml");
5
+
6
+ /* eslint-disable-next-line */
7
+ export const wingsuit = {
8
+ patternDefinition,
9
+ };
@@ -0,0 +1,37 @@
1
+ {#
2
+ DETAIL CARD COMPONENT
3
+ #}
4
+
5
+ <div class="{{prefix}}--card {{prefix}}--card__type__detail {{prefix}}--card__action {{prefix}}--card__size__{{size}} {% if isvideo %} {{prefix}}--card__isvideo {% endif %}">
6
+ <a class="{{prefix}}--card--link" href="{{link}}" title="{{title}}">
7
+ <span class="{{prefix}}--card--link--text">{{title}}</span>
8
+ </a>
9
+ <div class="{{prefix}}--card--wrap">
10
+ {% if image %}
11
+ <div class="{{prefix}}--card--image--wrapper">
12
+ {% include "@components/picture/picture.twig" with {
13
+ image: image,
14
+ class: "card"
15
+ }
16
+ %}
17
+ </div>
18
+ {% endif %}
19
+ <div class="{{prefix}}--card--content">
20
+ {% if eyebrow %}
21
+ <p class="{{prefix}}--card--eyebrow">{{eyebrow}}</p>
22
+ {% endif %}
23
+ {% if title %}
24
+ <h5 class="{{prefix}}--card--title">{{title}}</h5>
25
+ {% endif %}
26
+ {% if intro %}
27
+ <p class="{{prefix}}--card--intro">{{intro}}</p>
28
+ {% endif %}
29
+ {% if date %}
30
+ <time class="{{prefix}}--card--date" datetime="{{date.unix}}">{{date.human}}</time>
31
+ {% endif %}
32
+ {% if dateExtra %}
33
+ <p class="{{prefix}}--card--date-extra">{{dateExtra}}</p>
34
+ {% endif %}
35
+ </div>
36
+ </div>
37
+ </div>