Skip to content

Commit

Permalink
TASK: support Neos 4.x (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrayne authored and dimaip committed Oct 15, 2018
1 parent 13330e8 commit c453e44
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 35 deletions.
64 changes: 32 additions & 32 deletions Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prototype(Psmb.NodeTypes:ImageUri) < prototype(Neos.Fusion:Case) {
image {
condition = ${asset}
renderer = ImageUri {
renderer = Neos.Neos:ImageUri {
asset = ${asset}
width = ${width}
height = ${height}
Expand All @@ -25,97 +25,97 @@ prototype(Psmb.NodeTypes:Text) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Text'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Headline) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Headline'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Lead) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Lead'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Blockquote) < prototype(Neos.Fusion:Tag) {
tagName = 'blockquote'
attributes.class = 'Blockquote'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Section) < prototype(Neos.Fusion:Tag) {
tagName = 'section'
attributes.class = 'Section'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Aside) < prototype(Neos.Fusion:Tag) {
tagName = 'aside'
attributes.class = 'Aside'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Small) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Small'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Epigraph) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Epigraph'
content = Neos.Fusion:Tag {
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.convertUris = Neos.Neos:ConvertUris
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Image) < prototype(Neos.Fusion:Tag) {
tagName = 'figure'
content = Neos.Fusion:Array {
editable = ContentElementEditable {
editable = Neos.Neos:ContentElementEditable {
property = 'image'
}
image = Neos.Fusion:Tag {
Expand All @@ -133,63 +133,63 @@ prototype(Psmb.NodeTypes:Image) < prototype(Neos.Fusion:Tag) {
@process.convertUris = Neos.Neos:ConvertUris
}
}
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
prototype(Psmb.NodeTypes:Asset) < prototype(Neos.Fusion:Tag) {
tagName = 'a'
attributes.href = ${'asset://' + node.properties.asset.identifier}
[email protected] = ConvertUris
[email protected] = Neos.Neos:ConvertUris
content = ${q(node).property('title')}
@process.wrap = ${'<div>' + value + '</div>'}
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}

prototype(Psmb.NodeTypes:Button) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Button button button--alt'
content = Neos.Fusion:Tag {
tagName = 'a'
attributes.href = ${node.properties.target}
[email protected] = ConvertUris {
[email protected] = Neos.Neos:ConvertUris {
forceConversion = true
}
content = ${q(node).property('text')}
@process.contentElementEditable = ContentElementEditable {
@process.contentElementEditable = Neos.Neos:ContentElementEditable {
property = 'text'
}
}
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}

prototype(Psmb.NodeTypes:ContainerOverImage) < prototype(Neos.Fusion:Tag) {
@context.imageUri = ImageUri {
@context.imageUri = Neos.Neos:ImageUri {
asset = ${q(node).property('image')}
maximumWidth = 1600
}
attributes.class = 'ContainerOverImage'
attributes.style = ${'background-image: url(' + imageUri + ')'}
content = ContentCollectionRenderer {
content = Neos.Neos:ContentCollectionRenderer {
@process.tmpl = ${'<div class="ContainerOverImage-inner">' + value + '</div>'}
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
}

prototype(Psmb.NodeTypes:Container) < prototype(Neos.Fusion:Tag) {
attributes.class = ${'Container ' + node.properties.class}
attributes.id = ${node.properties.navTitle}
content = ContentCollectionRenderer {
@process.contentElementWrapping = ContentElementWrapping
content = Neos.Neos:ContentCollectionRenderer {
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
}

prototype(Psmb.NodeTypes:Html) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Html'
content = ${node.properties.source}
@process.contentElementWrapping = ContentElementWrapping
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}

prototype(Psmb.NodeTypes:Images) < prototype(Neos.Fusion:Tag) {
attributes.class = 'Images'
content = ContentCollectionRenderer {
@process.contentElementWrapping = ContentElementWrapping
content = Neos.Neos:ContentCollectionRenderer {
@process.contentElementWrapping = Neos.Neos:ContentElementWrapping
}
}
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "neos-package",
"name": "psmb/nodetypes",
"require": {
"neos/neos": "~3.0",
"neos/neos": "^3.0 | ^4.0",
"flowpack/nodetemplates": "*",
"flowpack/structuredediting": "*"
},
Expand Down Expand Up @@ -80,7 +80,15 @@
"Neos.Neos-20161219094403",
"Neos.Neos-20161219122512",
"Neos.Fusion-20161219130100",
"Neos.Neos-20161220163741"
"Neos.Neos-20161220163741",
"Neos.Neos-20170115114620",
"Neos.Fusion-20170120013047",
"Neos.Flow-20170125103800",
"Neos.Seo-20170127154600",
"Neos.Flow-20170127183102",
"Neos.Fusion-20180211175500",
"Neos.Fusion-20180211184832",
"Neos.Flow-20180415105700"
]
}
}
}

0 comments on commit c453e44

Please sign in to comment.