@eeacms/volto-bise-policy 1.2.11 → 1.2.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 +22 -9
- package/jest-addon.config.js +3 -0
- package/package.json +4 -2
- package/src/components/manage/Blocks/BodyClass/index.js +3 -1
- package/src/components/manage/Blocks/BodyClass/schema.js +3 -1
- package/src/components/manage/Blocks/FactsheetsListing/index.js +3 -1
- package/src/components/manage/Blocks/KeyFacts/index.js +3 -1
- package/src/components/manage/Blocks/MaesViewer/index.js +3 -1
- package/src/components/manage/Blocks/Navigation/View.jsx +1 -1
- package/src/components/manage/Blocks/Navigation/index.js +3 -1
- package/src/components/manage/Blocks/Navigation/schema.js +3 -1
- package/src/components/manage/Blocks/Redirect/index.js +3 -1
- package/src/components/manage/Blocks/Redirect/schema.js +3 -1
- package/src/components/manage/Blocks/index.js +3 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/Edit.jsx +3 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/View.jsx +3 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/index.js +3 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/templates/colored/style.less +1 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/templates/smart/schema.js +3 -1
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/templates/smart/style.less +1 -1
- package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/SubsiteClass.jsx +4 -3
- package/src/customizations/volto/components/theme/Header/Header.jsx +17 -1
- package/src/index.js +8 -4
- package/src/styles-config.js +3 -1
- package/theme/extras/header.overrides +19 -37
- package/theme/globals/natura2000.less +36 -35
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ 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.2.12](https://github.com/eea/volto-bise-policy/compare/1.2.11...1.2.12) - 6 November 2024
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: upgrade @eeacms/volto-eea-website-theme to latest version [ana-oprea - [`5424822`](https://github.com/eea/volto-bise-policy/commit/5424822ba47527a071cbeb0a09c7540fc83322f7)]
|
|
12
|
+
- fix: pin @eeacms/volto-eea-website-theme to 2.0.0 [ana-oprea - [`09240cb`](https://github.com/eea/volto-bise-policy/commit/09240cbee32d2dbccd07a900e1738571e5154da9)]
|
|
13
|
+
|
|
14
|
+
#### :house: Internal changes
|
|
15
|
+
|
|
16
|
+
- style: Automated code fix [eea-jenkins - [`7eabaae`](https://github.com/eea/volto-bise-policy/commit/7eabaae5dd179d0c076f36fe2d5af0dc652ee16b)]
|
|
17
|
+
- style: make header bigger on natura2000 specific pages, resize logo based on menu items container size [ana-oprea - [`879794b`](https://github.com/eea/volto-bise-policy/commit/879794beb5e16396fef776f3ecf00793866ae6eb)]
|
|
18
|
+
- style: fix eslint errors [ana-oprea - [`f8f62a4`](https://github.com/eea/volto-bise-policy/commit/f8f62a45f5b66411334757789f269ede54dcf373)]
|
|
19
|
+
- style: Automated code fix [eea-jenkins - [`e577abb`](https://github.com/eea/volto-bise-policy/commit/e577abbda7c3154dd5b9f3f15ed253a78f6c0b12)]
|
|
20
|
+
|
|
21
|
+
#### :hammer_and_wrench: Others
|
|
22
|
+
|
|
23
|
+
- update [Miu Razvan - [`48277be`](https://github.com/eea/volto-bise-policy/commit/48277bed1c4dc9ed7c24c3deddce76a0bb5b2d97)]
|
|
24
|
+
- lint fix [Miu Razvan - [`a60d19d`](https://github.com/eea/volto-bise-policy/commit/a60d19d8c999e99a212bab03ef5b8118ab5c3690)]
|
|
25
|
+
- merge develop into header-style [Miu Razvan - [`2ebf224`](https://github.com/eea/volto-bise-policy/commit/2ebf224cd30787516653244350e03dbf8624070a)]
|
|
26
|
+
- update n2k style [Miu Razvan - [`1751cd2`](https://github.com/eea/volto-bise-policy/commit/1751cd227c849601d6d7b7fc071ffb977dff59c8)]
|
|
27
|
+
- test: Update to volto 17 PR30 [valentinab25 - [`3ae5e75`](https://github.com/eea/volto-bise-policy/commit/3ae5e752557618a5acd617a7ce3f5bff5df65ec1)]
|
|
28
|
+
- test: Update to volto 17 PR30 [valentinab25 - [`4cd82f2`](https://github.com/eea/volto-bise-policy/commit/4cd82f24a4bfec508a1a4de9035ffe4c75bda0ad)]
|
|
7
29
|
### [1.2.11](https://github.com/eea/volto-bise-policy/compare/1.2.10...1.2.11) - 28 May 2024
|
|
8
30
|
|
|
9
31
|
#### :bug: Bug Fixes
|
|
@@ -33,7 +55,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
33
55
|
- chore: customize root theme to use volto-spotlight - refs #259794 [ana-oprea - [`347f96e`](https://github.com/eea/volto-bise-policy/commit/347f96e335139f9656abd34c308c531b05de85e7)]
|
|
34
56
|
- chore: change the theme and alias to volto-spotlight and add volto-spotlight to package.json - refs #259794 [ana-oprea - [`52732a1`](https://github.com/eea/volto-bise-policy/commit/52732a17b3247a04ffae0a3f5118e173afa98157)]
|
|
35
57
|
- chore: change theme to eea-volto-theme, change config.alias - refs #259794 [ana-oprea - [`c2d08ea`](https://github.com/eea/volto-bise-policy/commit/c2d08ea08a7f0e5f6f7d32149e60ea3f3e901923)]
|
|
36
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`a3c9488`](https://github.com/eea/volto-bise-policy/commit/a3c9488c5d09ba97fe5976675524d436080a2460)]
|
|
37
58
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`fddc30f`](https://github.com/eea/volto-bise-policy/commit/fddc30f11a1d8ec290edaca2d924282f5e113bc6)]
|
|
38
59
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`005ce74`](https://github.com/eea/volto-bise-policy/commit/005ce742dbd014fde27e417059251233365766dd)]
|
|
39
60
|
|
|
@@ -46,17 +67,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
46
67
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c1277ba`](https://github.com/eea/volto-bise-policy/commit/c1277bacf840ee9feccbfd6a2c85f0b25a9a9125)]
|
|
47
68
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c944153`](https://github.com/eea/volto-bise-policy/commit/c944153710fd53c5d48863cf363464273e25f52e)]
|
|
48
69
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`d648d52`](https://github.com/eea/volto-bise-policy/commit/d648d525a2fc5076577fe0f75ff9782bf0d1d4e9)]
|
|
49
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`2a7affe`](https://github.com/eea/volto-bise-policy/commit/2a7affe33d737704bdba117c4a5c8c6748ef7a47)]
|
|
50
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`5929642`](https://github.com/eea/volto-bise-policy/commit/59296420105d0e8c1f1547aa0cd17a019e478c2b)]
|
|
51
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`b1142f1`](https://github.com/eea/volto-bise-policy/commit/b1142f1da3667a9f56720f65bebce897a5dd8005)]
|
|
52
70
|
- test: cypress should not wait for navigation, actions, types - refs #259794 [ana-oprea - [`188637c`](https://github.com/eea/volto-bise-policy/commit/188637c78a0cae71b5ee48022507d559dfaceb3e)]
|
|
53
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`fa4e473`](https://github.com/eea/volto-bise-policy/commit/fa4e473018386ec3f09d7300d655c8cccdc19a0e)]
|
|
54
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`1d9135b`](https://github.com/eea/volto-bise-policy/commit/1d9135bb878b3c7a1b828085b99b9d27d78ce60e)]
|
|
55
71
|
- remove cypress tests as it doesn t work on bise [Dobricean Ioan Dorian - [`ba7e2de`](https://github.com/eea/volto-bise-policy/commit/ba7e2defea2dcfd01537c3abb41fa9515ff0a3e3)]
|
|
56
72
|
- add mega menu layout settings as #259794 said [dobri1408 - [`b9a3683`](https://github.com/eea/volto-bise-policy/commit/b9a3683e7d85f8c88ad8feac975c47c434f62c4a)]
|
|
57
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9181908`](https://github.com/eea/volto-bise-policy/commit/9181908c7f4b51bdf83a34f8c7f25827de9b1cc6)]
|
|
58
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`099d796`](https://github.com/eea/volto-bise-policy/commit/099d79669471e6924bf1e0bc51a79d54379c3a1a)]
|
|
59
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`6d5d8e2`](https://github.com/eea/volto-bise-policy/commit/6d5d8e29b04ddb92628245570055067ca3dcbb6c)]
|
|
60
73
|
- test: fix comment [valentinab25 - [`4f27d5a`](https://github.com/eea/volto-bise-policy/commit/4f27d5af2e8895c7af4f1157521ca42682b96e23)]
|
|
61
74
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c2fcb0`](https://github.com/eea/volto-bise-policy/commit/4c2fcb01065e1ef962317ba7be788fd1df079618)]
|
|
62
75
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`89afaa1`](https://github.com/eea/volto-bise-policy/commit/89afaa15892930452027ef8c8593fc6d193cda70)]
|
package/jest-addon.config.js
CHANGED
|
@@ -14,6 +14,8 @@ module.exports = {
|
|
|
14
14
|
'@package/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
15
15
|
'@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
16
16
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
17
|
+
'@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
|
|
18
|
+
'@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
|
|
17
19
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
18
20
|
'@plone/volto-slate$':
|
|
19
21
|
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
@@ -28,6 +30,7 @@ module.exports = {
|
|
|
28
30
|
],
|
|
29
31
|
transform: {
|
|
30
32
|
'^.+\\.js(x)?$': 'babel-jest',
|
|
33
|
+
'^.+\\.ts(x)?$': 'babel-jest',
|
|
31
34
|
'^.+\\.(png)$': 'jest-file',
|
|
32
35
|
'^.+\\.(jpg)$': 'jest-file',
|
|
33
36
|
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-bise-policy",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "@eeacms/volto-bise-policy: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@eeacms/volto-block-toc",
|
|
18
18
|
"@eeacms/volto-eea-design-system",
|
|
19
19
|
"@eeacms/volto-eea-website-theme",
|
|
20
|
+
"@eeacms/volto-resize-helper",
|
|
20
21
|
"@eeacms/volto-spotlight"
|
|
21
22
|
],
|
|
22
23
|
"repository": {
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"@eeacms/volto-block-toc": "*",
|
|
28
29
|
"@eeacms/volto-datablocks": "*",
|
|
29
30
|
"@eeacms/volto-eea-design-system": "*",
|
|
30
|
-
"@eeacms/volto-eea-website-theme": "
|
|
31
|
+
"@eeacms/volto-eea-website-theme": "*",
|
|
32
|
+
"@eeacms/volto-resize-helper": "*",
|
|
31
33
|
"@eeacms/volto-spotlight": "*",
|
|
32
34
|
"esri-loader": "3.7.0",
|
|
33
35
|
"plotly.js": "^2.28.0",
|
|
@@ -2,7 +2,7 @@ import worldSVG from '@plone/volto/icons/world.svg';
|
|
|
2
2
|
import BodyClassEdit from './Edit';
|
|
3
3
|
import BodyClassView from './View';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.body_classname = {
|
|
7
7
|
id: 'body_classname',
|
|
8
8
|
title: 'Body classname',
|
|
@@ -22,3 +22,5 @@ export default (config) => {
|
|
|
22
22
|
};
|
|
23
23
|
return config;
|
|
24
24
|
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -2,7 +2,7 @@ import codeSVG from '@plone/volto/icons/code.svg';
|
|
|
2
2
|
import FactsheetsListingView from './FactsheetsListingView';
|
|
3
3
|
import FactsheetsListingEdit from './FactsheetsListingEdit';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.biseFactsheetListing = {
|
|
7
7
|
id: 'biseFactsheetListing',
|
|
8
8
|
title: 'Factsheets Listing',
|
|
@@ -22,3 +22,5 @@ export default (config) => {
|
|
|
22
22
|
|
|
23
23
|
return config;
|
|
24
24
|
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -2,7 +2,7 @@ import codeSVG from '@plone/volto/icons/code.svg';
|
|
|
2
2
|
import KeyFactsView from './KeyFactsView';
|
|
3
3
|
import KeyFactsEdit from './KeyFactsEdit';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.keyfacts = {
|
|
7
7
|
id: 'keyfacts',
|
|
8
8
|
title: 'Key Facts',
|
|
@@ -20,3 +20,5 @@ export default (config) => {
|
|
|
20
20
|
};
|
|
21
21
|
return config;
|
|
22
22
|
};
|
|
23
|
+
|
|
24
|
+
export default config;
|
|
@@ -2,7 +2,7 @@ import codeSVG from '@plone/volto/icons/code.svg';
|
|
|
2
2
|
import MaesViewerView from './MaesViewerView';
|
|
3
3
|
import MaesViewerEdit from './MaesViewerEdit';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.maesviewer = {
|
|
7
7
|
id: 'maesviewer',
|
|
8
8
|
title: 'MAES Viewer',
|
|
@@ -20,3 +20,5 @@ export default (config) => {
|
|
|
20
20
|
};
|
|
21
21
|
return config;
|
|
22
22
|
};
|
|
23
|
+
|
|
24
|
+
export default config;
|
|
@@ -10,7 +10,7 @@ import './styles.less';
|
|
|
10
10
|
const View = ({ history, data, navigation, ...props }) => {
|
|
11
11
|
const search = history?.location?.search || '';
|
|
12
12
|
const pathname = props.path || props.pathname;
|
|
13
|
-
const pages = data.pages || [];
|
|
13
|
+
const pages = useMemo(() => data.pages || [], [data.pages]);
|
|
14
14
|
const items = useMemo(() => {
|
|
15
15
|
return [
|
|
16
16
|
...(navigation.filter(
|
|
@@ -2,7 +2,7 @@ import imageSVG from '@plone/volto/icons/image.svg';
|
|
|
2
2
|
import NavigationBlockView from './View';
|
|
3
3
|
import NavigationBlockEdit from './Edit';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.navigationBlock = {
|
|
7
7
|
id: 'navigationBlock',
|
|
8
8
|
title: 'Navigation Block',
|
|
@@ -20,3 +20,5 @@ export default (config) => {
|
|
|
20
20
|
};
|
|
21
21
|
return config;
|
|
22
22
|
};
|
|
23
|
+
|
|
24
|
+
export default config;
|
|
@@ -2,7 +2,7 @@ import worldSVG from '@plone/volto/icons/world.svg';
|
|
|
2
2
|
import RedirectEdit from './Edit';
|
|
3
3
|
import RedirectView from './View';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const config = (config) => {
|
|
6
6
|
config.blocks.blocksConfig.redirect = {
|
|
7
7
|
id: 'redirect',
|
|
8
8
|
title: 'Redirect',
|
|
@@ -22,3 +22,5 @@ export default (config) => {
|
|
|
22
22
|
};
|
|
23
23
|
return config;
|
|
24
24
|
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -5,7 +5,7 @@ import installKeyFacts from './KeyFacts';
|
|
|
5
5
|
import installMaesViewer from './MaesViewer';
|
|
6
6
|
import installNavigation from './Navigation';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const config = (config) => {
|
|
9
9
|
return [
|
|
10
10
|
installBodyClass,
|
|
11
11
|
installRedirect,
|
|
@@ -15,3 +15,5 @@ export default (config) => {
|
|
|
15
15
|
installNavigation,
|
|
16
16
|
].reduce((acc, apply) => apply(acc), config);
|
|
17
17
|
};
|
|
18
|
+
|
|
19
|
+
export default config;
|
|
@@ -107,10 +107,12 @@ const EditWrapper = compose(
|
|
|
107
107
|
}),
|
|
108
108
|
)(Edit);
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
const $Edit = (props) => {
|
|
111
111
|
return (
|
|
112
112
|
<VisibilitySensor offset={{ top: -150, bottom: -150 }}>
|
|
113
113
|
<EditWrapper {...props} />
|
|
114
114
|
</VisibilitySensor>
|
|
115
115
|
);
|
|
116
116
|
};
|
|
117
|
+
|
|
118
|
+
export default $Edit;
|
|
@@ -117,10 +117,12 @@ const SimpleDataTableViewWrapper = compose(
|
|
|
117
117
|
}),
|
|
118
118
|
)(SimpleDataTableView);
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
const View = (props) => {
|
|
121
121
|
return (
|
|
122
122
|
<VisibilitySensor offset={{ top: -150, bottom: -150 }}>
|
|
123
123
|
<SimpleDataTableViewWrapper {...props} />
|
|
124
124
|
</VisibilitySensor>
|
|
125
125
|
);
|
|
126
126
|
};
|
|
127
|
+
|
|
128
|
+
export default View;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { SmartView, smartSchema } from './templates/smart';
|
|
9
9
|
import { ColoredTableView, coloredTableSchema } from './templates/colored';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const applyConfig = (config) => {
|
|
12
12
|
config.blocks.blocksConfig.simpleDataConnectedTable = {
|
|
13
13
|
id: 'simpleDataConnectedTable',
|
|
14
14
|
title: 'Data Table',
|
|
@@ -62,3 +62,5 @@ export default (config) => {
|
|
|
62
62
|
};
|
|
63
63
|
return config;
|
|
64
64
|
};
|
|
65
|
+
|
|
66
|
+
export default applyConfig;
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
table {
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
border: 1px solid #e8e8e8 !important;
|
|
32
|
+
border-radius: 12px !important;
|
|
32
33
|
background: #fff !important;
|
|
33
34
|
border-collapse: separate !important;
|
|
34
|
-
border-radius: 12px !important;
|
|
35
35
|
|
|
36
36
|
thead > tr > th::after {
|
|
37
37
|
display: none;
|
package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/SubsiteClass.jsx
CHANGED
|
@@ -14,9 +14,10 @@ const SubsiteClass = () => {
|
|
|
14
14
|
() => content?.data?.['@components']?.subsite || {},
|
|
15
15
|
[content],
|
|
16
16
|
);
|
|
17
|
-
const pathname = useMemo(
|
|
18
|
-
content,
|
|
19
|
-
|
|
17
|
+
const pathname = useMemo(
|
|
18
|
+
() => flattenToAppURL(content?.['@id']) || '',
|
|
19
|
+
[content],
|
|
20
|
+
);
|
|
20
21
|
|
|
21
22
|
const { eea, bise } = config.settings;
|
|
22
23
|
const { subsites, multilingualSubsites } = bise || {};
|
|
@@ -25,6 +25,7 @@ import eeaFlag from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/
|
|
|
25
25
|
import config from '@plone/volto/registry';
|
|
26
26
|
import { compose } from 'recompose';
|
|
27
27
|
import { BodyClass } from '@plone/volto/helpers';
|
|
28
|
+
import { withScreenSize } from '@eeacms/volto-resize-helper/hocs';
|
|
28
29
|
|
|
29
30
|
import cx from 'classnames';
|
|
30
31
|
|
|
@@ -48,7 +49,7 @@ function getLanguage() {
|
|
|
48
49
|
/**
|
|
49
50
|
* EEA Specific Header component.
|
|
50
51
|
*/
|
|
51
|
-
const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
52
|
+
const EEAHeader = ({ token, history, subsite, content, screen, ...props }) => {
|
|
52
53
|
const dispatch = useDispatch();
|
|
53
54
|
const [language, setLanguage] = useState(getLanguage());
|
|
54
55
|
const previousToken = usePrevious(token);
|
|
@@ -145,6 +146,20 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
145
146
|
/* eslint-disable-next-line */
|
|
146
147
|
}, [isN2KSpecies, params]);
|
|
147
148
|
|
|
149
|
+
React.useEffect(() => {
|
|
150
|
+
let width = 0;
|
|
151
|
+
const menuEl = document.querySelector('.eea.header .main.bar');
|
|
152
|
+
const items =
|
|
153
|
+
document.querySelectorAll(
|
|
154
|
+
'.eea.header .main.bar .main-menu .ui.eea-main-menu li.item',
|
|
155
|
+
) || [];
|
|
156
|
+
|
|
157
|
+
for (let item of items) {
|
|
158
|
+
width += item.offsetWidth;
|
|
159
|
+
}
|
|
160
|
+
menuEl.style.setProperty('--menu-width', `${width}px`);
|
|
161
|
+
}, [screen]);
|
|
162
|
+
|
|
148
163
|
return (
|
|
149
164
|
<Header menuItems={items}>
|
|
150
165
|
{isHomePageInverse && <BodyClass className="homepage homepage-inverse" />}
|
|
@@ -379,6 +394,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
379
394
|
|
|
380
395
|
export default compose(
|
|
381
396
|
withRouter,
|
|
397
|
+
withScreenSize,
|
|
382
398
|
connect(
|
|
383
399
|
(state) => ({
|
|
384
400
|
token: state.userSession.token,
|
package/src/index.js
CHANGED
|
@@ -146,13 +146,15 @@ const applyConfig = (config) => {
|
|
|
146
146
|
// Customizations
|
|
147
147
|
// Group
|
|
148
148
|
if (config.blocks.blocksConfig.group) {
|
|
149
|
-
config.blocks.blocksConfig.group.schemaEnhancer =
|
|
149
|
+
config.blocks.blocksConfig.group.schemaEnhancer =
|
|
150
|
+
addStylingFieldsetSchemaEnhancer;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
// Columns
|
|
153
154
|
if (config.blocks.blocksConfig.columnsBlock) {
|
|
154
155
|
config.blocks.blocksConfig.columnsBlock.mostUsed = true;
|
|
155
|
-
config.blocks.blocksConfig.columnsBlock.schemaEnhancer =
|
|
156
|
+
config.blocks.blocksConfig.columnsBlock.schemaEnhancer =
|
|
157
|
+
addStylingFieldsetSchemaEnhancer;
|
|
156
158
|
config.blocks.blocksConfig.columnsBlock.tocEntry = undefined;
|
|
157
159
|
config.blocks.blocksConfig.columnsBlock.tocEntries = (
|
|
158
160
|
block = {},
|
|
@@ -179,12 +181,14 @@ const applyConfig = (config) => {
|
|
|
179
181
|
// Listing
|
|
180
182
|
if (config.blocks.blocksConfig.listing) {
|
|
181
183
|
config.blocks.blocksConfig.listing.title = 'Listing (Content)';
|
|
182
|
-
config.blocks.blocksConfig.listing.schemaEnhancer =
|
|
184
|
+
config.blocks.blocksConfig.listing.schemaEnhancer =
|
|
185
|
+
addStylingFieldsetSchemaEnhancer;
|
|
183
186
|
}
|
|
184
187
|
|
|
185
188
|
// Hero image left
|
|
186
189
|
if (config.blocks.blocksConfig.hero_image_left) {
|
|
187
|
-
config.blocks.blocksConfig.hero_image_left.schemaEnhancer =
|
|
190
|
+
config.blocks.blocksConfig.hero_image_left.schemaEnhancer =
|
|
191
|
+
addStylingFieldsetSchemaEnhancer;
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
config = [installBlocks, installStyles, installDataTable].reduce(
|
package/src/styles-config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from '@plone/volto/components';
|
|
2
2
|
import contentBoxSVG from '@eeacms/volto-bise-policy/icons/content-box.svg';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const config = (config) => {
|
|
5
5
|
config.settings.available_colors = [
|
|
6
6
|
'#005248', // primary color
|
|
7
7
|
'#00A390', // secondary color
|
|
@@ -184,3 +184,5 @@ export default (config) => {
|
|
|
184
184
|
|
|
185
185
|
return config;
|
|
186
186
|
};
|
|
187
|
+
|
|
188
|
+
export default config;
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
.main.bar {
|
|
11
11
|
.ui.container {
|
|
12
12
|
.ui.text.menu {
|
|
13
|
-
flex-wrap: wrap;
|
|
14
13
|
justify-content: end;
|
|
15
|
-
|
|
14
|
+
|
|
16
15
|
.item:first-child {
|
|
17
16
|
display: flex;
|
|
18
17
|
}
|
|
@@ -39,9 +38,8 @@
|
|
|
39
38
|
margin-top: 0;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
|
|
43
41
|
@media only screen and (min-width: @computerBreakpoint) {
|
|
44
|
-
|
|
42
|
+
.main.bar {
|
|
45
43
|
.ui.container {
|
|
46
44
|
height: @computerMainSectionHeight;
|
|
47
45
|
|
|
@@ -52,7 +50,7 @@
|
|
|
52
50
|
display: flex;
|
|
53
51
|
width: 100%;
|
|
54
52
|
max-height: 100%;
|
|
55
|
-
flex-wrap:
|
|
53
|
+
flex-wrap: nowrap;
|
|
56
54
|
justify-content: space-between;
|
|
57
55
|
margin: 0;
|
|
58
56
|
|
|
@@ -82,67 +80,51 @@
|
|
|
82
80
|
.subsite.subsite-natura2000 {
|
|
83
81
|
.eea.header .main.bar {
|
|
84
82
|
backdrop-filter: blur(2px);
|
|
85
|
-
background-color: hsla(0,0%,100
|
|
83
|
+
background-color: hsla(0, 0%, 100%, 0.8);
|
|
86
84
|
}
|
|
87
|
-
|
|
88
85
|
.eea.header .main.bar > .ui.container {
|
|
89
|
-
height:
|
|
86
|
+
height: 160px;
|
|
87
|
+
width: 100%;
|
|
90
88
|
}
|
|
91
|
-
|
|
92
89
|
.eea.header .main-menu {
|
|
93
90
|
align-items: center;
|
|
94
91
|
}
|
|
95
|
-
|
|
96
92
|
@media only screen and (min-width: @mobileBreakpoint) {
|
|
97
93
|
.eea.header .main.bar > .ui.container {
|
|
98
|
-
height:
|
|
94
|
+
height: 69px;
|
|
99
95
|
}
|
|
100
|
-
|
|
101
96
|
.eea.header .eea-logo {
|
|
102
|
-
max-width:
|
|
103
|
-
max-height: 60px;
|
|
97
|
+
max-width: 142px;
|
|
104
98
|
height: auto;
|
|
105
99
|
}
|
|
106
|
-
|
|
107
100
|
.burger-action.mobile,
|
|
108
101
|
.search-action {
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
102
|
+
width: 44px;
|
|
103
|
+
height: 69px;
|
|
111
104
|
}
|
|
112
105
|
}
|
|
113
|
-
|
|
114
106
|
@media only screen and (min-width: @tabletBreakpoint) {
|
|
115
107
|
.eea.header .main.bar > .ui.container {
|
|
116
|
-
height:
|
|
108
|
+
height: 117px;
|
|
117
109
|
}
|
|
118
|
-
|
|
119
110
|
.eea.header .eea-logo {
|
|
120
|
-
max-width:
|
|
121
|
-
max-height: 60px;
|
|
111
|
+
max-width: 252px;
|
|
122
112
|
height: auto;
|
|
123
113
|
}
|
|
124
|
-
|
|
125
114
|
.burger-action.mobile,
|
|
126
115
|
.search-action {
|
|
127
|
-
width:
|
|
128
|
-
height:
|
|
116
|
+
width: 66px;
|
|
117
|
+
height: 117px;
|
|
129
118
|
}
|
|
130
119
|
}
|
|
131
|
-
|
|
132
120
|
@media only screen and (min-width: @computerBreakpoint) {
|
|
121
|
+
.eea.header .main.bar > .ui.container {
|
|
122
|
+
height: 160px;
|
|
123
|
+
}
|
|
133
124
|
.eea.header .eea-logo {
|
|
134
|
-
max-width:
|
|
135
|
-
|
|
125
|
+
max-width: 300px;
|
|
126
|
+
width: 100%;
|
|
136
127
|
height: auto;
|
|
137
128
|
}
|
|
138
129
|
}
|
|
139
130
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
// #search-box {
|
|
143
|
-
// min-height: 100%;
|
|
144
|
-
// }
|
|
145
|
-
|
|
146
|
-
// .has-toolbar.homepage .eea.header {
|
|
147
|
-
// width: 100%;
|
|
148
|
-
// }
|
|
@@ -54,7 +54,10 @@
|
|
|
54
54
|
|
|
55
55
|
.is-n2k-site {
|
|
56
56
|
.eea.header .main.bar {
|
|
57
|
-
.ui.grid,
|
|
57
|
+
.ui.grid,
|
|
58
|
+
.main-menu,
|
|
59
|
+
.main-menu > ul,
|
|
60
|
+
.main-menu > ul > li {
|
|
58
61
|
height: 100%;
|
|
59
62
|
}
|
|
60
63
|
}
|
|
@@ -71,7 +74,6 @@
|
|
|
71
74
|
display: grid !important;
|
|
72
75
|
align-content: center;
|
|
73
76
|
|
|
74
|
-
|
|
75
77
|
.ui.container {
|
|
76
78
|
width: 100%;
|
|
77
79
|
padding-bottom: 0;
|
|
@@ -83,28 +85,28 @@
|
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
|
|
88
|
+
// .at-glance {
|
|
89
|
+
// height: 100%;
|
|
90
|
+
// padding: 0 2rem;
|
|
91
|
+
// background: @secondaryColor 0% 0% no-repeat padding-box;
|
|
92
|
+
// border-bottom: 4px solid @secondaryColor !important;
|
|
93
|
+
// margin-bottom: -16px;
|
|
94
|
+
// padding-bottom: 16px;
|
|
95
|
+
// height: calc(100% + 16px);
|
|
96
|
+
// border-bottom-left-radius: 10px;
|
|
97
|
+
// border-bottom-right-radius: 10px;
|
|
98
|
+
// color: #fff !important;
|
|
99
|
+
// cursor: pointer;
|
|
100
|
+
// display: flex;
|
|
101
|
+
// align-items: center;
|
|
102
|
+
|
|
103
|
+
// &:hover {
|
|
104
|
+
// color: #fff !important;
|
|
105
|
+
// border-bottom: 4px solid @secondaryColor !important;
|
|
106
|
+
// }
|
|
107
|
+
// }
|
|
86
108
|
|
|
87
|
-
.at-glance
|
|
88
|
-
height: 100%;
|
|
89
|
-
padding: 0 2rem;
|
|
90
|
-
background: @secondaryColor 0% 0% no-repeat padding-box;
|
|
91
|
-
border-bottom: 4px solid @secondaryColor !important;
|
|
92
|
-
margin-bottom: -16px;
|
|
93
|
-
padding-bottom: 16px;
|
|
94
|
-
height: calc(100% + 16px);
|
|
95
|
-
border-bottom-left-radius: 10px;
|
|
96
|
-
border-bottom-right-radius: 10px;
|
|
97
|
-
color: #fff !important;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
|
|
102
|
-
&:hover {
|
|
103
|
-
color: #fff !important;
|
|
104
|
-
border-bottom: 4px solid @secondaryColor !important;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
109
|
+
.at-glance,
|
|
108
110
|
.deep-dive {
|
|
109
111
|
color: @secondaryColor !important;
|
|
110
112
|
border-bottom: 4px solid transparent !important;
|
|
@@ -122,34 +124,33 @@
|
|
|
122
124
|
.with-n2k-navigation {
|
|
123
125
|
.eea.header {
|
|
124
126
|
.main.bar .ui.grid {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
@media only screen and (min-width: 992px) {
|
|
128
|
+
> :first-child:not(:last-child) {
|
|
129
|
+
flex: 1;
|
|
130
|
+
img {
|
|
131
|
+
object-fit: fill;
|
|
132
|
+
}
|
|
130
133
|
}
|
|
131
|
-
}
|
|
132
134
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
> :last-child:not(:first-child) {
|
|
136
|
+
width: var(--menu-width, 800px) !important;
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
@media @smallMonitorUp {
|
|
138
141
|
.main-menu {
|
|
139
142
|
justify-content: center;
|
|
140
|
-
|
|
143
|
+
|
|
141
144
|
ul {
|
|
142
145
|
padding-inline-start: 0;
|
|
143
146
|
justify-content: center !important;
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
|
-
|
|
148
150
|
}
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
|
|
153
154
|
.tabs-block {
|
|
154
155
|
.columns-header {
|
|
155
156
|
display: none;
|
|
@@ -173,4 +174,4 @@
|
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
|
-
}
|
|
177
|
+
}
|