@eeacms/volto-eea-website-theme 1.14.1 → 1.15.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 +23 -9
- package/package.json +1 -1
- package/src/components/manage/Blocks/LayoutSettings/LayoutSettingsEdit.jsx +0 -1
- package/src/components/manage/Blocks/LayoutSettings/index.js +2 -4
- package/src/components/manage/Blocks/LayoutSettings/schema.js +8 -1
- package/src/components/theme/Banner/View.jsx +3 -21
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +5 -4
- package/src/index.js +13 -11
- package/src/components/manage/Blocks/LayoutSettings/edit.less +0 -4
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,29 @@ 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.15.0](https://github.com/eea/volto-eea-website-theme/compare/1.14.1...1.15.0) - 2 June 2023
|
8
|
+
|
9
|
+
#### :rocket: New Features
|
10
|
+
|
11
|
+
- feat: can disable all actions from footer - refs #253198 [Teodor Voicu - [`ab52ee8`](https://github.com/eea/volto-eea-website-theme/commit/ab52ee818d4343add1ac641b1a7a2e1c76ce0946)]
|
12
|
+
- feat(blocks): add body class option in layout settings block #138 from eea/layout-body-class [ichim-david - [`4409d1c`](https://github.com/eea/volto-eea-website-theme/commit/4409d1c7416ad143eafe578d55c2c9ef70433879)]
|
13
|
+
- feat(blocks): add homepage class in layout settings block [kreafox - [`979ed1e`](https://github.com/eea/volto-eea-website-theme/commit/979ed1eae9253735ad20c4558c021a1a0ec267d6)]
|
14
|
+
- feat(blocks): add body class option in layout settings block [kreafox - [`d401bd6`](https://github.com/eea/volto-eea-website-theme/commit/d401bd6651481c9e5a1fe626724d80bf7d3babed)]
|
15
|
+
|
16
|
+
#### :nail_care: Enhancements
|
17
|
+
|
18
|
+
- change(title): use portal type_title instead @type refs151851 [nileshgulia1 - [`aa38e44`](https://github.com/eea/volto-eea-website-theme/commit/aa38e4444f12cab2f80647774b3e4933053fade6)]
|
19
|
+
- change(layout-block): removed css that hid the layout settings [David Ichim - [`1e26a94`](https://github.com/eea/volto-eea-website-theme/commit/1e26a94a01fcbc44f6e07c6fa60e5e43f9545788)]
|
20
|
+
- change(layout): removed most used from layout block [David Ichim - [`31c901d`](https://github.com/eea/volto-eea-website-theme/commit/31c901d75d509d011269dee4224e0bec6b12bfe4)]
|
21
|
+
- change(blocks): remove restriction in layout settings block [kreafox - [`c3b01f6`](https://github.com/eea/volto-eea-website-theme/commit/c3b01f60b84ccc8b4ae6446a2b607615a3546ceb)]
|
22
|
+
|
23
|
+
#### :house: Internal changes
|
24
|
+
|
25
|
+
|
26
|
+
#### :hammer_and_wrench: Others
|
27
|
+
|
28
|
+
- other: group restricted blocks in an array [Miu Razvan - [`b79680d`](https://github.com/eea/volto-eea-website-theme/commit/b79680dd4162a0ee316489d15c76eab274888f74)]
|
29
|
+
- Bump to 1.15.0 [kreafox - [`48aa9d8`](https://github.com/eea/volto-eea-website-theme/commit/48aa9d8e8dd45bd1ca0a1a63b579ed3db77e7463)]
|
7
30
|
### [1.14.1](https://github.com/eea/volto-eea-website-theme/compare/1.14.0...1.14.1) - 22 May 2023
|
8
31
|
|
9
32
|
#### :rocket: New Features
|
@@ -154,7 +177,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
154
177
|
|
155
178
|
#### :hammer_and_wrench: Others
|
156
179
|
|
157
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
|
158
180
|
### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
|
159
181
|
|
160
182
|
#### :bug: Bug Fixes
|
@@ -301,7 +323,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
301
323
|
|
302
324
|
- For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
|
303
325
|
- Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
|
304
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
|
305
326
|
### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
|
306
327
|
|
307
328
|
#### :hammer_and_wrench: Others
|
@@ -335,7 +356,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
335
356
|
|
336
357
|
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
337
358
|
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
338
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
|
339
359
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
340
360
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
341
361
|
|
@@ -345,7 +365,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
345
365
|
|
346
366
|
#### :hammer_and_wrench: Others
|
347
367
|
|
348
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
|
349
368
|
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
350
369
|
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
351
370
|
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
@@ -356,7 +375,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
356
375
|
|
357
376
|
#### :hammer_and_wrench: Others
|
358
377
|
|
359
|
-
- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
|
360
378
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
361
379
|
|
362
380
|
#### :rocket: New Features
|
@@ -397,7 +415,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
397
415
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
398
416
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
399
417
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
400
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
401
418
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
402
419
|
|
403
420
|
#### :nail_care: Enhancements
|
@@ -445,7 +462,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
445
462
|
|
446
463
|
#### :hammer_and_wrench: Others
|
447
464
|
|
448
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
449
465
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
450
466
|
|
451
467
|
#### :hammer_and_wrench: Others
|
@@ -713,7 +729,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
713
729
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
714
730
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
715
731
|
- 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)]
|
716
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
717
732
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
718
733
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
719
734
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
@@ -755,5 +770,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
755
770
|
|
756
771
|
#### :hammer_and_wrench: Others
|
757
772
|
|
758
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
759
773
|
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
|
package/package.json
CHANGED
@@ -2,7 +2,6 @@ import React from 'react';
|
|
2
2
|
import { EditSchema } from './schema';
|
3
3
|
import { BlockDataForm, SidebarPortal } from '@plone/volto/components';
|
4
4
|
import LayoutSettingsView from './LayoutSettingsView';
|
5
|
-
import './edit.less';
|
6
5
|
|
7
6
|
const LayoutSettingsEdit = (props) => {
|
8
7
|
const schema = EditSchema();
|
@@ -12,10 +12,8 @@ export default (config) => {
|
|
12
12
|
view: LayoutSettingsView,
|
13
13
|
edit: LayoutSettingsEdit,
|
14
14
|
schema: BlockSettingsSchema,
|
15
|
-
restricted:
|
16
|
-
|
17
|
-
},
|
18
|
-
mostUsed: true,
|
15
|
+
restricted: false,
|
16
|
+
mostUsed: false,
|
19
17
|
blockHasOwnFocusManagement: true,
|
20
18
|
sidebarTab: 1,
|
21
19
|
};
|
@@ -15,7 +15,7 @@ export const EditSchema = () => {
|
|
15
15
|
{
|
16
16
|
id: 'default',
|
17
17
|
title: 'Default',
|
18
|
-
fields: ['layout_size'],
|
18
|
+
fields: ['layout_size', 'body_class'],
|
19
19
|
},
|
20
20
|
],
|
21
21
|
required: [],
|
@@ -26,6 +26,13 @@ export const EditSchema = () => {
|
|
26
26
|
actions: Object.keys(ALIGN_INFO_MAP),
|
27
27
|
actionsInfoMap: ALIGN_INFO_MAP,
|
28
28
|
},
|
29
|
+
body_class: {
|
30
|
+
title: 'Body class',
|
31
|
+
choices: [
|
32
|
+
['homepage', 'Homepage'],
|
33
|
+
['homepage-inverse', 'Homepage inverse'],
|
34
|
+
],
|
35
|
+
},
|
29
36
|
},
|
30
37
|
};
|
31
38
|
};
|
@@ -3,11 +3,9 @@ import { compose } from 'redux';
|
|
3
3
|
import { connect } from 'react-redux';
|
4
4
|
import { withRouter } from 'react-router';
|
5
5
|
import { defineMessages, injectIntl } from 'react-intl';
|
6
|
-
import
|
7
|
-
import qs from 'querystring';
|
6
|
+
import startCase from 'lodash/startCase';
|
8
7
|
import { Icon } from 'semantic-ui-react';
|
9
8
|
import Popup from '@eeacms/volto-eea-design-system/ui/Popup/Popup';
|
10
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
11
9
|
import config from '@plone/volto/registry';
|
12
10
|
import Banner from '@eeacms/volto-eea-design-system/ui/Banner/Banner';
|
13
11
|
import {
|
@@ -62,7 +60,7 @@ const Title = ({ config = {}, properties }) => {
|
|
62
60
|
};
|
63
61
|
|
64
62
|
const View = (props) => {
|
65
|
-
const { banner = {}, intl
|
63
|
+
const { banner = {}, intl } = props;
|
66
64
|
const metadata = props.metadata || props.properties;
|
67
65
|
const popupRef = useRef(null);
|
68
66
|
const {
|
@@ -81,11 +79,6 @@ const View = (props) => {
|
|
81
79
|
const copyrightPrefix =
|
82
80
|
config.blocks.blocksConfig.title.copyrightPrefix || '';
|
83
81
|
|
84
|
-
// Set query parameters
|
85
|
-
const parameters = useMemo(
|
86
|
-
() => qs.parse(location.search.replace('?', '')) || {},
|
87
|
-
[location],
|
88
|
-
);
|
89
82
|
// Set dates
|
90
83
|
const getDate = useCallback(
|
91
84
|
(hidden, key) => {
|
@@ -109,18 +102,7 @@ const View = (props) => {
|
|
109
102
|
// Set image source
|
110
103
|
const image = getImageSource(metadata['image']);
|
111
104
|
// Get type
|
112
|
-
const type =
|
113
|
-
return (
|
114
|
-
types?.filter?.(
|
115
|
-
(type) =>
|
116
|
-
flattenToAppURL(type['@id']) ===
|
117
|
-
`/@types/${metadata['@type'] || parameters.type}`,
|
118
|
-
)[0]?.title ||
|
119
|
-
friendlyId(metadata['@type']) ||
|
120
|
-
metadata['@type'] ||
|
121
|
-
parameters.type
|
122
|
-
);
|
123
|
-
}, [types, metadata, parameters]);
|
105
|
+
const type = metadata.type_title || friendlyId(metadata['@type']);
|
124
106
|
|
125
107
|
return (
|
126
108
|
<Banner {...props} image={image}>
|
@@ -8,6 +8,7 @@ import { useSelector, shallowEqual } from 'react-redux';
|
|
8
8
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
9
9
|
import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
|
10
10
|
import config from '@plone/volto/registry';
|
11
|
+
import isArray from 'lodash/isArray';
|
11
12
|
|
12
13
|
const Footer = () => {
|
13
14
|
const { eea } = config.settings;
|
@@ -28,7 +29,7 @@ const Footer = () => {
|
|
28
29
|
shallowEqual,
|
29
30
|
);
|
30
31
|
// ZMI > portal_actions > footer_actions
|
31
|
-
const actions = footerActions
|
32
|
+
const actions = isArray(footerActions)
|
32
33
|
? footerActions.map((action) => ({
|
33
34
|
title: action.title,
|
34
35
|
link: flattenToAppURL(action.url),
|
@@ -36,7 +37,7 @@ const Footer = () => {
|
|
36
37
|
: eea.footerOpts.actions;
|
37
38
|
|
38
39
|
// ZMI > portal_actions > copyright_actions
|
39
|
-
const copyright = copyrightActions
|
40
|
+
const copyright = isArray(copyrightActions)
|
40
41
|
? copyrightActions.map((action) => ({
|
41
42
|
title: action.title,
|
42
43
|
site: action.title,
|
@@ -45,7 +46,7 @@ const Footer = () => {
|
|
45
46
|
: eea.footerOpts.copyright;
|
46
47
|
|
47
48
|
// ZMI > portal_actions > social_actions
|
48
|
-
const social = socialActions
|
49
|
+
const social = isArray(socialActions)
|
49
50
|
? socialActions.map((action) => ({
|
50
51
|
name: action.id,
|
51
52
|
icon: action.icon,
|
@@ -54,7 +55,7 @@ const Footer = () => {
|
|
54
55
|
: eea.footerOpts.social;
|
55
56
|
|
56
57
|
// ZMI > portal_actions > contact_actions
|
57
|
-
const contacts = contactActions
|
58
|
+
const contacts = isArray(contactActions)
|
58
59
|
? contactActions.map((action, idx) => ({
|
59
60
|
text: action.title,
|
60
61
|
icon: action.icon,
|
package/src/index.js
CHANGED
@@ -16,6 +16,12 @@ import voltoCustomMiddleware from './middleware/voltoCustom';
|
|
16
16
|
import okMiddleware from './middleware/ok';
|
17
17
|
import installSlate from './slate';
|
18
18
|
|
19
|
+
const restrictedBlocks = [
|
20
|
+
'__grid', // Grid/Teaser block (kitconcept)
|
21
|
+
'imagesGrid',
|
22
|
+
'teaser',
|
23
|
+
];
|
24
|
+
|
19
25
|
const applyConfig = (config) => {
|
20
26
|
// EEA specific settings
|
21
27
|
config.settings.eea = {
|
@@ -34,6 +40,13 @@ const applyConfig = (config) => {
|
|
34
40
|
// Disable tags on View
|
35
41
|
config.settings.showTags = false;
|
36
42
|
|
43
|
+
// Disable some blocks
|
44
|
+
restrictedBlocks.forEach((block) => {
|
45
|
+
if (config.blocks.blocksConfig[block]) {
|
46
|
+
config.blocks.blocksConfig[block].restricted = true;
|
47
|
+
}
|
48
|
+
});
|
49
|
+
|
37
50
|
// Enable Title block
|
38
51
|
config.blocks.blocksConfig.title.restricted = false;
|
39
52
|
|
@@ -206,17 +219,6 @@ const applyConfig = (config) => {
|
|
206
219
|
},
|
207
220
|
];
|
208
221
|
|
209
|
-
// Grid/Teaser block (kitconcept)
|
210
|
-
if (config.blocks.blocksConfig.__grid) {
|
211
|
-
config.blocks.blocksConfig.__grid.restricted = true;
|
212
|
-
}
|
213
|
-
if (config.blocks.blocksConfig.imagesGrid) {
|
214
|
-
config.blocks.blocksConfig.imagesGrid.restricted = true;
|
215
|
-
}
|
216
|
-
if (config.blocks.blocksConfig.teaser) {
|
217
|
-
config.blocks.blocksConfig.teaser.restricted = true;
|
218
|
-
}
|
219
|
-
|
220
222
|
// layout settings
|
221
223
|
config = [installLayoutSettingsBlock].reduce(
|
222
224
|
(acc, apply) => apply(acc),
|