@eeacms/volto-eea-design-system 1.0.0-beta.6 → 1.0.1

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 CHANGED
@@ -4,6 +4,21 @@ 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.1](https://github.com/eea/volto-eea-design-system/compare/1.0.0...1.0.1) - 12 March 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Release 1.0.1 [Alin Voinea - [`e94f59c`](https://github.com/eea/volto-eea-design-system/commit/e94f59c84f573bb5fee7d4e6741b5ff4b3db86b0)]
12
+ ### [1.0.0](https://github.com/eea/volto-eea-design-system/compare/1.0.0-beta.6...1.0.0) - 13 March 2023
13
+
14
+ #### :bug: Bug Fixes
15
+
16
+ - fix(Footer): Open internal links within the same page [Alin Voinea - [`5b3e409`](https://github.com/eea/volto-eea-design-system/commit/5b3e409c71281800bb0fd137a1bac256efaca2b5)]
17
+
18
+ #### :nail_care: Enhancements
19
+
20
+ - change(banner): use huge scale instead of full image for better performance [David Ichim - [`381c58e`](https://github.com/eea/volto-eea-design-system/commit/381c58e3521436f562d9e1727428a18435e2c0f3)]
21
+
7
22
  ### [1.0.0-beta.6](https://github.com/eea/volto-eea-design-system/compare/1.0.0-beta.5...1.0.0-beta.6) - 10 March 2023
8
23
 
9
24
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.1",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -26,9 +26,7 @@ const socialPlatforms = {
26
26
  };
27
27
 
28
28
  export const getImageSource = (image) => {
29
- if (image?.download) return image.download;
30
- if (image?.encoding)
31
- return `data:${image['content-type']};${image['encoding']},${image['data']}`;
29
+ if (image?.scales?.huge) return image.scales.huge.download;
32
30
  return null;
33
31
  };
34
32
 
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
+ import { Link } from 'react-router-dom';
2
3
  import { Grid } from 'semantic-ui-react';
4
+ import { isInternalURL } from '@plone/volto/helpers';
3
5
 
4
6
  const FooterActions = (props) => {
5
7
  if (props.children) {
@@ -12,24 +14,34 @@ const FooterActions = (props) => {
12
14
  <Grid.Column mobile={12} tablet={6} computer={6}>
13
15
  <div className="actions">
14
16
  {props.actions &&
15
- props.actions.map((action, index) => (
16
- <a
17
- href={action.link}
18
- key={index}
19
- target={'_blank'}
20
- rel={'noreferrer'}
21
- >
22
- {action.title}
23
- </a>
24
- ))}
17
+ props.actions.map((action, index) =>
18
+ isInternalURL(action.link) ? (
19
+ <Link to={action.link} key={index}>
20
+ {action.title}
21
+ </Link>
22
+ ) : (
23
+ <a
24
+ href={action.link}
25
+ key={index}
26
+ target={'_blank'}
27
+ rel={'noreferrer'}
28
+ >
29
+ {action.title}
30
+ </a>
31
+ ),
32
+ )}
25
33
  </div>
26
34
  </Grid.Column>
27
35
 
28
36
  <Grid.Column mobile={12} tablet={6} computer={6}>
29
37
  <div className="copyright">
30
38
  {props.copyright &&
31
- props.copyright.map((copyright, index) => (
32
- <React.Fragment key={index}>
39
+ props.copyright.map((copyright, index) =>
40
+ isInternalURL(copyright.link) ? (
41
+ <Link to={copyright.link} key={index}>
42
+ {copyright.title}
43
+ </Link>
44
+ ) : (
33
45
  <a
34
46
  href={copyright.link}
35
47
  key={index}
@@ -38,8 +50,8 @@ const FooterActions = (props) => {
38
50
  >
39
51
  {copyright.title}
40
52
  </a>
41
- </React.Fragment>
42
- ))}
53
+ ),
54
+ )}
43
55
  </div>
44
56
  </Grid.Column>
45
57
  </Grid>