@ilo-org/twig 0.17.0 → 0.18.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/dist/components/accordion/accordion-item.twig +22 -0
- package/dist/components/accordion/accordion.behavior.js +1 -0
- package/dist/components/accordion/accordion.css +1 -0
- package/dist/components/accordion/accordion.twig +16 -0
- package/dist/components/accordion/accordion.wingsuit.yml +77 -0
- package/dist/components/breadcrumb/breadcrumb.behavior.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.css +1 -0
- package/dist/components/breadcrumb/breadcrumb.twig +43 -0
- package/dist/components/breadcrumb/breadcrumb.wingsuit.yml +36 -0
- package/dist/components/button/button.css +1 -0
- package/dist/components/button/button.twig +23 -0
- package/dist/components/button/button.wingsuit.yml +114 -0
- package/dist/components/callout/callout.behavior.js +1 -0
- package/dist/components/callout/callout.css +1 -0
- package/dist/components/callout/callout.twig +41 -0
- package/dist/components/callout/callout.wingsuit.yml +72 -0
- package/dist/components/card/card.css +1 -0
- package/dist/components/card/card.twig +24 -0
- package/dist/components/card/card.wingsuit.yml +227 -0
- package/dist/components/card_data/card_data.twig +101 -0
- package/dist/components/card_data/card_data.wingsuit.yml +135 -0
- package/dist/components/card_detail/card_detail.twig +37 -0
- package/dist/components/card_detail/card_detail.wingsuit.yml +71 -0
- package/dist/components/card_factlist/card_factlist.twig +21 -0
- package/dist/components/card_factlist/card_factlist.wingsuit.yml +46 -0
- package/dist/components/card_feature/card_feature.twig +39 -0
- package/dist/components/card_feature/card_feature.wingsuit.yml +80 -0
- package/dist/components/card_multilink/card_multilink.twig +45 -0
- package/dist/components/card_multilink/card_multilink.wingsuit.yml +91 -0
- package/dist/components/card_promo/card_promo.twig +35 -0
- package/dist/components/card_promo/card_promo.wingsuit.yml +71 -0
- package/dist/components/card_stat/card_stat.twig +24 -0
- package/dist/components/card_stat/card_stat.wingsuit.yml +44 -0
- package/dist/components/card_text/card_text.twig +35 -0
- package/dist/components/card_text/card_text.wingsuit.yml +57 -0
- package/dist/components/cardgroup/cardgroup.css +1 -0
- package/dist/components/cardgroup/cardgroup.twig +46 -0
- package/dist/components/cardgroup/cardgroup.wingsuit.yml +158 -0
- package/dist/components/checkbox/checkbox.css +1 -0
- package/dist/components/checkbox/checkbox.twig +17 -0
- package/dist/components/checkbox/checkbox.wingsuit.yml +84 -0
- package/dist/components/container/container.css +1 -0
- package/dist/components/contextmenu/contextmenu.css +1 -0
- package/dist/components/contextmenu/contextmenu.twig +12 -0
- package/dist/components/contextmenu/contextmenu.wingsuit.yml +24 -0
- package/dist/components/credit/credit.css +1 -0
- package/dist/components/datacard/datacard.css +1 -0
- package/dist/components/datepicker/datepicker.css +1 -0
- package/dist/components/datepicker/datepicker.twig +20 -0
- package/dist/components/datepicker/datepicker.wingsuit.yml +72 -0
- package/dist/components/detailcard/detailcard.css +1 -0
- package/dist/components/dropdown/dropdown.css +1 -0
- package/dist/components/dropdown/dropdown.twig +22 -0
- package/dist/components/dropdown/dropdown.wingsuit.yml +101 -0
- package/dist/components/empty/empty.css +1 -0
- package/dist/components/factlistcard/factlistcard.css +1 -0
- package/dist/components/featurecard/featurecard.css +1 -0
- package/dist/components/fieldset/fieldset.css +1 -0
- package/dist/components/file-upload/file-upload.css +1 -0
- package/dist/components/fileupload/fileupload.behavior.js +1 -0
- package/dist/components/fileupload/fileupload.twig +20 -0
- package/dist/components/fileupload/fileupload.wingsuit.yml +95 -0
- package/dist/components/footer/footer.css +1 -0
- package/dist/components/footer/footer.twig +63 -0
- package/dist/components/footer/footer.wingsuit.yml +106 -0
- package/dist/components/form/fieldset.twig +70 -0
- package/dist/components/form/form.css +1 -0
- package/dist/components/form/form.twig +19 -0
- package/dist/components/form/form.wingsuit.yml +205 -0
- package/dist/components/form/formcontrol.twig +89 -0
- package/dist/components/form/input.twig +10 -0
- package/dist/components/formcontrol/formcontrol.css +1 -0
- package/dist/components/heading/heading.css +1 -0
- package/dist/components/hero/hero.css +1 -0
- package/dist/components/hero/hero.twig +65 -0
- package/dist/components/hero/hero.wingsuit.yml +182 -0
- package/dist/components/herocard/herocard.css +1 -0
- package/dist/components/herocard/herocard.twig +30 -0
- package/dist/components/herocard/herocard.wingsuit.yml +71 -0
- package/dist/components/icon/icon.behavior.js +1 -0
- package/dist/components/icon/icon.css +1 -0
- package/dist/components/icon/icon.twig +4 -0
- package/dist/components/icon/icon.wingsuit.yml +29 -0
- package/dist/components/image/image.css +1 -0
- package/dist/components/image/image.twig +29 -0
- package/dist/components/image/image.wingsuit.yml +57 -0
- package/dist/components/input/input.css +1 -0
- package/dist/components/link/link.css +1 -0
- package/dist/components/link/link.twig +8 -0
- package/dist/components/link/link.wingsuit.yml +36 -0
- package/dist/components/linklist/linklist.behavior.js +1 -0
- package/dist/components/linklist/linklist.css +1 -0
- package/dist/components/linklist/linklist.twig +26 -0
- package/dist/components/linklist/linklist.wingsuit.yml +55 -0
- package/dist/components/list/list-item.twig +6 -0
- package/dist/components/list/list.css +1 -0
- package/dist/components/list/list.twig +35 -0
- package/dist/components/list/list.wingsuit.yml +60 -0
- package/dist/components/list-item/list-item.wingsuit.yml +19 -0
- package/dist/components/loading/loading.behavior.js +1 -0
- package/dist/components/loading/loading.css +1 -0
- package/dist/components/loading/loading.twig +8 -0
- package/dist/components/loading/loading.wingsuit.yml +39 -0
- package/dist/components/localnav/localnav.twig +86 -0
- package/dist/components/localnav/localnav.wingsuit.yml +88 -0
- package/dist/components/logo/logo.css +1 -0
- package/dist/components/logogrid/logogrid.css +1 -0
- package/dist/components/logogrid/logogrid.twig +17 -0
- package/dist/components/logogrid/logogrid.wingsuit.yml +45 -0
- package/dist/components/modal/modal.behavior.js +1 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/modal/modal.twig +20 -0
- package/dist/components/modal/modal.wingsuit.yml +61 -0
- package/dist/components/multilinkcard/multilinkcard.css +1 -0
- package/dist/components/navigation/navigation.behavior.js +1 -0
- package/dist/components/navigation/navigation.css +1 -0
- package/dist/components/navigation/navigation.twig +171 -0
- package/dist/components/navigation/navigation.wingsuit.yml +127 -0
- package/dist/components/notification/notification.behavior.js +1 -0
- package/dist/components/notification/notification.css +1 -0
- package/dist/components/notification/notification.twig +18 -0
- package/dist/components/notification/notification.wingsuit.yml +59 -0
- package/dist/components/numberpicker/numberpicker.twig +16 -0
- package/dist/components/numberpicker/numberpicker.wingsuit.yml +92 -0
- package/dist/components/pagination/pagination.css +1 -0
- package/dist/components/pagination/pagination.twig +49 -0
- package/dist/components/pagination/pagination.wingsuit.yml +75 -0
- package/dist/components/picture/picture.twig +21 -0
- package/dist/components/polyfill/polyfill.twig +10 -0
- package/dist/components/profile/profile.css +1 -0
- package/dist/components/profile/profile.twig +26 -0
- package/dist/components/profile/profile.wingsuit.yml +46 -0
- package/dist/components/promocard/promocard.css +1 -0
- package/dist/components/radio/radio.css +1 -0
- package/dist/components/radio/radio.twig +23 -0
- package/dist/components/radio/radio.wingsuit.yml +84 -0
- package/dist/components/readmore/readmore.behavior.js +1 -0
- package/dist/components/readmore/readmore.css +1 -0
- package/dist/components/readmore/readmore.twig +16 -0
- package/dist/components/readmore/readmore.wingsuit.yml +37 -0
- package/dist/components/richtext/richtext.css +1 -0
- package/dist/components/richtext/richtext.twig +6 -0
- package/dist/components/richtext/richtext.wingsuit.yml +13 -0
- package/dist/components/search/search.behavior.js +1 -0
- package/dist/components/search/search.twig +31 -0
- package/dist/components/search/search.wingsuit.yml +90 -0
- package/dist/components/searchfield/searchfield.css +1 -0
- package/dist/components/socialmedia/socialmedia.css +1 -0
- package/dist/components/socialmedia/socialmedia.twig +17 -0
- package/dist/components/socialmedia/socialmedia.wingsuit.yml +59 -0
- package/dist/components/statcard/statcard.css +1 -0
- package/dist/components/table/table.behavior.js +1 -0
- package/dist/components/table/table.css +1 -0
- package/dist/components/table/table.twig +39 -0
- package/dist/components/table/table.wingsuit.yml +112 -0
- package/dist/components/tableofcontents/tableofcontents.behavior.js +1 -0
- package/dist/components/tableofcontents/tableofcontents.css +1 -0
- package/dist/components/tableofcontents/tableofcontents.twig +47 -0
- package/dist/components/tableofcontents/tableofcontents.wingsuit.yml +44 -0
- package/dist/components/tabs/tabs.behavior.js +1 -0
- package/dist/components/tabs/tabs.css +1 -0
- package/dist/components/tabs/tabs.twig +26 -0
- package/dist/components/tabs/tabs.wingsuit.yml +169 -0
- package/dist/components/tag/tag.behavior.js +1 -0
- package/dist/components/tag/tag.css +1 -0
- package/dist/components/tag/tag.wingsuit.yml +44 -0
- package/dist/components/tags/tag.twig +30 -0
- package/dist/components/tags/tags.twig +15 -0
- package/dist/components/tags/tags.wingsuit.yml +45 -0
- package/dist/components/textarea/textarea.css +1 -0
- package/dist/components/textarea/textarea.twig +14 -0
- package/dist/components/textarea/textarea.wingsuit.yml +127 -0
- package/dist/components/textcard/textcard.css +1 -0
- package/dist/components/textinput/textinput.css +1 -0
- package/dist/components/textinput/textinput.twig +14 -0
- package/dist/components/textinput/textinput.wingsuit.yml +87 -0
- package/dist/components/toggle/toggle.css +1 -0
- package/dist/components/toggle/toggle.twig +36 -0
- package/dist/components/toggle/toggle.wingsuit.yml +95 -0
- package/dist/components/tooltip/tooltip.behavior.js +1 -0
- package/dist/components/tooltip/tooltip.css +1 -0
- package/dist/components/tooltip/tooltip.twig +14 -0
- package/dist/components/tooltip/tooltip.wingsuit.yml +53 -0
- package/dist/components/video/video.behavior.js +16 -0
- package/dist/components/video/video.css +1 -0
- package/dist/components/video/video.twig +18 -0
- package/dist/components/video/video.wingsuit.yml +82 -0
- package/dist/components/video/videoplayer.twig +8 -0
- package/dist/global/styles.css +2 -0
- package/package.json +13 -9
- package/src/patterns/components/checkbox/checkbox.wingsuit.yml +1 -0
- package/src/patterns/components/dropdown/dropdown.wingsuit.yml +2 -1
- package/src/patterns/components/fileupload/fileupload.wingsuit.yml +1 -0
- package/src/patterns/components/list/list-item.twig +1 -1
- package/src/patterns/components/list/list-item.wingsuit.yml +1 -1
- package/src/patterns/components/list/list.twig +2 -2
- package/src/patterns/components/list/list.wingsuit.yml +11 -11
- package/src/patterns/components/navigation/navigation.wingsuit.yml +1 -0
- package/src/patterns/components/numberpicker/numberpicker.wingsuit.yml +1 -0
- package/src/patterns/components/radio/radio.wingsuit.yml +1 -0
- package/src/patterns/components/search/search.wingsuit.yml +1 -0
- package/src/patterns/components/tags/tag.twig +4 -4
- package/src/patterns/components/tags/tag.wingsuit.yml +4 -3
- package/src/patterns/components/tags/tags.twig +1 -1
- package/src/patterns/components/tags/tags.wingsuit.yml +3 -3
- package/src/patterns/components/textarea/textarea.wingsuit.yml +1 -0
- package/src/patterns/components/textinput/textinput.wingsuit.yml +1 -0
- package/src/patterns/components/toggle/toggle.wingsuit.yml +1 -0
- package/.browserslistrc +0 -4
- package/.eslintrc.js +0 -25
- package/.stylelintignore +0 -9
- package/.stylelintrc +0 -19
- package/.turbo/turbo-build:lib.log +0 -71
- package/CHANGELOG.md +0 -1036
- package/apps/storybook/assets.js +0 -10
- package/apps/storybook/main.js +0 -27
- package/apps/storybook/manager-head.html +0 -92
- package/apps/storybook/manager.js +0 -7
- package/apps/storybook/patterns/colors.stories.mdx +0 -23
- package/apps/storybook/patterns/intro.stories.mdx +0 -184
- package/apps/storybook/patterns/typeset.stories.mdx +0 -32
- package/apps/storybook/patterns/welcome.stories.mdx +0 -33
- package/apps/storybook/preview-body.html +0 -4
- package/apps/storybook/preview-head.html +0 -5
- package/apps/storybook/preview.js +0 -36
- package/apps/storybook/styles.scss +0 -25
- package/apps/storybook/theme.js +0 -46
- package/apps/storybook/welcome.scss +0 -131
- package/babel.config.js +0 -16
- package/copystyles.js +0 -16
- package/copytemplates.js +0 -27
- package/images/fao-logo.svg +0 -195
- package/images/favicon.ico +0 -0
- package/images/hero.jpg +0 -0
- package/images/ilo-dg.jpg +0 -0
- package/images/ilo-headquarters.jpg +0 -0
- package/images/large.jpg +0 -0
- package/images/logo_en_horizontal_blue.svg +0 -893
- package/images/media-file-poster.jpg +0 -0
- package/images/medium.jpg +0 -0
- package/images/publication.jpg +0 -0
- package/images/small.jpg +0 -0
- package/images/twig.svg +0 -6
- package/images/unhcr-logo.svg +0 -1
- package/images/unicef-logo.png +0 -0
- package/images/video-example.mp4 +0 -0
- package/images/wfp-logo.svg +0 -1
- package/images/who-logo.svg +0 -1
- package/images/youtube-video-poster.avif +0 -0
- package/importprefix.js +0 -20
- package/importsvgs.js +0 -5
- package/jest.config.js +0 -18
- package/postcss.config.js +0 -6
- package/rollup.config.js +0 -31
- package/wingsuit.config.js +0 -28
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
featurecard:
|
|
2
|
+
namespace: Components/Cards
|
|
3
|
+
use: "@components/card_feature/card_feature.twig"
|
|
4
|
+
label: Feature Card
|
|
5
|
+
description: A feature card component for displaying links to content. It can have an image, title, link, date and call to action.
|
|
6
|
+
visibility: storybook
|
|
7
|
+
fields:
|
|
8
|
+
cta:
|
|
9
|
+
type: object
|
|
10
|
+
label: cta
|
|
11
|
+
description: Optional call to action settings for the card. This should include a `url` property for the link and a `label` property for the link text.
|
|
12
|
+
preview:
|
|
13
|
+
label: "Read more"
|
|
14
|
+
url: "https://www.ilo.org/"
|
|
15
|
+
date:
|
|
16
|
+
type: object
|
|
17
|
+
label: Date
|
|
18
|
+
description: Date copy (human and Unix)
|
|
19
|
+
preview:
|
|
20
|
+
human: 20 September 2022
|
|
21
|
+
unix: 1670389200
|
|
22
|
+
eyebrow:
|
|
23
|
+
type: string
|
|
24
|
+
label: Eyebrow
|
|
25
|
+
description: Eyebrow copy
|
|
26
|
+
preview: "Podcast"
|
|
27
|
+
image:
|
|
28
|
+
type: object
|
|
29
|
+
label: Image
|
|
30
|
+
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.
|
|
31
|
+
preview:
|
|
32
|
+
alt: "Image alt text"
|
|
33
|
+
loading: "lazy"
|
|
34
|
+
url:
|
|
35
|
+
- breakpoint: "(min-width: 0px)"
|
|
36
|
+
src: "/images/small.jpg"
|
|
37
|
+
- breakpoint: "(min-width: 800px)"
|
|
38
|
+
src: "/images/medium.jpg"
|
|
39
|
+
- breakpoint: "(min-width: 1200px)"
|
|
40
|
+
src: "/images/large.jpg"
|
|
41
|
+
- breakpoint: "(min-width: 1440px)"
|
|
42
|
+
src: "/images/large.jpg"
|
|
43
|
+
link:
|
|
44
|
+
type: string
|
|
45
|
+
label: Link
|
|
46
|
+
description: Link field for the card
|
|
47
|
+
preview: "https://www.ilo.org/"
|
|
48
|
+
title:
|
|
49
|
+
type: string
|
|
50
|
+
label: Title
|
|
51
|
+
description: Title field for the card
|
|
52
|
+
preview: Can digital technology be an equality machine?
|
|
53
|
+
settings:
|
|
54
|
+
isvideo:
|
|
55
|
+
type: select
|
|
56
|
+
label: Is a Video
|
|
57
|
+
description: Whether the card should display a video icon (for Feature card)
|
|
58
|
+
preview: "false"
|
|
59
|
+
options:
|
|
60
|
+
"true": "true"
|
|
61
|
+
"false": "false"
|
|
62
|
+
size:
|
|
63
|
+
type: select
|
|
64
|
+
label: size
|
|
65
|
+
description: Sets the size of the card. If not set, the card will appear as `narrow`.
|
|
66
|
+
required: false
|
|
67
|
+
preview: "narrow"
|
|
68
|
+
options:
|
|
69
|
+
narrow: narrow
|
|
70
|
+
wide: wide
|
|
71
|
+
fluid: fluid
|
|
72
|
+
theme:
|
|
73
|
+
type: select
|
|
74
|
+
label: Theme
|
|
75
|
+
description: Sets the card to appear as either light or dark. If not set, the card will inherit the theme of its parent.
|
|
76
|
+
required: false
|
|
77
|
+
preview: "light"
|
|
78
|
+
options:
|
|
79
|
+
dark: Dark
|
|
80
|
+
light: Light
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{# card_multilink.twig #}
|
|
2
|
+
|
|
3
|
+
<div class="ilo--card ilo--card__type__multilink {% if link|length > 0 %} ilo--card__action {% endif %} ilo--card__size__{{size}} {% if isvideo %} ilo--card__isvideo {% endif %} {% if linklist %} ilo--card__linklist {% endif %} {% if size == "wide" or size == "fluid" %} ilo--card__align__{{alignment}} {% endif %}">
|
|
4
|
+
{% if link|length > 0 %}
|
|
5
|
+
<a class="ilo--card--link" href="{{link}}" title="{{title}}">
|
|
6
|
+
<span class="ilo--card--link--text">{{title}}</span>
|
|
7
|
+
</a>
|
|
8
|
+
{% endif %}
|
|
9
|
+
<div class="ilo--card--wrap">
|
|
10
|
+
<div class="ilo--card--image--wrapper">
|
|
11
|
+
{% include "@components/picture/picture.twig" with {
|
|
12
|
+
image: image,
|
|
13
|
+
class: "card"
|
|
14
|
+
}
|
|
15
|
+
%}
|
|
16
|
+
</div>
|
|
17
|
+
<div class="ilo--card--content">
|
|
18
|
+
{% if eyebrow %}
|
|
19
|
+
<p class="ilo--card--eyebrow">{{eyebrow}}</p>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if title %}
|
|
22
|
+
<h3 class="ilo--card--title">{{title}}</h3>
|
|
23
|
+
{% endif %}
|
|
24
|
+
{% if image %}
|
|
25
|
+
<div class="ilo--card--image--wrapper">
|
|
26
|
+
{% include "@components/picture/picture.twig" with {
|
|
27
|
+
image: image,
|
|
28
|
+
class: "card"
|
|
29
|
+
}
|
|
30
|
+
%}
|
|
31
|
+
</div>
|
|
32
|
+
{% endif %}
|
|
33
|
+
{% if intro %}
|
|
34
|
+
<p class="ilo--card--intro">{{intro}}</p>
|
|
35
|
+
{% endif %}
|
|
36
|
+
{% if linklist %}
|
|
37
|
+
{% include "@components/linklist/linklist.twig" with {
|
|
38
|
+
headline: linklist.headline,
|
|
39
|
+
linkgroup: linklist.linkgroup,
|
|
40
|
+
prefix: prefix
|
|
41
|
+
} only %}
|
|
42
|
+
{% endif %}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
multilinkcard:
|
|
2
|
+
namespace: Components/Cards
|
|
3
|
+
use: "@components/card_multilink/card_multilink.twig"
|
|
4
|
+
label: Multilink Card
|
|
5
|
+
description: A multilink card component for displaying links to content. It can have an image, title, intro text and a list of links displayed at the bottom or on the side of the card.
|
|
6
|
+
visibility: storybook
|
|
7
|
+
fields:
|
|
8
|
+
date:
|
|
9
|
+
type: object
|
|
10
|
+
label: Date
|
|
11
|
+
description: Date copy (human and Unix)
|
|
12
|
+
preview:
|
|
13
|
+
human: 20 September 2022
|
|
14
|
+
unix: 1670389200
|
|
15
|
+
eyebrow:
|
|
16
|
+
type: string
|
|
17
|
+
label: Eyebrow
|
|
18
|
+
description: Eyebrow copy
|
|
19
|
+
preview: "Podcast"
|
|
20
|
+
image:
|
|
21
|
+
type: object
|
|
22
|
+
label: Image
|
|
23
|
+
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.
|
|
24
|
+
preview:
|
|
25
|
+
alt: "Image alt text"
|
|
26
|
+
loading: "lazy"
|
|
27
|
+
url:
|
|
28
|
+
- breakpoint: "(min-width: 0px)"
|
|
29
|
+
src: "/images/small.jpg"
|
|
30
|
+
- breakpoint: "(min-width: 800px)"
|
|
31
|
+
src: "/images/medium.jpg"
|
|
32
|
+
- breakpoint: "(min-width: 1200px)"
|
|
33
|
+
src: "/images/large.jpg"
|
|
34
|
+
- breakpoint: "(min-width: 1440px)"
|
|
35
|
+
src: "/images/large.jpg"
|
|
36
|
+
intro:
|
|
37
|
+
type: string
|
|
38
|
+
label: Intro
|
|
39
|
+
description: Intro field for the card
|
|
40
|
+
preview: "As the United Nations agency for the world of work, the ILO sets international labour standards, promotes rights at work and encourages decent employment opportunities, the enhancement of social protection and the strengthening of dialogue on work-related issues."
|
|
41
|
+
link:
|
|
42
|
+
type: string
|
|
43
|
+
label: Link
|
|
44
|
+
description: Link field for the card
|
|
45
|
+
preview: "https://www.ilo.org/"
|
|
46
|
+
linklist:
|
|
47
|
+
type: object
|
|
48
|
+
label: Link List
|
|
49
|
+
description: Implementation of the LinkList component.
|
|
50
|
+
preview:
|
|
51
|
+
linkgroup:
|
|
52
|
+
- links:
|
|
53
|
+
- label: Read the press release
|
|
54
|
+
url: "https://www.ilo.org"
|
|
55
|
+
- label: See the statement
|
|
56
|
+
url: "https://www.ilo.org"
|
|
57
|
+
- label: Remarks to G7 Openening Session
|
|
58
|
+
url: "https://www.ilo.org"
|
|
59
|
+
title:
|
|
60
|
+
type: string
|
|
61
|
+
label: Title
|
|
62
|
+
description: Title field for the card
|
|
63
|
+
preview: Advancing social justice
|
|
64
|
+
settings:
|
|
65
|
+
alignment:
|
|
66
|
+
type: select
|
|
67
|
+
label: Alignment
|
|
68
|
+
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.
|
|
69
|
+
preview: "left"
|
|
70
|
+
options:
|
|
71
|
+
left: Left
|
|
72
|
+
right: Right
|
|
73
|
+
isvideo:
|
|
74
|
+
type: select
|
|
75
|
+
label: is a Video
|
|
76
|
+
description: Whether the card should display a video icon (for Feature card)
|
|
77
|
+
preview: "false"
|
|
78
|
+
options:
|
|
79
|
+
"true": "true"
|
|
80
|
+
"false": "false"
|
|
81
|
+
size:
|
|
82
|
+
type: select
|
|
83
|
+
label: Size
|
|
84
|
+
description: Sets the size of the card. If not set, the card will appear as `standard`.
|
|
85
|
+
required: false
|
|
86
|
+
preview: "standard"
|
|
87
|
+
options:
|
|
88
|
+
standard: standard
|
|
89
|
+
narrow: narrow
|
|
90
|
+
wide: wide
|
|
91
|
+
fluid: fluid
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{#
|
|
2
|
+
PROMO CARD COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
|
|
5
|
+
<div class="ilo--card--wrapper ilo--card--wrapper__type__promo ilo--card--wrapper__type__promo__size__{{ size }}">
|
|
6
|
+
<div class="ilo--card ilo--card__type__promo ilo--card__size__{{ size }} ilo--card__action ilo--card__theme__{{theme}} {% if cornercut %}ilo--card__cornercut{% endif %}">
|
|
7
|
+
<a class="ilo--card--link" href="{{link}}" title="{{title}}">
|
|
8
|
+
<span class="ilo--card--link--text">{{title}}</span>
|
|
9
|
+
</a>
|
|
10
|
+
<div class="ilo--card--wrap">
|
|
11
|
+
<div class="ilo--card--content">
|
|
12
|
+
{% if eyebrow %}
|
|
13
|
+
<p class="ilo--card--eyebrow">{{eyebrow}}</p>
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% if title %}
|
|
16
|
+
<h3 class="ilo--card--title">{{title}}</h3>
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% if intro %}
|
|
19
|
+
<p class="ilo--card--intro">{{intro}}</p>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if cta %}
|
|
22
|
+
<div class="ilo--card--cta">
|
|
23
|
+
{% include "@components/button/button.twig" with {
|
|
24
|
+
size: "medium",
|
|
25
|
+
url: cta.url,
|
|
26
|
+
label: cta.label,
|
|
27
|
+
type: "primary",
|
|
28
|
+
prefix: prefix,
|
|
29
|
+
} only %}
|
|
30
|
+
</div>
|
|
31
|
+
{% endif %}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
promocard:
|
|
2
|
+
namespace: Components/Cards
|
|
3
|
+
use: "@components/card_promo/card_promo.twig"
|
|
4
|
+
label: Promo Card
|
|
5
|
+
description: A promo card component for displaying links to content. It can have a title, link, intro and additional call to action.
|
|
6
|
+
visibility: storybook
|
|
7
|
+
fields:
|
|
8
|
+
cta:
|
|
9
|
+
type: object
|
|
10
|
+
label: cta
|
|
11
|
+
description: An optional button that can be used to link to a page.
|
|
12
|
+
preview:
|
|
13
|
+
label: "Read the press release"
|
|
14
|
+
url: "https://www.ilo.org/global/about-the-ilo/newsroom/news/WCMS_846303/lang--en/index.htm"
|
|
15
|
+
date:
|
|
16
|
+
type: object
|
|
17
|
+
label: Date
|
|
18
|
+
description: Date copy (human and Unix)
|
|
19
|
+
preview:
|
|
20
|
+
human: 20 September 2022
|
|
21
|
+
unix: 1670389200
|
|
22
|
+
eyebrow:
|
|
23
|
+
type: string
|
|
24
|
+
label: Eyebrow
|
|
25
|
+
description: Eyebrow copy
|
|
26
|
+
preview: "Podcast"
|
|
27
|
+
intro:
|
|
28
|
+
type: string
|
|
29
|
+
label: Intro
|
|
30
|
+
description: Intro copy text
|
|
31
|
+
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."
|
|
32
|
+
link:
|
|
33
|
+
type: string
|
|
34
|
+
label: Link
|
|
35
|
+
description: Link field for the card
|
|
36
|
+
preview: "https://www.ilo.org/"
|
|
37
|
+
title:
|
|
38
|
+
type: string
|
|
39
|
+
label: Title
|
|
40
|
+
description: Title field for the card
|
|
41
|
+
preview: Can digital technology be an equality machine?
|
|
42
|
+
settings:
|
|
43
|
+
cornercut:
|
|
44
|
+
type: select
|
|
45
|
+
label: cornercut
|
|
46
|
+
description: Sets the cornercut of the card. If not set, the card will appear as `square`.
|
|
47
|
+
required: false
|
|
48
|
+
preview: "true"
|
|
49
|
+
options:
|
|
50
|
+
"true": "true"
|
|
51
|
+
"false": "false"
|
|
52
|
+
size:
|
|
53
|
+
type: select
|
|
54
|
+
label: Size
|
|
55
|
+
description: Sets the size of the card. If not set, the card will appear as `standard`.
|
|
56
|
+
required: false
|
|
57
|
+
preview: "standard"
|
|
58
|
+
options:
|
|
59
|
+
standard: standard
|
|
60
|
+
narrow: narrow
|
|
61
|
+
wide: wide
|
|
62
|
+
fluid: fluid
|
|
63
|
+
theme:
|
|
64
|
+
type: select
|
|
65
|
+
label: Theme
|
|
66
|
+
description: Sets the card to appear as either light or dark. If not set, the card will inherit the theme of its parent.
|
|
67
|
+
required: false
|
|
68
|
+
preview: "light"
|
|
69
|
+
options:
|
|
70
|
+
dark: Dark
|
|
71
|
+
light: Light
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{#
|
|
2
|
+
STAT CARD COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
<div class="ilo--card ilo--card__type__stat ilo--card__color__{{color}} ilo--card__size__{{size}}">
|
|
5
|
+
<div class="ilo--card--wrap">
|
|
6
|
+
<div class="ilo--card--content">
|
|
7
|
+
{% if title %}
|
|
8
|
+
<h3 class="ilo--card--title">{{title}}</h3>
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% if intro %}
|
|
11
|
+
<p class="ilo--card--intro">{{intro}}</p>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if source %}
|
|
14
|
+
<div class="ilo--card--source">
|
|
15
|
+
{% include "@components/link/link.twig" with {
|
|
16
|
+
url: source.url,
|
|
17
|
+
label: source.label,
|
|
18
|
+
prefix: prefix
|
|
19
|
+
} only %}
|
|
20
|
+
</div>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
statcard:
|
|
2
|
+
namespace: Components/Cards
|
|
3
|
+
use: "@components/card_stat/card_stat.twig"
|
|
4
|
+
label: Stat Card
|
|
5
|
+
description: A stat card highlights a prominent fact or statistic with a link to where the information comes from. It can appear in a range of different colors.
|
|
6
|
+
visibility: storybook
|
|
7
|
+
fields:
|
|
8
|
+
title:
|
|
9
|
+
type: string
|
|
10
|
+
label: Title
|
|
11
|
+
description: The headline for the statistic
|
|
12
|
+
preview: "Global employment growth down by half in 2023"
|
|
13
|
+
intro:
|
|
14
|
+
type: string
|
|
15
|
+
label: Intro
|
|
16
|
+
description: More informationa about the statistic
|
|
17
|
+
preview: "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."
|
|
18
|
+
source:
|
|
19
|
+
type: object
|
|
20
|
+
label: Source
|
|
21
|
+
description: A link pointing to where the statistic comes from.
|
|
22
|
+
preview:
|
|
23
|
+
label: "World Employment and Social Outlook: Trends 2023"
|
|
24
|
+
url: "https://www.ilo.org/global/research/global-reports/weso/WCMS_865332/lang--en/index.htm"
|
|
25
|
+
settings:
|
|
26
|
+
size:
|
|
27
|
+
type: select
|
|
28
|
+
label: Size
|
|
29
|
+
description: Sets the size of the card. If not set, the card will appear as `standard`.
|
|
30
|
+
required: false
|
|
31
|
+
preview: "standard"
|
|
32
|
+
options:
|
|
33
|
+
standard: Standard
|
|
34
|
+
fluid: Fluid
|
|
35
|
+
color:
|
|
36
|
+
type: select
|
|
37
|
+
label: Color
|
|
38
|
+
description: Color of the stat cards, options are `turquoise`, `green`, `yellow`, or `blue`. Only use for stat cards.
|
|
39
|
+
options:
|
|
40
|
+
turquoise: turquoise
|
|
41
|
+
green: green
|
|
42
|
+
yellow: yellow
|
|
43
|
+
blue: blue
|
|
44
|
+
preview: "blue"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{#
|
|
2
|
+
FEATURE CARD COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
|
|
5
|
+
<div class="ilo--card--wrapper">
|
|
6
|
+
<div class="ilo--card ilo--card__type__text ilo--card__size__{{ size }} ilo--card__action ilo--card__theme__{{theme}}">
|
|
7
|
+
<a class="ilo--card--link" href="{{link}}" title="{{title}}">
|
|
8
|
+
<span class="ilo--card--link--text">{{title}}</span>
|
|
9
|
+
</a>
|
|
10
|
+
<div class="ilo--card--wrap">
|
|
11
|
+
<div class="ilo--card--content">
|
|
12
|
+
{% if eyebrow %}
|
|
13
|
+
<p class="ilo--card--eyebrow">{{eyebrow}}</p>
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% if title %}
|
|
16
|
+
<h3 class="ilo--card--title">{{title}}</h3>
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% if date %}
|
|
19
|
+
<time class="ilo--card--date" datetime="{{date.unix}}">{{date.human}}</time>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if profile %}
|
|
22
|
+
{% include "@components/profile/profile.twig" with {
|
|
23
|
+
avatar: profile.avatar,
|
|
24
|
+
description: profile.description,
|
|
25
|
+
link: profile.link,
|
|
26
|
+
name: profile.name,
|
|
27
|
+
role: profile.role,
|
|
28
|
+
prefix: prefix,
|
|
29
|
+
theme: theme,
|
|
30
|
+
} only %}
|
|
31
|
+
{% endif %}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
textcard:
|
|
2
|
+
namespace: Components/Cards
|
|
3
|
+
use: "@components/card_text/card_text.twig"
|
|
4
|
+
label: Text Card
|
|
5
|
+
description: A text card component for displaying links to content. It can have a title, link, date and profile to highlight the author of the content.
|
|
6
|
+
visibility: storybook
|
|
7
|
+
fields:
|
|
8
|
+
date:
|
|
9
|
+
type: object
|
|
10
|
+
label: Date
|
|
11
|
+
description: Date copy (human and Unix)
|
|
12
|
+
preview:
|
|
13
|
+
human: 20 September 2022
|
|
14
|
+
unix: 1670389200
|
|
15
|
+
eyebrow:
|
|
16
|
+
type: string
|
|
17
|
+
label: Eyebrow
|
|
18
|
+
description: Eyebrow copy
|
|
19
|
+
preview: "Podcast"
|
|
20
|
+
link:
|
|
21
|
+
type: string
|
|
22
|
+
label: Link
|
|
23
|
+
description: Link field for the card
|
|
24
|
+
preview: "https://www.ilo.org/"
|
|
25
|
+
profile:
|
|
26
|
+
type: object
|
|
27
|
+
label: Profile
|
|
28
|
+
description: Optional profile of the author who created the content
|
|
29
|
+
preview:
|
|
30
|
+
avatar: "/images/ilo-dg.jpg"
|
|
31
|
+
name: "Gilbert F. Houngbo"
|
|
32
|
+
role: "ILO Director-General"
|
|
33
|
+
title:
|
|
34
|
+
type: string
|
|
35
|
+
label: Title
|
|
36
|
+
description: Title field for the card
|
|
37
|
+
preview: Can digital technology be an equality machine?
|
|
38
|
+
settings:
|
|
39
|
+
size:
|
|
40
|
+
type: select
|
|
41
|
+
label: Size
|
|
42
|
+
description: Sets the size of the card. If not set, the card will appear as `narrow`.
|
|
43
|
+
required: false
|
|
44
|
+
preview: "narrow"
|
|
45
|
+
options:
|
|
46
|
+
narrow: narrow
|
|
47
|
+
wide: wide
|
|
48
|
+
fluid: fluid
|
|
49
|
+
theme:
|
|
50
|
+
type: select
|
|
51
|
+
label: Theme
|
|
52
|
+
description: Sets the card to appear as either light or dark. If not set, the card will inherit the theme of its parent.
|
|
53
|
+
required: false
|
|
54
|
+
preview: "light"
|
|
55
|
+
options:
|
|
56
|
+
dark: Dark
|
|
57
|
+
light: Light
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ilo--cardgroup__collapsed .ilo--cardgroup--inner{gap:0!important}@media screen and (min-width:1024px){.ilo--cardgroup__count__one .ilo--cardgroup--inner{grid-template-columns:1fr}.ilo--cardgroup__count__two .ilo--cardgroup--inner{grid-template-columns:repeat(2,1fr)}.ilo--cardgroup__count__three .ilo--cardgroup--inner{grid-template-columns:repeat(3,1fr)}.ilo--cardgroup__count__four .ilo--cardgroup--inner{grid-template-columns:repeat(4,1fr)}}.ilo--cardgroup--inner{display:grid;grid-template-columns:1fr;grid-template-rows:auto;column-gap:1.7148981779rem;row-gap:1.7148981779rem;margin:auto;width:100%}.ilo--cardgroup .ilo--card,.ilo--cardgroup .ilo--card--wrapper{height:100%;width:100%;max-width:100%}.ilo--cardgroup--button-wrap{display:flex;justify-content:center;margin-top:3.4297963558rem;width:100%}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{#
|
|
2
|
+
CARDGROUP COMPONENT
|
|
3
|
+
#}
|
|
4
|
+
{% if not cardcount%}
|
|
5
|
+
{% set cardcount = "three" %}
|
|
6
|
+
{% endif %}
|
|
7
|
+
|
|
8
|
+
<div class="ilo--cardgroup ilo--cardgroup__count__{{cardcount}} {% if collapsed %} ilo--cardgroup__collapsed {% endif %}">
|
|
9
|
+
<div class="ilo--cardgroup--inner">
|
|
10
|
+
{% for card in group %}
|
|
11
|
+
<div class="ilo--cardgroup--card">
|
|
12
|
+
{% include "@components/card/card.twig" with {
|
|
13
|
+
size: size,
|
|
14
|
+
theme: theme,
|
|
15
|
+
type: type,
|
|
16
|
+
cta: card.cta,
|
|
17
|
+
dataset: card.dataset,
|
|
18
|
+
date: card.date,
|
|
19
|
+
dateExtra: card.dateExtra,
|
|
20
|
+
eyebrow: card.eyebrow,
|
|
21
|
+
image: card.image,
|
|
22
|
+
intro: card.intro,
|
|
23
|
+
link: card.link,
|
|
24
|
+
linklist: card.linklist,
|
|
25
|
+
list: card.list,
|
|
26
|
+
title: card.title,
|
|
27
|
+
alignment: alignment,
|
|
28
|
+
color: card.color,
|
|
29
|
+
cornercut: card.cornercut,
|
|
30
|
+
source: card.source,
|
|
31
|
+
prefix: prefix
|
|
32
|
+
} only %}
|
|
33
|
+
</div>
|
|
34
|
+
{% endfor %}
|
|
35
|
+
</div>
|
|
36
|
+
{% if cta %}
|
|
37
|
+
<div class="ilo--cardgroup--button-wrap">
|
|
38
|
+
<a
|
|
39
|
+
class="ilo--button ilo--button--medium ilo--button--secondary"
|
|
40
|
+
href="{{cta.url}}"
|
|
41
|
+
>
|
|
42
|
+
<span class="button__label">{{ cta.label }}</span>
|
|
43
|
+
</a>
|
|
44
|
+
</div>
|
|
45
|
+
{% endif %}
|
|
46
|
+
</div>
|