generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from eea/develop
Update quote + add testimonial quote variation
- Loading branch information
Showing
24 changed files
with
376 additions
and
906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@eeacms/volto-quote-block", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "@eeacms/volto-quote-block: Volto add-on", | ||
"main": "src/index.js", | ||
"author": "European Environment Agency: IDM2 A-Team", | ||
|
@@ -17,11 +17,13 @@ | |
"url": "[email protected]:eea/volto-quote-block.git" | ||
}, | ||
"addons": [ | ||
"@eeacms/volto-object-widget", | ||
"volto-slate" | ||
], | ||
"dependencies": { | ||
"@plone/scripts": "*", | ||
"volto-slate": "*" | ||
"volto-slate": "*", | ||
"@eeacms/volto-object-widget": "*" | ||
}, | ||
"devDependencies": { | ||
"@cypress/code-coverage": "^3.9.5", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,13 @@ | ||
import React from 'react'; | ||
import config from '@plone/volto/registry'; | ||
import { withBlockExtensions } from '@plone/volto/helpers'; | ||
|
||
import './styles.less'; | ||
|
||
const View = (props) => { | ||
const { data, mode, block, onChangeBlock } = props; | ||
const { template = 'default' } = data; | ||
|
||
const Quote = | ||
config.blocks.blocksConfig.quote.templates[template]?.view || (() => ''); | ||
|
||
React.useEffect(() => { | ||
if (mode === 'edit' && !template) { | ||
onChangeBlock(block, { | ||
...data, | ||
template: 'default', | ||
}); | ||
} | ||
/* eslint-disable-next-line */ | ||
}, []); | ||
const { variation } = props; | ||
|
||
const Quote = variation?.view; | ||
return <Quote {...props} />; | ||
}; | ||
|
||
export default View; | ||
export default withBlockExtensions(View); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.eea.blockquote .quote > *:not(.meta) { | ||
margin-bottom: 0; | ||
.quote { | ||
width: 100%; | ||
} | ||
|
||
.eea.pullquote .quotes { | ||
flex-flow: column; | ||
div.quote { | ||
margin-bottom: 1em; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.