-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for release - Adapt to grid block (#119)
Co-authored-by: Dante Álvarez <89805481+danalvrz@users.noreply.github.com>
- Loading branch information
Showing
16 changed files
with
3,289 additions
and
294 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Prepare to release @sneridagh | ||
Add support for core Grid block @sneridagh |
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,28 +1,52 @@ | ||
{ | ||
"name": "@kitconcept/volto-light-theme", | ||
"version": "0.1.0", | ||
"description": "volto-light-theme: Volto add-on", | ||
"description": "Volto Light Theme by kitconcept", | ||
"main": "src/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/kitconcept/volto-light-theme.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/kitconcept/volto-light-theme/issues" | ||
}, | ||
"homepage": "https://github.com/kitconcept/volto-light-theme#readme", | ||
"author": "kitconcept, GmbH", | ||
"license": "MIT", | ||
"keywords": [ | ||
"volto-addon", | ||
"volto", | ||
"plone", | ||
"react" | ||
"react", | ||
"light-theme", | ||
"theme" | ||
], | ||
"scripts": { | ||
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon" | ||
"i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon", | ||
"dry-release": "release-it --dry-run", | ||
"release": "release-it", | ||
"release-major-alpha": "release-it major --preRelease=alpha", | ||
"release-alpha": "release-it --preRelease=alpha" | ||
}, | ||
"devDependencies": { | ||
"@plone/scripts": "^2.3.0", | ||
"@plone/scripts": "^3.0.0", | ||
"postcss-scss": "4.0.6", | ||
"prettier": "2.0.5", | ||
"razzle-plugin-scss": "4.2.18", | ||
"release-it": "15.11.0", | ||
"stylelint-config-prettier": "9.0.4", | ||
"stylelint-config-sass-guidelines": "9.0.1", | ||
"stylelint-prettier": "1.1.2" | ||
}, | ||
"peerDependencies": { | ||
"@plone/volto": "^16.20.0 || ^17.0.0-alpha.4" | ||
"@eeacms/volto-accordion-block": "^9.0.0", | ||
"@kitconcept/volto-button-block": "^2.1.0", | ||
"@kitconcept/volto-dsgvo-banner": "^1.3.0", | ||
"@kitconcept/volto-heading-block": "^2.2.0", | ||
"@kitconcept/volto-image-block": "^1.0.1", | ||
"@kitconcept/volto-introduction-block": "^1.0.0", | ||
"@kitconcept/volto-separator-block": "^3.2.0", | ||
"@kitconcept/volto-slider-block": "^4.2.0", | ||
"@plone/volto": "^17.0.0-alpha.16" | ||
} | ||
} |
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
44 changes: 44 additions & 0 deletions
44
src/customizations/volto/components/manage/Blocks/Grid/View.jsx
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// TODO: Remove after this is merged: https://github.com/plone/volto/pull/4932 | ||
import { Grid } from 'semantic-ui-react'; | ||
import cx from 'classnames'; | ||
import { RenderBlocks } from '@plone/volto/components'; | ||
import { withBlockExtensions } from '@plone/volto/helpers'; | ||
import config from '@plone/volto/registry'; | ||
|
||
const GridBlockView = (props) => { | ||
const { data, path, className } = props; | ||
const metadata = props.metadata || props.properties; | ||
const columns = data.blocks_layout.items; | ||
const blocksConfig = | ||
config.blocks.blocksConfig[data['@type']].blocksConfig || | ||
props.blocksConfig; | ||
const location = { | ||
pathname: path, | ||
}; | ||
return ( | ||
<div | ||
className={cx('block', data['@type'], className, { | ||
one: columns?.length === 1, | ||
two: columns?.length === 2, | ||
three: columns?.length === 3, | ||
four: columns?.length === 4, | ||
})} | ||
> | ||
{data.headline && <h2 className="headline">{data.headline}</h2>} | ||
|
||
<Grid stackable stretched columns={columns.length}> | ||
<RenderBlocks | ||
{...props} | ||
blockWrapperTag={Grid.Column} | ||
metadata={metadata} | ||
content={data} | ||
location={location} | ||
blocksConfig={blocksConfig} | ||
isContainer | ||
/> | ||
</Grid> | ||
</div> | ||
); | ||
}; | ||
|
||
export default withBlockExtensions(GridBlockView); |
Oops, something went wrong.