@eeacms/volto-eea-website-theme 1.3.2 → 1.4.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 +16 -8
- package/package.json +2 -2
- package/src/components/manage/Blocks/Title/schema.js +18 -9
- package/src/components/theme/Banner/View.jsx +15 -1
- package/src/components/theme/Logo.jsx +1 -1
- package/src/config.js +2 -2
- package/src/customizations/volto/components/manage/Sidebar/ObjectBrowserNav.jsx +140 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +1 -0
- package/theme/site/imageicons/imageicons.less +5 -0
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,22 @@ 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.4.0](https://github.com/eea/volto-eea-website-theme/compare/1.3.2...1.4.0) - 28 December 2022
|
8
|
+
|
9
|
+
#### :rocket: New Features
|
10
|
+
|
11
|
+
- feat(sidebar): Allow previewing images when selecting them with the file picker - refs #152099 [dobri1408 - [`57949d8`](https://github.com/eea/volto-eea-website-theme/commit/57949d80d6a0b081210ee982af26eeee9865ecbe)]
|
12
|
+
- feat(language): Show/hide language menu based on supportedLanguages - refs #158616 [Alin Voinea - [`31c96c5`](https://github.com/eea/volto-eea-website-theme/commit/31c96c528a5f86c0a106749ec117006121835ec6)]
|
13
|
+
|
14
|
+
#### :nail_care: Enhancements
|
15
|
+
|
16
|
+
- change(logo): reference after latest release of volto-eea-design-system [David Ichim - [`c29781d`](https://github.com/eea/volto-eea-website-theme/commit/c29781db3455e1a42b184ba203131cac2ce8768a)]
|
17
|
+
|
18
|
+
#### :hammer_and_wrench: Others
|
19
|
+
|
20
|
+
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
21
|
+
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
22
|
+
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
7
23
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
8
24
|
|
9
25
|
#### :bug: Bug Fixes
|
@@ -12,7 +28,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
12
28
|
|
13
29
|
#### :hammer_and_wrench: Others
|
14
30
|
|
15
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
|
16
31
|
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
17
32
|
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
18
33
|
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
@@ -21,9 +36,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
21
36
|
|
22
37
|
- feat(Footer): Bring back footer contacts extra actions - refs #151856 [Alin Voinea - [`6c19413`](https://github.com/eea/volto-eea-website-theme/commit/6c194139420c9fd847692d180db1c1593e2483de)]
|
23
38
|
|
24
|
-
#### :hammer_and_wrench: Others
|
25
|
-
|
26
|
-
- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
|
27
39
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
28
40
|
|
29
41
|
#### :rocket: New Features
|
@@ -64,7 +76,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
64
76
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
65
77
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
66
78
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
67
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
68
79
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
69
80
|
|
70
81
|
#### :nail_care: Enhancements
|
@@ -112,7 +123,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
112
123
|
|
113
124
|
#### :hammer_and_wrench: Others
|
114
125
|
|
115
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
116
126
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
117
127
|
|
118
128
|
#### :hammer_and_wrench: Others
|
@@ -380,7 +390,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
380
390
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
381
391
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
382
392
|
- feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
|
383
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
384
393
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
385
394
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
386
395
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
@@ -422,5 +431,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
422
431
|
|
423
432
|
#### :hammer_and_wrench: Others
|
424
433
|
|
425
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
426
434
|
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eeacms/volto-eea-website-theme",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.0",
|
4
4
|
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"url": "git@github.com:eea/volto-eea-website-theme.git"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@eeacms/volto-eea-design-system": "
|
25
|
+
"@eeacms/volto-eea-design-system": "^1.0.0-alpha.8",
|
26
26
|
"volto-subsites": "*"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
@@ -35,11 +35,11 @@ export default {
|
|
35
35
|
title: 'Actions',
|
36
36
|
fields: ['hideShareButton', 'hideDownloadButton'],
|
37
37
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
{
|
39
|
+
id: 'copyright',
|
40
|
+
title: 'Copyright',
|
41
|
+
fields: ['copyright', 'copyrightIcon', 'copyrightPosition'],
|
42
|
+
},
|
43
43
|
],
|
44
44
|
properties: {
|
45
45
|
hideContentType: {
|
@@ -71,10 +71,19 @@ export default {
|
|
71
71
|
widget: 'object_list',
|
72
72
|
schema: infoSchema,
|
73
73
|
},
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
copyright: {
|
75
|
+
title: 'Text',
|
76
|
+
},
|
77
|
+
copyrightIcon: {
|
78
|
+
title: 'Icon',
|
79
|
+
default: 'ri-copyright-line',
|
80
|
+
},
|
81
|
+
copyrightPosition: {
|
82
|
+
title: 'Align',
|
83
|
+
widget: 'align',
|
84
|
+
actions: ['left', 'right'],
|
85
|
+
defaultValue: 'left',
|
86
|
+
},
|
78
87
|
},
|
79
88
|
required: [],
|
80
89
|
};
|
@@ -5,10 +5,11 @@ import { withRouter } from 'react-router';
|
|
5
5
|
import { defineMessages, injectIntl } from 'react-intl';
|
6
6
|
import { startCase } from 'lodash';
|
7
7
|
import qs from 'querystring';
|
8
|
-
import { Container, Popup } from 'semantic-ui-react';
|
8
|
+
import { Container, Popup, Icon } from 'semantic-ui-react';
|
9
9
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
10
10
|
import Banner from './Banner';
|
11
11
|
import { getImageSource, sharePage } from './Banner';
|
12
|
+
import Copyright from '@eeacms/volto-eea-design-system/ui/Copyright/Copyright';
|
12
13
|
|
13
14
|
import './styles.less';
|
14
15
|
|
@@ -83,6 +84,9 @@ const View = (props) => {
|
|
83
84
|
hideModificationDate,
|
84
85
|
hideShareButton,
|
85
86
|
hideDownloadButton,
|
87
|
+
copyright,
|
88
|
+
copyrightIcon,
|
89
|
+
copyrightPosition,
|
86
90
|
// contentType,
|
87
91
|
} = props.data;
|
88
92
|
// Set query parameters
|
@@ -222,6 +226,16 @@ const View = (props) => {
|
|
222
226
|
/>
|
223
227
|
))}
|
224
228
|
</Banner.Metadata>
|
229
|
+
{copyright ? (
|
230
|
+
<Copyright copyrightPosition={copyrightPosition}>
|
231
|
+
<Copyright.Icon>
|
232
|
+
<Icon className={copyrightIcon} />
|
233
|
+
</Copyright.Icon>
|
234
|
+
<Copyright.Text>{copyright}</Copyright.Text>
|
235
|
+
</Copyright>
|
236
|
+
) : (
|
237
|
+
''
|
238
|
+
)}
|
225
239
|
</Banner.Content>
|
226
240
|
</ContainerWrapper>
|
227
241
|
</div>
|
@@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
|
3
3
|
import config from '@plone/volto/registry';
|
4
4
|
|
5
5
|
import { Logo } from '@eeacms/volto-eea-design-system/ui';
|
6
|
-
import LogoImage from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/
|
6
|
+
import LogoImage from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo.svg';
|
7
7
|
|
8
8
|
const messages = defineMessages({
|
9
9
|
site: {
|
package/src/config.js
CHANGED
@@ -8,8 +8,8 @@ import copernicusLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/
|
|
8
8
|
import industryLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/industry.svg';
|
9
9
|
import marineLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/marine.svg';
|
10
10
|
import eionetLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eionet.svg';
|
11
|
-
import eeaLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/
|
12
|
-
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-white.svg';
|
11
|
+
import eeaLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo.svg';
|
12
|
+
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo-white.svg';
|
13
13
|
import climateLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/climate-health.svg';
|
14
14
|
|
15
15
|
// TODO: to be consolidated with headerLinks
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Button, Segment, Popup } from 'semantic-ui-react';
|
3
|
+
import { useIntl, defineMessages } from 'react-intl';
|
4
|
+
import cx from 'classnames';
|
5
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
6
|
+
import { flattenToAppURL, getContentIcon } from '@plone/volto/helpers';
|
7
|
+
import { Image } from 'semantic-ui-react';
|
8
|
+
import config from '@plone/volto/registry';
|
9
|
+
import '../../../../../../theme/site/imageicons/imageicons.less';
|
10
|
+
|
11
|
+
import rightArrowSVG from '@plone/volto/icons/right-key.svg';
|
12
|
+
import homeSVG from '@plone/volto/icons/home.svg';
|
13
|
+
|
14
|
+
const messages = defineMessages({
|
15
|
+
browse: {
|
16
|
+
id: 'Browse',
|
17
|
+
defaultMessage: 'Browse',
|
18
|
+
},
|
19
|
+
select: {
|
20
|
+
id: 'Select',
|
21
|
+
defaultMessage: 'Select',
|
22
|
+
},
|
23
|
+
});
|
24
|
+
|
25
|
+
const ObjectBrowserNav = ({
|
26
|
+
currentSearchResults,
|
27
|
+
selected,
|
28
|
+
handleClickOnItem,
|
29
|
+
handleDoubleClickOnItem,
|
30
|
+
mode,
|
31
|
+
navigateTo,
|
32
|
+
isSelectable,
|
33
|
+
}) => {
|
34
|
+
const intl = useIntl();
|
35
|
+
const isSelected = (item) => {
|
36
|
+
let ret = false;
|
37
|
+
if (selected) {
|
38
|
+
selected
|
39
|
+
.filter((item) => item != null)
|
40
|
+
.forEach((_item) => {
|
41
|
+
if (flattenToAppURL(_item['@id']) === flattenToAppURL(item['@id'])) {
|
42
|
+
ret = true;
|
43
|
+
}
|
44
|
+
});
|
45
|
+
}
|
46
|
+
return ret;
|
47
|
+
};
|
48
|
+
|
49
|
+
return (
|
50
|
+
<Segment as="ul" className="object-listing">
|
51
|
+
{currentSearchResults &&
|
52
|
+
currentSearchResults.items.map((item) => (
|
53
|
+
<li
|
54
|
+
role="presentation"
|
55
|
+
aria-label={
|
56
|
+
item.is_folderish && mode === 'image'
|
57
|
+
? `${intl.formatMessage(messages.browse)} ${item.title}`
|
58
|
+
: `${intl.formatMessage(messages.select)} ${item.title}`
|
59
|
+
}
|
60
|
+
key={item['@id']}
|
61
|
+
className={cx('', {
|
62
|
+
'selected-item': isSelected(item),
|
63
|
+
|
64
|
+
disabled:
|
65
|
+
mode === 'image'
|
66
|
+
? !config.settings.imageObjects.includes(item['@type']) &&
|
67
|
+
!item.is_folderish
|
68
|
+
: !isSelectable(item),
|
69
|
+
})}
|
70
|
+
onClick={() => handleClickOnItem(item)}
|
71
|
+
onDoubleClick={() => handleDoubleClickOnItem(item)}
|
72
|
+
>
|
73
|
+
<span title={`${item['@id']} (${item['@type']})`}>
|
74
|
+
<Popup
|
75
|
+
key={item['@id']}
|
76
|
+
content={
|
77
|
+
<>
|
78
|
+
<Icon name={homeSVG} size="18px" />{' '}
|
79
|
+
{flattenToAppURL(item['@id'])} ( {item['@type']})
|
80
|
+
</>
|
81
|
+
}
|
82
|
+
trigger={
|
83
|
+
<span>
|
84
|
+
{item['@type'] === 'Image' ? (
|
85
|
+
<Image
|
86
|
+
src={`${item?.getURL}/@@images/image`}
|
87
|
+
className="sidebar-image-icon"
|
88
|
+
/>
|
89
|
+
) : (
|
90
|
+
<Icon
|
91
|
+
name={getContentIcon(item['@type'], item.is_folderish)}
|
92
|
+
size="24px"
|
93
|
+
/>
|
94
|
+
)}
|
95
|
+
</span>
|
96
|
+
}
|
97
|
+
/>
|
98
|
+
|
99
|
+
{item.title}
|
100
|
+
</span>
|
101
|
+
{item.is_folderish && mode === 'image' && (
|
102
|
+
<Icon
|
103
|
+
className="right-arrow-icon"
|
104
|
+
name={rightArrowSVG}
|
105
|
+
size="24px"
|
106
|
+
/>
|
107
|
+
)}
|
108
|
+
{item.is_folderish && (mode === 'link' || mode === 'multiple') && (
|
109
|
+
<div
|
110
|
+
role="presentation"
|
111
|
+
className="right-arrow-link-mode"
|
112
|
+
onClick={(e) => {
|
113
|
+
e.stopPropagation();
|
114
|
+
navigateTo(item['@id']);
|
115
|
+
}}
|
116
|
+
>
|
117
|
+
<Button.Group>
|
118
|
+
<Button
|
119
|
+
basic
|
120
|
+
icon
|
121
|
+
aria-label={`${intl.formatMessage(messages.browse)} ${
|
122
|
+
item.title
|
123
|
+
}`}
|
124
|
+
>
|
125
|
+
<Icon
|
126
|
+
className="right-arrow-icon"
|
127
|
+
name={rightArrowSVG}
|
128
|
+
size="24px"
|
129
|
+
/>
|
130
|
+
</Button>
|
131
|
+
</Button.Group>
|
132
|
+
</div>
|
133
|
+
)}
|
134
|
+
</li>
|
135
|
+
))}
|
136
|
+
</Segment>
|
137
|
+
);
|
138
|
+
};
|
139
|
+
|
140
|
+
export default ObjectBrowserNav;
|
@@ -153,6 +153,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
|
|
153
153
|
<Header.TopDropdownMenu
|
154
154
|
id="language-switcher"
|
155
155
|
className="item"
|
156
|
+
hasLanguageDropdown={config.settings.supportedLanguages.length > 1}
|
156
157
|
text={`${language.toUpperCase()}`}
|
157
158
|
mobileText={`${language.toUpperCase()}`}
|
158
159
|
icon={
|