@eeacms/volto-eea-website-theme 1.3.1 → 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 +26 -7
- package/package.json +2 -2
- package/razzle.extend.js +16 -10
- 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,15 +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.
|
7
|
+
### [1.4.0](https://github.com/eea/volto-eea-website-theme/compare/1.3.2...1.4.0) - 28 December 2022
|
8
8
|
|
9
9
|
#### :rocket: New Features
|
10
10
|
|
11
|
-
- feat(
|
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)]
|
12
17
|
|
13
18
|
#### :hammer_and_wrench: Others
|
14
19
|
|
15
|
-
-
|
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)]
|
23
|
+
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
24
|
+
|
25
|
+
#### :bug: Bug Fixes
|
26
|
+
|
27
|
+
- fix(package): Proper paths if the package is not installed, but in development #71 from eea/better_razzle [ichim-david - [`024c47a`](https://github.com/eea/volto-eea-website-theme/commit/024c47a41d288f9a90a3b6abcba4db596962425f)]
|
28
|
+
|
29
|
+
#### :hammer_and_wrench: Others
|
30
|
+
|
31
|
+
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
32
|
+
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
33
|
+
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
34
|
+
|
35
|
+
#### :rocket: New Features
|
36
|
+
|
37
|
+
- feat(Footer): Bring back footer contacts extra actions - refs #151856 [Alin Voinea - [`6c19413`](https://github.com/eea/volto-eea-website-theme/commit/6c194139420c9fd847692d180db1c1593e2483de)]
|
38
|
+
|
16
39
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
17
40
|
|
18
41
|
#### :rocket: New Features
|
@@ -53,7 +76,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
53
76
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
54
77
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
55
78
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
56
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
57
79
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
58
80
|
|
59
81
|
#### :nail_care: Enhancements
|
@@ -101,7 +123,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
101
123
|
|
102
124
|
#### :hammer_and_wrench: Others
|
103
125
|
|
104
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
105
126
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
106
127
|
|
107
128
|
#### :hammer_and_wrench: Others
|
@@ -369,7 +390,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
369
390
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
370
391
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
371
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)]
|
372
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
373
393
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
374
394
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
375
395
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
@@ -411,5 +431,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
411
431
|
|
412
432
|
#### :hammer_and_wrench: Others
|
413
433
|
|
414
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
415
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": {
|
package/razzle.extend.js
CHANGED
@@ -4,18 +4,24 @@ const plugins = (defaultPlugins) => {
|
|
4
4
|
};
|
5
5
|
const modify = (config, { target, dev }, webpack) => {
|
6
6
|
const themeConfigPath = `${__dirname}/theme/theme.config`;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme`;
|
7
|
+
const { alias } = config.resolve;
|
8
|
+
alias['../../theme.config$'] = themeConfigPath;
|
9
|
+
alias['../../theme.config'] = themeConfigPath;
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
const designSystem = '@eeacms/volto-eea-design-system';
|
12
|
+
const designSystemPath =
|
13
|
+
config.resolve.alias[designSystem] ||
|
14
|
+
path.dirname(require.resolve(designSystem));
|
15
15
|
|
16
|
-
const
|
17
|
-
|
18
|
-
|
16
|
+
const themeLessPath = path.resolve(`${designSystemPath}/../theme`);
|
17
|
+
|
18
|
+
alias['eea-design-system-theme'] = `${themeLessPath}/themes/eea`;
|
19
|
+
|
20
|
+
const semanticLessPath = path.dirname(
|
21
|
+
require.resolve('semantic-ui-less/package.json'),
|
22
|
+
);
|
23
|
+
|
24
|
+
alias['eea-volto-theme-folder'] = alias['eea-volto-themes']
|
19
25
|
? themeLessPath
|
20
26
|
: semanticLessPath;
|
21
27
|
|
@@ -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={
|