@eeacms/volto-eea-website-theme 1.2.0 → 1.3.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/CHANGELOG.md
CHANGED
@@ -4,12 +4,24 @@ 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.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
8
|
+
|
9
|
+
#### :rocket: New Features
|
10
|
+
|
11
|
+
- feat(footer): Get footer, copyright, social and contact actions from backend - refs #151856 [Alin Voinea - [`2560a5f`](https://github.com/eea/volto-eea-website-theme/commit/2560a5f57262999b1aa0bd3fa949cc33dd85bd31)]
|
12
|
+
|
13
|
+
#### :bug: Bug Fixes
|
14
|
+
|
15
|
+
- fix(header): removed capitalization of Know from header dropdown section [David Ichim - [`14b45a3`](https://github.com/eea/volto-eea-website-theme/commit/14b45a391abf039357f8f19e64b9b04402e8ba4c)]
|
16
|
+
|
17
|
+
#### :hammer_and_wrench: Others
|
18
|
+
|
19
|
+
- Release 1.3.0 [Alin Voinea - [`082f468`](https://github.com/eea/volto-eea-website-theme/commit/082f468fd56a37063b7d80fcfc6f5f599b74e7c4)]
|
7
20
|
### [1.2.0](https://github.com/eea/volto-eea-website-theme/compare/1.1.0...1.2.0) - 16 November 2022
|
8
21
|
|
9
22
|
#### :rocket: New Features
|
10
23
|
|
11
24
|
- feat(dependencies): volto-subsites [Alin Voinea - [`7e196b3`](https://github.com/eea/volto-eea-website-theme/commit/7e196b3ba0ffdae32d15fc1a9a020a7f760461ac)]
|
12
|
-
- feat(header): customization of logo + check if multilingual [Miu Razvan - [`cc5bb39`](https://github.com/eea/volto-eea-website-theme/commit/cc5bb3927b79b87f269c8a2a77b1913785892658)]
|
13
25
|
|
14
26
|
#### :bug: Bug Fixes
|
15
27
|
|
package/package.json
CHANGED
@@ -4,20 +4,75 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
import React from 'react';
|
7
|
+
import { useSelector, shallowEqual } from 'react-redux';
|
8
|
+
import { flattenToAppURL } from '@plone/volto/helpers';
|
7
9
|
import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
|
8
10
|
import config from '@plone/volto/registry';
|
9
11
|
|
10
|
-
const Footer = (
|
12
|
+
const Footer = () => {
|
11
13
|
const { eea } = config.settings;
|
14
|
+
const {
|
15
|
+
footerActions = [],
|
16
|
+
copyrightActions = [],
|
17
|
+
socialActions = [],
|
18
|
+
contactActions = [],
|
19
|
+
} = useSelector(
|
20
|
+
(state) => ({
|
21
|
+
footerActions: state.actions?.actions?.footer_actions,
|
22
|
+
copyrightActions: state.actions?.actions?.copyright_actions,
|
23
|
+
socialActions: state.actions?.actions?.social_actions,
|
24
|
+
contactActions: state.actions?.actions?.contact_actions,
|
25
|
+
}),
|
26
|
+
shallowEqual,
|
27
|
+
);
|
28
|
+
// ZMI > portal_actions > footer_actions
|
29
|
+
const actions = footerActions.length
|
30
|
+
? footerActions.map((action) => ({
|
31
|
+
title: action.title,
|
32
|
+
link: flattenToAppURL(action.url),
|
33
|
+
}))
|
34
|
+
: eea.footerOpts.actions;
|
35
|
+
|
36
|
+
// ZMI > portal_actions > copyright_actions
|
37
|
+
const copyright = copyrightActions.length
|
38
|
+
? copyrightActions.map((action) => ({
|
39
|
+
title: action.title,
|
40
|
+
site: action.title,
|
41
|
+
link: flattenToAppURL(action.url),
|
42
|
+
}))
|
43
|
+
: eea.footerOpts.copyright;
|
44
|
+
|
45
|
+
// ZMI > portal_actions > social_actions
|
46
|
+
const social = socialActions.length
|
47
|
+
? socialActions.map((action) => ({
|
48
|
+
name: action.id,
|
49
|
+
icon: action.icon,
|
50
|
+
link: action.url,
|
51
|
+
}))
|
52
|
+
: eea.footerOpts.social;
|
53
|
+
|
54
|
+
// ZMI > portal_actions > contact_actions
|
55
|
+
const contacts = contactActions.length
|
56
|
+
? contactActions.map((action) => ({
|
57
|
+
text: action.title,
|
58
|
+
icon: action.icon,
|
59
|
+
link: flattenToAppURL(action.url),
|
60
|
+
}))
|
61
|
+
: eea.footerOpts.contacts;
|
62
|
+
|
63
|
+
// Update options with actions from backend
|
64
|
+
const options = {
|
65
|
+
...eea.footerOpts,
|
66
|
+
social,
|
67
|
+
contacts,
|
68
|
+
};
|
69
|
+
|
12
70
|
return (
|
13
71
|
<EEAFooter>
|
14
|
-
<EEAFooter.SubFooter {...
|
72
|
+
<EEAFooter.SubFooter {...options} />
|
15
73
|
<EEAFooter.Header>{eea.footerOpts.header}</EEAFooter.Header>
|
16
74
|
<EEAFooter.Sites sites={eea.footerOpts.sites} />
|
17
|
-
<EEAFooter.Actions
|
18
|
-
actions={eea.footerOpts.actions}
|
19
|
-
copyright={eea.footerOpts.copyright}
|
20
|
-
/>
|
75
|
+
<EEAFooter.Actions actions={actions} copyright={copyright} />
|
21
76
|
</EEAFooter>
|
22
77
|
);
|
23
78
|
};
|
@@ -92,7 +92,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
|
|
92
92
|
<Header.TopItem className="official-union">
|
93
93
|
<Image src={eeaFlag} alt="eea flag"></Image>
|
94
94
|
<Header.TopDropdownMenu
|
95
|
-
text="An official website of the European Union | How do you
|
95
|
+
text="An official website of the European Union | How do you know?"
|
96
96
|
tabletText="EEA information systems"
|
97
97
|
mobileText=" "
|
98
98
|
icon="chevron down"
|