@eeacms/volto-eea-website-theme 1.12.0 → 1.13.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 CHANGED
@@ -4,6 +4,15 @@ 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.13.0](https://github.com/eea/volto-eea-website-theme/compare/1.12.0...1.13.0) - 27 March 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(Title): Possibility to add arbitrary copyright prefix - refs #250724 [Alin Voinea - [`9249bad`](https://github.com/eea/volto-eea-website-theme/commit/9249bad0a588206cb97c13ffb08a9b4fd4fc548f)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Release 1.13.0 [Alin Voinea - [`9e06d22`](https://github.com/eea/volto-eea-website-theme/commit/9e06d2253d08fe9ccec6cadd71b828f1558398f5)]
7
16
  ### [1.12.0](https://github.com/eea/volto-eea-website-theme/compare/1.11.3...1.12.0) - 24 March 2023
8
17
 
9
18
  #### :nail_care: Enhancements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "1.12.0",
3
+ "version": "1.13.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",
@@ -6,6 +6,7 @@ export default (config) => {
6
6
  ...config.blocks.blocksConfig.title,
7
7
  edit: Edit,
8
8
  view: View,
9
+ copyrightPrefix: 'Image',
9
10
  sidebarTab: 1,
10
11
  };
11
12
 
@@ -8,6 +8,7 @@ import qs from 'querystring';
8
8
  import { Icon } from 'semantic-ui-react';
9
9
  import Popup from '@eeacms/volto-eea-design-system/ui/Popup/Popup';
10
10
  import { flattenToAppURL } from '@plone/volto/helpers';
11
+ import config from '@plone/volto/registry';
11
12
  import Banner from '@eeacms/volto-eea-design-system/ui/Banner/Banner';
12
13
  import {
13
14
  getImageSource,
@@ -77,6 +78,9 @@ const View = (props) => {
77
78
  copyrightPosition,
78
79
  // contentType,
79
80
  } = props.data;
81
+ const copyrightPrefix =
82
+ config.blocks.blocksConfig.title.copyrightPrefix || '';
83
+
80
84
  // Set query parameters
81
85
  const parameters = useMemo(
82
86
  () => qs.parse(location.search.replace('?', '')) || {},
@@ -213,6 +217,7 @@ const View = (props) => {
213
217
  </Banner.Metadata>
214
218
  {copyright ? (
215
219
  <Copyright copyrightPosition={copyrightPosition}>
220
+ <Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
216
221
  <Copyright.Icon>
217
222
  <Icon className={copyrightIcon} />
218
223
  </Copyright.Icon>
package/src/index.js CHANGED
@@ -78,6 +78,11 @@ const applyConfig = (config) => {
78
78
  config.blocks.blocksConfig.description.className =
79
79
  'documentDescription eea callout';
80
80
 
81
+ // Hero block copyright prefix
82
+ if (config.blocks.blocksConfig.hero) {
83
+ config.blocks.blocksConfig.hero.copyrightPrefix = 'Image';
84
+ }
85
+
81
86
  // Custom TokenWidget
82
87
  if (config.widgets.views) {
83
88
  config.widgets.views.id.subjects = TokenWidget;