@eeacms/volto-eea-website-theme 0.5.3 → 0.6.1
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 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/Title/View.jsx +1 -1
- package/src/components/theme/Banner/Banner.jsx +14 -8
- package/src/components/theme/Banner/View.jsx +5 -6
- package/src/customizations/volto/components/theme/Comments/Comments.jsx +7 -6
- package/src/index.js +5 -0
- package/theme/theme.config +2 -0
package/CHANGELOG.md
CHANGED
@@ -4,8 +4,34 @@ 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
|
+
#### [0.6.1](https://github.com/eea/volto-eea-website-theme/compare/0.6.0...0.6.1)
|
8
|
+
|
9
|
+
- Custom CSS for Description block [`2e951b5`](https://github.com/eea/volto-eea-website-theme/commit/2e951b559b0e3437afeebbdb2750e067d57b4738)
|
10
|
+
|
11
|
+
#### [0.6.0](https://github.com/eea/volto-eea-website-theme/compare/0.5.4...0.6.0)
|
12
|
+
|
13
|
+
> 19 May 2022
|
14
|
+
|
15
|
+
- Remove quote block customization [`#26`](https://github.com/eea/volto-eea-website-theme/pull/26)
|
16
|
+
- Cleanup [`415014b`](https://github.com/eea/volto-eea-website-theme/commit/415014b8399de5ffb5afaa9d6440b4ea5fe2bf2a)
|
17
|
+
- Release 0.6.0 [`1253ebb`](https://github.com/eea/volto-eea-website-theme/commit/1253ebba2f1c88dbc6b77a135580f3a5d7752729)
|
18
|
+
- fix(comments): Replace moment with formatRelativeDate helper from Volto core [`9b7974a`](https://github.com/eea/volto-eea-website-theme/commit/9b7974adb3d01065b80f61d7c3c1c09a93199ee6)
|
19
|
+
- fix(seo): SSR Title block [`887edc2`](https://github.com/eea/volto-eea-website-theme/commit/887edc25e45c44bfe99b909ae87c7fb7a90278a6)
|
20
|
+
|
21
|
+
#### [0.5.4](https://github.com/eea/volto-eea-website-theme/compare/0.5.3...0.5.4)
|
22
|
+
|
23
|
+
> 17 May 2022
|
24
|
+
|
25
|
+
- Release [`#25`](https://github.com/eea/volto-eea-website-theme/pull/25)
|
26
|
+
- Add customization to volto-quote-block icons [`#23`](https://github.com/eea/volto-eea-website-theme/pull/23)
|
27
|
+
- change (theme): added quote and callout components [`b691da2`](https://github.com/eea/volto-eea-website-theme/commit/b691da29236440a1096fcbf38d9d9e6cc6e69445)
|
28
|
+
- change(banner): added icon class to banner buttons [`7b641cf`](https://github.com/eea/volto-eea-website-theme/commit/7b641cfdc433fd638ff8ba2c3f4b9131a9f8142a)
|
29
|
+
|
7
30
|
#### [0.5.3](https://github.com/eea/volto-eea-website-theme/compare/0.5.2...0.5.3)
|
8
31
|
|
32
|
+
> 22 April 2022
|
33
|
+
|
34
|
+
- Release [`#24`](https://github.com/eea/volto-eea-website-theme/pull/24)
|
9
35
|
- Apply Draft bg only on View [`8910d78`](https://github.com/eea/volto-eea-website-theme/commit/8910d78baf0663d9eb820a3846ae24dea8eaa674)
|
10
36
|
- lint fixes [`ffc9edd`](https://github.com/eea/volto-eea-website-theme/commit/ffc9edd7dd90033d9ed8ccbe17c5327e68128b6f)
|
11
37
|
- change(buttons): customized Form, Sharing and ObjectBrowserWidget.jsx [`c307131`](https://github.com/eea/volto-eea-website-theme/commit/c307131f911dc05c2a9ef7d9c79357cd85de0fc4)
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@ import BannerView from '@eeacms/volto-eea-website-theme/components/theme/Banner/
|
|
15
15
|
* @extends Component
|
16
16
|
*/
|
17
17
|
const View = (props) => {
|
18
|
-
if (__SERVER__) return
|
18
|
+
if (__SERVER__) return <BannerView {...props} />;
|
19
19
|
return (
|
20
20
|
<Portal node={document.getElementById('page-header')}>
|
21
21
|
<BannerView {...props} />
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { compose } from 'redux';
|
3
3
|
import { connect } from 'react-redux';
|
4
|
-
import moment from 'moment';
|
5
4
|
import { Icon, Button, Grid } from 'semantic-ui-react';
|
5
|
+
import { formatDate } from '@plone/volto/helpers/Utils/Date';
|
6
6
|
import config from '@plone/volto/registry';
|
7
7
|
|
8
8
|
const socialPlatforms = {
|
@@ -44,7 +44,7 @@ const Banner = ({ children }) => {
|
|
44
44
|
Banner.Action = ({ title, icon, color, onClick, className }) => {
|
45
45
|
return (
|
46
46
|
<div className="action">
|
47
|
-
<Button className={className} basic inverted onClick={onClick}>
|
47
|
+
<Button className={className} basic icon inverted onClick={onClick}>
|
48
48
|
<Icon className={icon} color={color}></Icon>
|
49
49
|
<span className="mobile hidden">{title}</span>
|
50
50
|
</Button>
|
@@ -72,15 +72,21 @@ Banner.Title = ({ children }) => (
|
|
72
72
|
);
|
73
73
|
Banner.Metadata = ({ children }) => <p className="metadata">{children}</p>;
|
74
74
|
Banner.MetadataField = ({ hidden, type = 'text', label, value, title }) => {
|
75
|
-
|
75
|
+
const locale = config.settings.dateLocale || 'en-gb';
|
76
76
|
if (hidden || !value) return '';
|
77
77
|
if (type === 'date' && value)
|
78
78
|
return (
|
79
|
-
<span
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
<span className={`field ${type}`} title={title.replace('{}', value)}>
|
80
|
+
{label}{' '}
|
81
|
+
{formatDate({
|
82
|
+
date: value,
|
83
|
+
format: {
|
84
|
+
year: 'numeric',
|
85
|
+
month: 'short',
|
86
|
+
day: '2-digit',
|
87
|
+
},
|
88
|
+
locale: locale,
|
89
|
+
})}
|
84
90
|
</span>
|
85
91
|
);
|
86
92
|
return <span className={`field ${type}`}>{value}</span>;
|
@@ -7,7 +7,6 @@ import { startCase } from 'lodash';
|
|
7
7
|
import qs from 'querystring';
|
8
8
|
import { Container, Popup } from 'semantic-ui-react';
|
9
9
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
10
|
-
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
11
10
|
import Banner from './Banner';
|
12
11
|
import { getImageSource, sharePage } from './Banner';
|
13
12
|
|
@@ -74,7 +73,7 @@ const Title = ({ config = {}, properties }) => {
|
|
74
73
|
};
|
75
74
|
|
76
75
|
const View = (props) => {
|
77
|
-
const { banner = {},
|
76
|
+
const { banner = {}, fluid, intl, location, types = [] } = props;
|
78
77
|
const metadata = props.metadata || props.properties;
|
79
78
|
const {
|
80
79
|
info = [],
|
@@ -94,9 +93,9 @@ const View = (props) => {
|
|
94
93
|
// Set dates
|
95
94
|
const getDate = useCallback(
|
96
95
|
(hidden, key) => {
|
97
|
-
return !hidden && metadata[key] ?
|
96
|
+
return !hidden && metadata[key] ? metadata[key] : null;
|
98
97
|
},
|
99
|
-
[
|
98
|
+
[metadata],
|
100
99
|
);
|
101
100
|
const creationDate = useMemo(() => getDate(hideCreationDate, 'created'), [
|
102
101
|
getDate,
|
@@ -241,10 +240,10 @@ const View = (props) => {
|
|
241
240
|
|
242
241
|
export default compose(
|
243
242
|
injectIntl,
|
244
|
-
|
243
|
+
withRouter,
|
245
244
|
connect((state) => {
|
246
245
|
return {
|
247
246
|
types: state.types.types,
|
248
247
|
};
|
249
248
|
}),
|
250
|
-
)(
|
249
|
+
)(View);
|
@@ -18,8 +18,8 @@ import { Portal } from 'react-portal';
|
|
18
18
|
import { connect } from 'react-redux';
|
19
19
|
import { compose } from 'redux';
|
20
20
|
import { Button, Comment, Container, Icon } from 'semantic-ui-react';
|
21
|
-
import {
|
22
|
-
|
21
|
+
import { formatRelativeDate } from '@plone/volto/helpers/Utils/Date';
|
22
|
+
import config from '@plone/volto/registry';
|
23
23
|
|
24
24
|
const messages = defineMessages({
|
25
25
|
comment: {
|
@@ -297,7 +297,6 @@ class Comments extends Component {
|
|
297
297
|
*/
|
298
298
|
render() {
|
299
299
|
const { items } = this.props;
|
300
|
-
const moment = this.props.moment.default;
|
301
300
|
const { collapsedComments } = this.state;
|
302
301
|
// object with comment ids, to easily verify if any comment has children
|
303
302
|
const allCommentsWithCildren = this.addRepliesAsChildrenToComments(items);
|
@@ -318,8 +317,11 @@ class Comments extends Component {
|
|
318
317
|
<Comment.Metadata>
|
319
318
|
<span>
|
320
319
|
{' '}
|
321
|
-
<span title={
|
322
|
-
{
|
320
|
+
<span title={comment.creation_date}>
|
321
|
+
{formatRelativeDate({
|
322
|
+
date: comment.creation_date,
|
323
|
+
locale: config.settings.dateLocale || 'en-gb',
|
324
|
+
})}
|
323
325
|
</span>
|
324
326
|
</span>
|
325
327
|
</Comment.Metadata>
|
@@ -472,7 +474,6 @@ class Comments extends Component {
|
|
472
474
|
|
473
475
|
export default compose(
|
474
476
|
injectIntl,
|
475
|
-
injectLazyLibs(['moment']),
|
476
477
|
connect(
|
477
478
|
(state) => ({
|
478
479
|
items: state.comments.items,
|
package/src/index.js
CHANGED
@@ -14,6 +14,11 @@ const applyConfig = (config) => {
|
|
14
14
|
if (config.blocks.blocksConfig.accordion) {
|
15
15
|
config.blocks.blocksConfig.accordion.semanticIcon = 'ri-arrow-down-s-line';
|
16
16
|
}
|
17
|
+
|
18
|
+
// Description block custom CSS
|
19
|
+
config.blocks.blocksConfig.description.className =
|
20
|
+
'documentDescription eea callout';
|
21
|
+
|
17
22
|
// apply inPage navigation
|
18
23
|
config.settings.appExtras = [
|
19
24
|
...(config.settings.appExtras || []),
|