@eeacms/volto-hero-block 5.0.0 → 5.1.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,7 +4,17 @@ 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
- ### [5.0.0](https://github.com/eea/volto-hero-block/compare/4.0.0...5.0.0) - 7 March 2023
7
+ ### [5.1.0](https://github.com/eea/volto-hero-block/compare/5.0.0...5.1.0) - 24 March 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add 'with-hero-block' class to body [Miu Razvan - [`12e60a3`](https://github.com/eea/volto-hero-block/commit/12e60a352e60f647346fa00ba3aa8f54f2b8623c)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Release 5.1.0 [Alin Voinea - [`7cd1d6c`](https://github.com/eea/volto-hero-block/commit/7cd1d6c3194b59f9645a716be8364b39136ac6fc)]
16
+ - use stable volto in jenkins [Miu Razvan - [`5459e18`](https://github.com/eea/volto-hero-block/commit/5459e18001486ff05b1e7535685926ef41a233e3)]
17
+ ## [5.0.0](https://github.com/eea/volto-hero-block/compare/4.0.0...5.0.0) - 7 March 2023
8
18
 
9
19
  #### :nail_care: Enhancements
10
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-hero-block",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "@eeacms/volto-hero-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -8,6 +8,7 @@ import {
8
8
  SidebarPortal,
9
9
  UniversalLink,
10
10
  } from '@plone/volto/components';
11
+ import { BodyClass } from '@plone/volto/helpers';
11
12
  import SlateEditor from '@plone/volto-slate/editor/SlateEditor';
12
13
  import { handleKey } from '@plone/volto-slate/blocks/Text/keyboard';
13
14
  import {
@@ -66,6 +67,7 @@ const Edit = (props) => {
66
67
 
67
68
  return (
68
69
  <>
70
+ <BodyClass className="with-hero-block" />
69
71
  <Hero {...data}>
70
72
  <Hero.Text {...data}>
71
73
  <SlateEditor
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { Icon } from 'semantic-ui-react';
4
4
  import { UniversalLink } from '@plone/volto/components';
5
+ import { BodyClass } from '@plone/volto/helpers';
5
6
  import Hero from './Hero';
6
7
  import Copyright from './Copyright';
7
8
  import { serializeText } from '@eeacms/volto-hero-block/helpers';
@@ -25,22 +26,25 @@ const View = (props) => {
25
26
  const { data = {} } = props;
26
27
  const { text, copyright, copyrightIcon, copyrightPosition } = data;
27
28
  return (
28
- <Hero {...data}>
29
- <Hero.Text {...data}>{serializeText(text)}</Hero.Text>
30
- <Hero.Meta {...data}>
31
- <Metadata {...data} />
32
- </Hero.Meta>
33
- {copyright ? (
34
- <Copyright copyrightPosition={copyrightPosition}>
35
- <Copyright.Icon>
36
- <Icon className={copyrightIcon} />
37
- </Copyright.Icon>
38
- <Copyright.Text>{copyright}</Copyright.Text>
39
- </Copyright>
40
- ) : (
41
- ''
42
- )}
43
- </Hero>
29
+ <React.Fragment>
30
+ <BodyClass className="with-hero-block" />
31
+ <Hero {...data}>
32
+ <Hero.Text {...data}>{serializeText(text)}</Hero.Text>
33
+ <Hero.Meta {...data}>
34
+ <Metadata {...data} />
35
+ </Hero.Meta>
36
+ {copyright ? (
37
+ <Copyright copyrightPosition={copyrightPosition}>
38
+ <Copyright.Icon>
39
+ <Icon className={copyrightIcon} />
40
+ </Copyright.Icon>
41
+ <Copyright.Text>{copyright}</Copyright.Text>
42
+ </Copyright>
43
+ ) : (
44
+ ''
45
+ )}
46
+ </Hero>
47
+ </React.Fragment>
44
48
  );
45
49
  };
46
50