@eeacms/volto-eea-design-system 1.0.0-alpha.11 → 1.0.0-alpha.12
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/CHANGELOG.md +32 -0
- package/package.json +1 -1
- package/src/ui/Banner/Banner.jsx +6 -1
- package/src/ui/Card/Card.stories.jsx +176 -238
- package/theme/theme.config +0 -1
- package/theme/themes/eea/extras/footer.less +6 -6
- package/theme/themes/eea/extras/footer.variables +3 -3
- package/theme/themes/eea/extras/header.less +2 -1
- package/theme/themes/eea/globals/mixins.less +16 -0
- package/theme/themes/eea/globals/site.variables +2 -1
- package/theme/themes/eea/tokens/colors.less +1 -1
- package/theme/themes/eea/views/card.overrides +42 -0
- package/theme/themes/eea/views/card.variables +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [1.0.0-alpha.12](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.11...1.0.0-alpha.12) - 24 January 2023
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix(mobile menu): sub links when an accordion section is active [David Ichim - [`bb3be81`](https://github.com/eea/volto-eea-design-system/commit/bb3be81416340ad0e3e992cd4e75642fc50f8ad3)]
|
|
12
|
+
|
|
13
|
+
#### :nail_care: Enhancements
|
|
14
|
+
|
|
15
|
+
- change(card): title padding value for a more balance look [David Ichim - [`74b6556`](https://github.com/eea/volto-eea-design-system/commit/74b65563d973eb9c6afc534935e253f2705fe9ee)]
|
|
16
|
+
- change(card): added image card section, tweaked mobile heading size [David Ichim - [`0f879e1`](https://github.com/eea/volto-eea-design-system/commit/0f879e15d22ae066f020d8188ef3e355c27d016c)]
|
|
17
|
+
- change(cards): moved image gradient overlay to a mixin.less file [David Ichim - [`8b4928a`](https://github.com/eea/volto-eea-design-system/commit/8b4928a87bfe5fae6f64c93d7c8f1f7a3045816c)]
|
|
18
|
+
- change(card): removed uppercase transform from title on image [David Ichim - [`2948ae1`](https://github.com/eea/volto-eea-design-system/commit/2948ae16f748911929910ac53d1e0acf96952317)]
|
|
19
|
+
- change(cards): added image for all storybook card examples [David Ichim - [`3f19413`](https://github.com/eea/volto-eea-design-system/commit/3f194130bb6fb7b9ab04a7e1305f26fa135c23d2)]
|
|
20
|
+
- change(card): implement title on image within image section [David Ichim - [`ff6cc60`](https://github.com/eea/volto-eea-design-system/commit/ff6cc600978355e04dde704d014d2cbe27df1298)]
|
|
21
|
+
- change(colors, Docusaurus): Visited link colour change and thematic logo replacement #278 from eea/refactor-visited-link [ichim-david - [`f82d978`](https://github.com/eea/volto-eea-design-system/commit/f82d9781cc3b34443f181565c2ec1892d534f8e2)]
|
|
22
|
+
- change(banner): restored label value of metadata field when type isn't date [David Ichim - [`571a4f2`](https://github.com/eea/volto-eea-design-system/commit/571a4f27fe73d0465b6482f70dd70b2dc47dffe8)]
|
|
23
|
+
- refactor(docusaurus): applied image naming convention [Giorgos Stamatis - [`ee7bc29`](https://github.com/eea/volto-eea-design-system/commit/ee7bc290084e198f9f94e40fbf44c6d9cb19d1ba)]
|
|
24
|
+
- refactor(card): Update titles value and size [Antonis Tarantilis - [`c35ad5c`](https://github.com/eea/volto-eea-design-system/commit/c35ad5c76caa00556f8a501d2e7d516464790dc4)]
|
|
25
|
+
- refactor(storybook): visited link variables [Dora Anastasiou - [`b209b2f`](https://github.com/eea/volto-eea-design-system/commit/b209b2f7703641926c6d4b1f7162eef39b2a1ad8)]
|
|
26
|
+
- refactor(Card): add image with title css [Antonis Tarantilis - [`6e6e63e`](https://github.com/eea/volto-eea-design-system/commit/6e6e63e2362a27b0bbf4b8dd968f11a0dc87da2a)]
|
|
27
|
+
- refactor(Card): create card template for stories [Antonis Tarantilis - [`2fa77f3`](https://github.com/eea/volto-eea-design-system/commit/2fa77f3f93935dd01cd5e3d77437fe8dc03721da)]
|
|
28
|
+
|
|
29
|
+
#### :house: Documentation changes
|
|
30
|
+
|
|
31
|
+
- docs(colors): visited link update [Dora Anastasiou - [`ece77fe`](https://github.com/eea/volto-eea-design-system/commit/ece77fec130de1d9d8014d40e7da975bf57061ee)]
|
|
32
|
+
|
|
33
|
+
#### :hammer_and_wrench: Others
|
|
34
|
+
|
|
35
|
+
- change version to alpha 12 instead of 1 final [David Ichim - [`3225025`](https://github.com/eea/volto-eea-design-system/commit/32250253f5d7fe9f01126136ad86b8a4f2f5c700)]
|
|
36
|
+
- feature(card): new card variation with title on top of image #267 from eea/title-on-image-card [ichim-david - [`2c0ca95`](https://github.com/eea/volto-eea-design-system/commit/2c0ca95700bb162bc1273c83f2fc4f591de8dcf0)]
|
|
37
|
+
- fix typos in footer gradient variables [David Ichim - [`4006640`](https://github.com/eea/volto-eea-design-system/commit/40066405d97af838e986370101371a8162029e02)]
|
|
38
|
+
- Back to dev [Alin Voinea - [`477d997`](https://github.com/eea/volto-eea-design-system/commit/477d997513ef5152ab98e080ad07f927b5869705)]
|
|
7
39
|
### [1.0.0-alpha.11](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.10...1.0.0-alpha.11) - 17 January 2023
|
|
8
40
|
|
|
9
41
|
#### :rocket: New Features
|
package/package.json
CHANGED
package/src/ui/Banner/Banner.jsx
CHANGED
|
@@ -118,7 +118,12 @@ Banner.MetadataField = ({ hidden, type = 'text', label, value, title }) => {
|
|
|
118
118
|
})}
|
|
119
119
|
</span>
|
|
120
120
|
);
|
|
121
|
-
return
|
|
121
|
+
return (
|
|
122
|
+
<span className={`field ${type}`}>
|
|
123
|
+
{label && <>{label}: </>}
|
|
124
|
+
{value}
|
|
125
|
+
</span>
|
|
126
|
+
);
|
|
122
127
|
};
|
|
123
128
|
|
|
124
129
|
export default Banner;
|
|
@@ -17,6 +17,15 @@ export default {
|
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
argTypes: {
|
|
20
|
+
titleOnImage: {
|
|
21
|
+
name: 'Display title on image',
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: 'boolean',
|
|
25
|
+
},
|
|
26
|
+
defaultValue: { summary: false },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
20
29
|
variant: {
|
|
21
30
|
options: ['default', 'primary', 'secondary', 'tertiary'],
|
|
22
31
|
control: { type: 'select' },
|
|
@@ -28,140 +37,120 @@ export default {
|
|
|
28
37
|
defaultValue: { summary: 'default' },
|
|
29
38
|
},
|
|
30
39
|
},
|
|
31
|
-
cards: {
|
|
32
|
-
description: 'cards data',
|
|
33
|
-
table: {
|
|
34
|
-
type: {
|
|
35
|
-
summary: 'object',
|
|
36
|
-
},
|
|
37
|
-
defaultValue: { summary: '' },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
40
|
inverted: {
|
|
41
|
-
description: 'Inverted card',
|
|
42
41
|
table: {
|
|
43
42
|
defaultValue: { summary: 'false' },
|
|
44
43
|
type: { summary: 'boolean' },
|
|
45
44
|
},
|
|
46
45
|
},
|
|
46
|
+
cards: {
|
|
47
|
+
table: {
|
|
48
|
+
type: {
|
|
49
|
+
summary: 'Object',
|
|
50
|
+
},
|
|
51
|
+
defaultValue: { summary: ' "" ' },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
47
54
|
},
|
|
48
55
|
};
|
|
49
56
|
|
|
50
|
-
const
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{args.hasImage && (
|
|
57
|
+
const CardTemplate = ({ variant, inverted, titleOnImage, card }) => (
|
|
58
|
+
<Card
|
|
59
|
+
fluid={card.fluid}
|
|
60
|
+
className={`${variant === 'default' ? '' : variant} ${
|
|
61
|
+
inverted ? 'inverted' : ''
|
|
62
|
+
}`}
|
|
63
|
+
>
|
|
64
|
+
{/* Card Image */}
|
|
65
|
+
{card.hasImage ? (
|
|
66
|
+
titleOnImage ? (
|
|
67
|
+
<CardImage {...card} />
|
|
68
|
+
) : (
|
|
63
69
|
<Image
|
|
64
70
|
as="a"
|
|
65
|
-
href={
|
|
66
|
-
src={
|
|
71
|
+
href={card.href}
|
|
72
|
+
src={card.imgUrl}
|
|
67
73
|
wrapped
|
|
68
74
|
ui={false}
|
|
69
75
|
alt="card image"
|
|
70
76
|
/>
|
|
77
|
+
)
|
|
78
|
+
) : (
|
|
79
|
+
''
|
|
80
|
+
)}
|
|
81
|
+
<Card.Content>
|
|
82
|
+
{/* Type & Date */}
|
|
83
|
+
<Card.Meta>
|
|
84
|
+
{card.meta} <MetaRight {...card} />
|
|
85
|
+
</Card.Meta>
|
|
86
|
+
|
|
87
|
+
{/* Title */}
|
|
88
|
+
{!titleOnImage || !card.hasImage ? (
|
|
89
|
+
<Card.Header>{card.title}</Card.Header>
|
|
90
|
+
) : (
|
|
91
|
+
''
|
|
71
92
|
)}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
|
|
94
|
+
{/* Description */}
|
|
95
|
+
<Card.Description>{card.description}</Card.Description>
|
|
96
|
+
</Card.Content>
|
|
97
|
+
|
|
98
|
+
{/* Additional links */}
|
|
99
|
+
{card.links &&
|
|
100
|
+
card.links.map((item, index) => (
|
|
101
|
+
<Card.Content extra key={index}>
|
|
102
|
+
<a href={card.href}>{item.linkName}</a>
|
|
103
|
+
</Card.Content>
|
|
104
|
+
))}
|
|
105
|
+
</Card>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const CardImage = (card) => (
|
|
109
|
+
<a href={card.href} className={'image'}>
|
|
110
|
+
<Image src={card.imgUrl} ui={false} alt="card image" />
|
|
111
|
+
<div className="gradient">
|
|
112
|
+
<Card.Header>{card.title}</Card.Header>
|
|
113
|
+
</div>
|
|
114
|
+
</a>
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const MetaRight = (args) => (
|
|
118
|
+
<span className="bold text-right">{args.metaRight}</span>
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const Template = (args) => (
|
|
122
|
+
<Container>
|
|
123
|
+
{args.cards.map((card, index) => (
|
|
124
|
+
<CardTemplate
|
|
125
|
+
variant={args.variant}
|
|
126
|
+
titleOnImage={args.titleOnImage}
|
|
127
|
+
inverted={args.inverted}
|
|
128
|
+
card={card}
|
|
129
|
+
key={index}
|
|
130
|
+
/>
|
|
131
|
+
))}
|
|
88
132
|
</Container>
|
|
89
133
|
);
|
|
90
134
|
|
|
91
135
|
export const Default = Template.bind({});
|
|
92
136
|
Default.args = {
|
|
137
|
+
titleOnImage: false,
|
|
93
138
|
variant: 'default',
|
|
94
139
|
inverted: false,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
Default.argTypes = {
|
|
109
|
-
imgUrl:
|
|
110
|
-
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
111
|
-
hasImage: {
|
|
112
|
-
description: 'true if card contains image',
|
|
113
|
-
table: {
|
|
114
|
-
type: {
|
|
115
|
-
summary: 'boolean',
|
|
116
|
-
},
|
|
117
|
-
defaultValue: { summary: true },
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
fluid: {
|
|
121
|
-
description: 'take up the width of its container',
|
|
122
|
-
table: {
|
|
123
|
-
type: {
|
|
124
|
-
summary: 'boolean',
|
|
125
|
-
},
|
|
126
|
-
defaultValue: { summary: false },
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
meta: {
|
|
130
|
-
description: 'Card metadata',
|
|
131
|
-
table: {
|
|
132
|
-
category: 'Card content',
|
|
133
|
-
type: { summary: 'string' },
|
|
134
|
-
defaultValue: { summary: ' "" ' },
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
metaRight: {
|
|
138
|
-
description: 'Card right metadata',
|
|
139
|
-
table: {
|
|
140
|
-
category: 'Card content',
|
|
141
|
-
type: { summary: 'string' },
|
|
142
|
-
defaultValue: { summary: ' "" ' },
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
title: {
|
|
146
|
-
description: 'card header',
|
|
147
|
-
table: {
|
|
148
|
-
category: 'Card content',
|
|
149
|
-
type: { summary: 'string' },
|
|
150
|
-
defaultValue: { summary: ' "" ' },
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
description: {
|
|
154
|
-
description: 'card main content',
|
|
155
|
-
table: {
|
|
156
|
-
category: 'Card content',
|
|
157
|
-
type: { summary: 'string' },
|
|
158
|
-
defaultValue: { summary: ' "" ' },
|
|
140
|
+
cards: [
|
|
141
|
+
{
|
|
142
|
+
title: 'Economy and resources',
|
|
143
|
+
imgUrl:
|
|
144
|
+
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
145
|
+
description:
|
|
146
|
+
'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
|
|
147
|
+
hasImage: true,
|
|
148
|
+
meta: 'Article',
|
|
149
|
+
metaRight: '30/07/2022',
|
|
150
|
+
href: '/#',
|
|
151
|
+
fluid: false,
|
|
159
152
|
},
|
|
160
|
-
|
|
161
|
-
};
|
|
162
|
-
Default.parameters = {
|
|
163
|
-
controls: { exclude: ['cards', 'href', 'links'] },
|
|
164
|
-
hideNoControlsWarning: true,
|
|
153
|
+
],
|
|
165
154
|
};
|
|
166
155
|
|
|
167
156
|
const GridTemplate = (args) => (
|
|
@@ -169,38 +158,13 @@ const GridTemplate = (args) => (
|
|
|
169
158
|
<Grid>
|
|
170
159
|
{args.cards.map((card, index) => (
|
|
171
160
|
<Grid.Column mobile={12} tablet={6} computer={4} key={index}>
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<Image
|
|
180
|
-
as="a"
|
|
181
|
-
href={card.href}
|
|
182
|
-
src={card.imgUrl}
|
|
183
|
-
wrapped
|
|
184
|
-
ui={false}
|
|
185
|
-
alt="card image"
|
|
186
|
-
/>
|
|
187
|
-
)}
|
|
188
|
-
<Card.Content>
|
|
189
|
-
<Card.Meta>
|
|
190
|
-
{card.meta} <MetaRight {...card} />
|
|
191
|
-
</Card.Meta>
|
|
192
|
-
<Card.Header>
|
|
193
|
-
<a href={args.href}>{card.title}</a>
|
|
194
|
-
</Card.Header>
|
|
195
|
-
<Card.Description>{card.description}</Card.Description>
|
|
196
|
-
</Card.Content>
|
|
197
|
-
{card.links !== null &&
|
|
198
|
-
card.links.map((item, index) => (
|
|
199
|
-
<Card.Content extra key={index}>
|
|
200
|
-
<a href="/#">{item.linkName}</a>
|
|
201
|
-
</Card.Content>
|
|
202
|
-
))}
|
|
203
|
-
</Card>
|
|
161
|
+
<CardTemplate
|
|
162
|
+
variant={args.variant}
|
|
163
|
+
titleOnImage={args.titleOnImage}
|
|
164
|
+
inverted={args.inverted}
|
|
165
|
+
card={card}
|
|
166
|
+
key={index}
|
|
167
|
+
/>
|
|
204
168
|
</Grid.Column>
|
|
205
169
|
))}
|
|
206
170
|
</Grid>
|
|
@@ -209,11 +173,12 @@ const GridTemplate = (args) => (
|
|
|
209
173
|
|
|
210
174
|
export const CardGrid = GridTemplate.bind({});
|
|
211
175
|
CardGrid.args = {
|
|
176
|
+
titleOnImage: false,
|
|
212
177
|
variant: 'default',
|
|
213
178
|
inverted: false,
|
|
214
179
|
cards: [
|
|
215
180
|
{
|
|
216
|
-
title: '
|
|
181
|
+
title: 'Nature',
|
|
217
182
|
imgUrl:
|
|
218
183
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
219
184
|
description:
|
|
@@ -222,11 +187,10 @@ CardGrid.args = {
|
|
|
222
187
|
meta: 'Article',
|
|
223
188
|
metaRight: '30/07/2022',
|
|
224
189
|
href: '/#',
|
|
225
|
-
links: null,
|
|
226
190
|
fluid: true,
|
|
227
191
|
},
|
|
228
192
|
{
|
|
229
|
-
title: '
|
|
193
|
+
title: 'Economy and resources',
|
|
230
194
|
imgUrl:
|
|
231
195
|
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
232
196
|
description:
|
|
@@ -235,71 +199,67 @@ CardGrid.args = {
|
|
|
235
199
|
meta: 'Article',
|
|
236
200
|
metaRight: '30/07/2022',
|
|
237
201
|
href: '/#',
|
|
238
|
-
links: null,
|
|
239
202
|
fluid: true,
|
|
240
203
|
},
|
|
241
204
|
{
|
|
242
|
-
title:
|
|
205
|
+
title: "State of Europe's environment",
|
|
206
|
+
imgUrl:
|
|
207
|
+
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
243
208
|
description:
|
|
244
209
|
'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis. Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
|
|
245
|
-
hasImage:
|
|
210
|
+
hasImage: true,
|
|
246
211
|
meta: 'Article',
|
|
247
212
|
metaRight: '30/07/2022',
|
|
248
213
|
href: '/#',
|
|
249
|
-
links: null,
|
|
250
214
|
fluid: true,
|
|
251
215
|
},
|
|
252
216
|
],
|
|
253
217
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
218
|
+
|
|
219
|
+
export const ImageGrid = GridTemplate.bind({});
|
|
220
|
+
ImageGrid.args = {
|
|
221
|
+
titleOnImage: true,
|
|
222
|
+
variant: 'default',
|
|
223
|
+
inverted: false,
|
|
224
|
+
cards: [
|
|
225
|
+
{
|
|
226
|
+
title: 'Nature',
|
|
227
|
+
imgUrl:
|
|
228
|
+
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
229
|
+
hasImage: true,
|
|
230
|
+
href: '/#',
|
|
231
|
+
fluid: true,
|
|
262
232
|
},
|
|
263
|
-
|
|
233
|
+
{
|
|
234
|
+
title: 'Economy and resources',
|
|
235
|
+
imgUrl:
|
|
236
|
+
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
237
|
+
hasImage: true,
|
|
238
|
+
href: '/#',
|
|
239
|
+
fluid: true,
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
title: "State of Europe's environment",
|
|
243
|
+
imgUrl:
|
|
244
|
+
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
245
|
+
hasImage: true,
|
|
246
|
+
href: '/#',
|
|
247
|
+
fluid: true,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
264
250
|
};
|
|
265
251
|
|
|
266
252
|
const FluidGridTemplate = (args) => (
|
|
267
253
|
<Container>
|
|
268
254
|
<div className="fluid-card-row">
|
|
269
255
|
{args.cards.map((card, index) => (
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
256
|
+
<CardTemplate
|
|
257
|
+
variant={args.variant}
|
|
258
|
+
titleOnImage={args.titleOnImage}
|
|
259
|
+
inverted={args.inverted}
|
|
260
|
+
card={card}
|
|
275
261
|
key={index}
|
|
276
|
-
|
|
277
|
-
{card.hasImage && (
|
|
278
|
-
<Image
|
|
279
|
-
as="a"
|
|
280
|
-
href={card.href}
|
|
281
|
-
src={card.imgUrl}
|
|
282
|
-
wrapped
|
|
283
|
-
ui={false}
|
|
284
|
-
alt="card image"
|
|
285
|
-
/>
|
|
286
|
-
)}
|
|
287
|
-
<Card.Content>
|
|
288
|
-
<Card.Meta>
|
|
289
|
-
{card.meta} <MetaRight {...card} />
|
|
290
|
-
</Card.Meta>
|
|
291
|
-
<Card.Header>
|
|
292
|
-
<a href={args.href}>{card.title}</a>
|
|
293
|
-
</Card.Header>
|
|
294
|
-
<Card.Description>{card.description}</Card.Description>
|
|
295
|
-
</Card.Content>
|
|
296
|
-
{card.links !== null &&
|
|
297
|
-
card.links.map((item, index) => (
|
|
298
|
-
<Card.Content extra key={index}>
|
|
299
|
-
<a href="/#">{item.linkName}</a>
|
|
300
|
-
</Card.Content>
|
|
301
|
-
))}
|
|
302
|
-
</Card>
|
|
262
|
+
/>
|
|
303
263
|
))}
|
|
304
264
|
</div>
|
|
305
265
|
</Container>
|
|
@@ -307,11 +267,12 @@ const FluidGridTemplate = (args) => (
|
|
|
307
267
|
|
|
308
268
|
export const FluidGrid = FluidGridTemplate.bind({});
|
|
309
269
|
FluidGrid.args = {
|
|
270
|
+
titleOnImage: false,
|
|
310
271
|
variant: 'default',
|
|
311
272
|
inverted: false,
|
|
312
273
|
cards: [
|
|
313
274
|
{
|
|
314
|
-
title: '
|
|
275
|
+
title: 'Nature',
|
|
315
276
|
imgUrl:
|
|
316
277
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
317
278
|
description:
|
|
@@ -321,10 +282,9 @@ FluidGrid.args = {
|
|
|
321
282
|
metaRight: '30/07/2022',
|
|
322
283
|
href: '/#',
|
|
323
284
|
fluid: true,
|
|
324
|
-
links: null,
|
|
325
285
|
},
|
|
326
286
|
{
|
|
327
|
-
title: '
|
|
287
|
+
title: 'Health',
|
|
328
288
|
imgUrl:
|
|
329
289
|
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
330
290
|
description:
|
|
@@ -334,32 +294,21 @@ FluidGrid.args = {
|
|
|
334
294
|
metaRight: '30/07/2022',
|
|
335
295
|
href: '/#',
|
|
336
296
|
fluid: true,
|
|
337
|
-
links: null,
|
|
338
297
|
},
|
|
339
298
|
{
|
|
340
|
-
title:
|
|
299
|
+
title: "State of Europe's environment",
|
|
300
|
+
imgUrl:
|
|
301
|
+
'https://www.eea.europa.eu/publications/eea-eionet-strategy-2021-2030/image_mini',
|
|
341
302
|
description:
|
|
342
303
|
'Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis. Leo fermentum sollicitudin suspendisse iaculis feugiat. Eget tellus blandit aenean mattis.',
|
|
343
|
-
hasImage:
|
|
304
|
+
hasImage: true,
|
|
344
305
|
meta: 'Article',
|
|
345
306
|
metaRight: '30/07/2022',
|
|
346
307
|
href: '/#',
|
|
347
308
|
fluid: true,
|
|
348
|
-
links: null,
|
|
349
309
|
},
|
|
350
310
|
],
|
|
351
311
|
};
|
|
352
|
-
CardGrid.argTypes = {
|
|
353
|
-
cards: {
|
|
354
|
-
description: 'array with cards data',
|
|
355
|
-
table: {
|
|
356
|
-
type: {
|
|
357
|
-
summary: 'Object',
|
|
358
|
-
},
|
|
359
|
-
defaultValue: { summary: ' "" ' },
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
};
|
|
363
312
|
|
|
364
313
|
const Arrows = (props) => {
|
|
365
314
|
const { slider = {} } = props;
|
|
@@ -394,36 +343,25 @@ const Arrows = (props) => {
|
|
|
394
343
|
);
|
|
395
344
|
};
|
|
396
345
|
|
|
397
|
-
function CarouselCardsContent({
|
|
346
|
+
function CarouselCardsContent({
|
|
347
|
+
titleOnImage,
|
|
348
|
+
variant,
|
|
349
|
+
inverted,
|
|
350
|
+
settings,
|
|
351
|
+
cards,
|
|
352
|
+
}) {
|
|
398
353
|
const slider = React.useRef(null);
|
|
399
354
|
return (
|
|
400
355
|
<div className="cards-carousel">
|
|
401
356
|
<Slider {...settings} ref={slider}>
|
|
402
357
|
{cards.map((card, index) => (
|
|
403
|
-
<
|
|
404
|
-
|
|
358
|
+
<CardTemplate
|
|
359
|
+
variant={variant}
|
|
360
|
+
titleOnImage={titleOnImage}
|
|
361
|
+
inverted={inverted}
|
|
362
|
+
card={card}
|
|
405
363
|
key={index}
|
|
406
|
-
|
|
407
|
-
inverted ? 'inverted' : ''
|
|
408
|
-
}`}
|
|
409
|
-
>
|
|
410
|
-
{card.hasImage && (
|
|
411
|
-
<Image
|
|
412
|
-
as="a"
|
|
413
|
-
href={card.href}
|
|
414
|
-
src={card.imgUrl}
|
|
415
|
-
wrapped
|
|
416
|
-
ui={false}
|
|
417
|
-
alt="card image"
|
|
418
|
-
/>
|
|
419
|
-
)}
|
|
420
|
-
<Card.Content>
|
|
421
|
-
<Card.Meta>{card.meta}</Card.Meta>
|
|
422
|
-
<Card.Header>
|
|
423
|
-
<a href={card.href}>{card.title}</a>
|
|
424
|
-
</Card.Header>
|
|
425
|
-
</Card.Content>
|
|
426
|
-
</Card>
|
|
364
|
+
/>
|
|
427
365
|
))}
|
|
428
366
|
</Slider>
|
|
429
367
|
<Arrows slider={slider} />
|
|
@@ -439,6 +377,7 @@ const CarouselCardsTemplate = (args) => (
|
|
|
439
377
|
|
|
440
378
|
export const CarouselCards = CarouselCardsTemplate.bind({});
|
|
441
379
|
CarouselCards.args = {
|
|
380
|
+
titleOnImage: false,
|
|
442
381
|
variant: 'default',
|
|
443
382
|
inverted: false,
|
|
444
383
|
settings: {
|
|
@@ -468,7 +407,7 @@ CarouselCards.args = {
|
|
|
468
407
|
},
|
|
469
408
|
cards: [
|
|
470
409
|
{
|
|
471
|
-
title:
|
|
410
|
+
title: "State of Europe's environment",
|
|
472
411
|
meta: 'March 20, 2022.',
|
|
473
412
|
imgUrl:
|
|
474
413
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
@@ -477,7 +416,7 @@ CarouselCards.args = {
|
|
|
477
416
|
fluid: true,
|
|
478
417
|
},
|
|
479
418
|
{
|
|
480
|
-
title: '
|
|
419
|
+
title: 'Nature',
|
|
481
420
|
meta: 'March 20, 2022.',
|
|
482
421
|
imgUrl:
|
|
483
422
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
@@ -486,7 +425,7 @@ CarouselCards.args = {
|
|
|
486
425
|
fluid: true,
|
|
487
426
|
},
|
|
488
427
|
{
|
|
489
|
-
title: '
|
|
428
|
+
title: 'Health',
|
|
490
429
|
meta: 'March 20, 2022.',
|
|
491
430
|
imgUrl:
|
|
492
431
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
@@ -495,8 +434,7 @@ CarouselCards.args = {
|
|
|
495
434
|
fluid: true,
|
|
496
435
|
},
|
|
497
436
|
{
|
|
498
|
-
title:
|
|
499
|
-
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean massa strong.',
|
|
437
|
+
title: 'Climate',
|
|
500
438
|
meta: 'March 20, 2022.',
|
|
501
439
|
imgUrl:
|
|
502
440
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
|
@@ -505,7 +443,7 @@ CarouselCards.args = {
|
|
|
505
443
|
fluid: true,
|
|
506
444
|
},
|
|
507
445
|
{
|
|
508
|
-
title: '
|
|
446
|
+
title: 'Economy and resources',
|
|
509
447
|
meta: 'March 20, 2022.',
|
|
510
448
|
imgUrl:
|
|
511
449
|
'https://www.eea.europa.eu/media/pictures/european-environment-agency-building-with/image_large',
|
package/theme/theme.config
CHANGED
|
@@ -11,7 +11,7 @@ footer {
|
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
align-items: center;
|
|
14
|
-
background: @
|
|
14
|
+
background: @mobileFooterBackgroundGradient;
|
|
15
15
|
color: @white;
|
|
16
16
|
|
|
17
17
|
.footer-wrapper {
|
|
@@ -78,7 +78,7 @@ footer .theme-sites {
|
|
|
78
78
|
display: flex;
|
|
79
79
|
justify-content: @mobileSocialJustifyContent;
|
|
80
80
|
margin: @mobileSocialIconsMargin;
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
a {
|
|
83
83
|
color: @socialIconColor;
|
|
84
84
|
|
|
@@ -132,7 +132,7 @@ footer .footer-wrapper .menu {
|
|
|
132
132
|
|
|
133
133
|
@media only screen and (min-width: @tabletBreakpoint) {
|
|
134
134
|
footer {
|
|
135
|
-
background: @
|
|
135
|
+
background: @computerFooterBackgroundGradient;
|
|
136
136
|
}
|
|
137
137
|
footer .theme-sites {
|
|
138
138
|
.header {
|
|
@@ -246,11 +246,11 @@ footer .footer-wrapper .menu {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
.footer .footer-wrapper .menu {
|
|
249
|
-
|
|
249
|
+
|
|
250
250
|
a {
|
|
251
251
|
font-size: @computerMenuFontSize;
|
|
252
252
|
}
|
|
253
|
-
}
|
|
253
|
+
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.loadUIOverrides();
|
|
256
|
+
.loadUIOverrides();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Footer
|
|
3
3
|
*******************************/
|
|
4
4
|
|
|
5
|
-
/* @
|
|
6
|
-
@
|
|
7
|
-
@
|
|
5
|
+
/* @footerBackgroundGradient: linear-gradient(220.4deg, #009591 8.29%, #2E3E4C 56.3%, #212D38 89.06%); */
|
|
6
|
+
@mobileFooterBackgroundGradient: linear-gradient(220.4deg, @green-5 8.29%, @blue-grey-6 56.3%, #212D38 89.06%);
|
|
7
|
+
@computerFooterBackgroundGradient: linear-gradient(212.33deg, @green-5 6.78%, #212D38 69.54%, #212D38 98.23%);
|
|
8
8
|
|
|
9
9
|
/* Titles */
|
|
10
10
|
@footerTitleFontWeight : @font-weight-7;
|
|
@@ -833,7 +833,8 @@
|
|
|
833
833
|
display: none;
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
|
|
836
|
+
// hide content of accordion titles that are not active
|
|
837
|
+
#main #mega-menu .ui.accordion .title:first-child + .content:not(.active) {
|
|
837
838
|
display: none;
|
|
838
839
|
}
|
|
839
840
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Gradient Mixin
|
|
2
|
+
.gradientMix(@type; @colors; @dir: 0deg; @prefixes: webkit, moz, ms, o; @index: length(@prefixes)) when (@index > 0) {
|
|
3
|
+
.gradientMix(@type; @colors; @dir; @prefixes; (@index - 1));
|
|
4
|
+
|
|
5
|
+
@prefix : extract(@prefixes, @index);
|
|
6
|
+
@dir-old : 90 - (@dir);
|
|
7
|
+
|
|
8
|
+
background-image: ~"-@{prefix}-@{type}-gradient(@{dir-old}, @{colors})";
|
|
9
|
+
& when ( @index = length(@prefixes) ) {
|
|
10
|
+
background-image: ~"@{type}-gradient(@{dir}, @{colors})";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.image-overlay-gradient() {
|
|
15
|
+
.gradientMix(linear; rgba(46, 62, 76, 0.65) 38.6%, rgba(46, 62, 76, 0.169) 59.52%, rgba(69, 95, 106, 0) 79.64%; 13.39deg)
|
|
16
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*******************************/
|
|
4
4
|
|
|
5
5
|
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/tokens/tokens';
|
|
6
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/globals/mixins';
|
|
6
7
|
|
|
7
8
|
/*-------------------
|
|
8
9
|
Fonts
|
|
@@ -209,7 +210,7 @@
|
|
|
209
210
|
|
|
210
211
|
@linkColor : @blue-4;
|
|
211
212
|
@linkHoverColor : @blue-5;
|
|
212
|
-
@linkVisitedColor : @purple-
|
|
213
|
+
@linkVisitedColor : @purple-4;
|
|
213
214
|
@linkActiveColor : @blue-6;
|
|
214
215
|
@linkUnderline : none;
|
|
215
216
|
@linkHoverUnderline : @linkUnderline;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
/* Cards must have same height */
|
|
16
16
|
.ui.card {
|
|
17
|
+
min-width: @minWidth;
|
|
17
18
|
height: 100%;
|
|
18
19
|
text-align: var(--text-align, @cardTextAlign);
|
|
19
20
|
background-color: var(--card-background-color, @background);
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
margin-left: @cardMetaDateMarginLeft;
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
.ui.cards > .card:not(.rounded) > .image,
|
|
27
29
|
.ui.card:not(.rounded) > .image {
|
|
28
30
|
overflow: @cardImageOverflow;
|
|
29
31
|
height: @cardImageHeight;
|
|
@@ -249,6 +251,46 @@
|
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
253
|
|
|
254
|
+
/*******************************
|
|
255
|
+
Image with title
|
|
256
|
+
*******************************/
|
|
257
|
+
// Adding the default image css for image inside image-with-title
|
|
258
|
+
.ui.cards > .card > .image {
|
|
259
|
+
position: relative;
|
|
260
|
+
display: block;
|
|
261
|
+
flex: 0 0 auto;
|
|
262
|
+
padding: 0;
|
|
263
|
+
background: transparent;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
.card .gradient {
|
|
268
|
+
display: flex;
|
|
269
|
+
align-items: end;
|
|
270
|
+
position: absolute;
|
|
271
|
+
bottom: 0;
|
|
272
|
+
width: 100%;
|
|
273
|
+
height: 100%;
|
|
274
|
+
padding: @imageTitlePadding;
|
|
275
|
+
.image-overlay-gradient();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.gradient .header {
|
|
279
|
+
font-size: var(--image-header-font-size, @imageTitleMobileFontSize);
|
|
280
|
+
color: @imageTitleColor;
|
|
281
|
+
font-weight: @imageTitleFontWeight;
|
|
282
|
+
line-height: @imageTitleLineHeight;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media only screen and (min-width: @tabletBreakpoint) {
|
|
286
|
+
.card .gradient {
|
|
287
|
+
padding-block: @imageTitlePaddingBlock;
|
|
288
|
+
}
|
|
289
|
+
.gradient .header {
|
|
290
|
+
--image-header-font-size: @imageTitleFontSize;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
252
294
|
/*******************************
|
|
253
295
|
Carousel
|
|
254
296
|
*******************************/
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
@minHeight: 0px;
|
|
23
23
|
@padding: 0em;
|
|
24
24
|
@width: 290px;
|
|
25
|
+
@minWidth: 250px;
|
|
25
26
|
@borderWidth: 1px;
|
|
26
27
|
@borderShadow: 0px 0px 0px @borderWidth @solidBorderColor;
|
|
27
28
|
@boxShadow: @eeaGlobalShadow;
|
|
@@ -262,6 +263,17 @@
|
|
|
262
263
|
@invertedTertiaryCardColor: @tertiaryColor;
|
|
263
264
|
@invertedTertiaryCardBackgroundColor: @white;
|
|
264
265
|
|
|
266
|
+
/*******************************
|
|
267
|
+
Image with title
|
|
268
|
+
*******************************/
|
|
269
|
+
@imageTitleColor: @white;
|
|
270
|
+
@imageTitleFontSize: @h2;
|
|
271
|
+
@imageTitleMobileFontSize: @mobileH1;
|
|
272
|
+
@imageTitleFontWeight: @font-weight-7;
|
|
273
|
+
@imageTitleLineHeight: @font-lineheight-0;
|
|
274
|
+
@imageTitlePadding: @rem-space-6;
|
|
275
|
+
@imageTitlePaddingBlock: @rem-space-4;
|
|
276
|
+
|
|
265
277
|
/*******************************
|
|
266
278
|
Rounded Card
|
|
267
279
|
*******************************/
|