Skip to content

Commit

Permalink
✨ Support for imported Images
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Apr 7, 2020
1 parent 5d3fd1c commit 7be669b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions Configuration/NodeTypes.Mixin.VideoID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'Jonnitto.PrettyEmbedHelper:Mixin.Metadata.Title': true
'Jonnitto.PrettyEmbedHelper:Mixin.Metadata.Ratio': true
'Jonnitto.PrettyEmbedHelper:Mixin.Metadata.Image': true
'Jonnitto.PrettyEmbedHelper:Mixin.Metadata.Thumbnail': true
properties:
videoID:
type: string
Expand Down
7 changes: 4 additions & 3 deletions Resources/Private/Fusion/Content/Vimeo.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ prototype(Jonnitto.PrettyEmbedVimeo:Content.Vimeo) < prototype(Jonnitto.PrettyEm

alternativeText = ${q(node).property('metadataTitle')}
imageFromVimeo = ${q(node).property('metadataImage')}
thumbnailFromResources = ${q(node).property('metadataThumbnail')}
ratio = ${q(node).property('metadataRatio')}
maximumWidth = ${Configuration.setting('Jonnitto.PrettyEmbedHelper.maximumWidth')}
async = true
Expand Down Expand Up @@ -46,9 +47,9 @@ prototype(Jonnitto.PrettyEmbedVimeo:Content.Vimeo) < prototype(Jonnitto.PrettyEm
@apply.props = ${props}
poster = Neos.Fusion:Case {
hasPersisantResource {
condition = ${props.image}
condition = ${props.image || props.thumbnailFromResources}
renderer = Neos.Neos:ImageUri {
asset = ${props.image}
asset = ${props.image || props.thumbnailFromResources}
async = ${props.async}
maximumWidth = ${props.maximumWidth}
}
Expand All @@ -63,7 +64,7 @@ prototype(Jonnitto.PrettyEmbedVimeo:Content.Vimeo) < prototype(Jonnitto.PrettyEm
hasAsset = ${this.asset}
hasEnoughPixel = ${this.asset.width >= props.maximumWidth * 2}
}
asset = ${props.image}
asset = ${props.image || props.thumbnailFromResources}
async = ${props.async}
maximumWidth = ${props.maximumWidth * 2}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
],
"require": {
"jonnitto/prettyembedhelper": "^2.1"
"jonnitto/prettyembedhelper": "^2.2"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 7be669b

Please sign in to comment.