-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a54b57c
commit 60476f4
Showing
3 changed files
with
8 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,17 +127,15 @@ prototype(Sitegeist.Kaleidoscope:Image) < prototype(Neos.Fusion:Component) { | |
quality = null | ||
attributes = Neos.Fusion:DataStructure | ||
renderDimensionAttributes = true | ||
preserveAspect = true | ||
|
||
renderer = Neos.Fusion:Component { | ||
@if.hasImageSource = ${props.imageSource && Type.instance(props.imageSource, '\\Sitegeist\\Kaleidoscope\\Domain\\ImageSourceInterface')} | ||
isScalableSource = ${props.imageSource && Type.instance(props.imageSource, '\\Sitegeist\\Kaleidoscope\\Domain\\ScalableImageSourceInterface')} | ||
|
||
# apply format, width and height to the imageSource | ||
imageSource = ${props.imageSource} | ||
[email protected] = ${(props.width && props.height) ? value.withDimensions(props.width, props.height) : value} | ||
[email protected] = ${(props.width && !props.height) ? value.withWidth(props.width, props.preserveAspect) : value} | ||
[email protected] = ${(props.height && !props.width) ? value.withHeight(props.height, props.preserveAspect) : value} | ||
[email protected] = ${props.width ? value.withWidth(props.width) : value} | ||
[email protected] = ${props.height ? value.withHeight(props.height) : value} | ||
[email protected] = ${props.format ? value.withFormat(props.format) : value} | ||
[email protected] = ${props.quality ? value.withQuality(props.quality) : value} | ||
|
||
|
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 |
---|---|---|
|
@@ -65,7 +65,6 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) { | |
imgAttributes = Neos.Fusion:DataStructure | ||
content = '' | ||
renderDimensionAttributes = true | ||
preserveAspect = true | ||
|
||
# | ||
# put the values that shall be applied to sources automatically to the context | ||
|
@@ -86,10 +85,9 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) { | |
|
||
# apply format, width and height to the imageSource | ||
imageSource = ${props.imageSource} | ||
[email protected] = ${(props.width && props.height) ? value.withDimensions(props.width, props.height) : value} | ||
[email protected] = ${(props.width && !props.height) ? value.withWidth(props.width, props.preserveAspect) : value} | ||
[email protected] = ${(props.height && !props.width) ? value.withHeight(props.height, props.preserveAspect) : value} | ||
[email protected] = ${props.format ? value.withFormat(props.format) : value} | ||
[email protected] = ${props.width ? value.setWidth(props.width) : value} | ||
[email protected] = ${props.height ? value.setHeight(props.height) : value} | ||
[email protected] = ${props.format ? value.setFormat(props.format) : value} | ||
[email protected] = ${props.quality ? value.setQuality(props.quality) : value} | ||
|
||
srcset = ${props.srcset} | ||
|
@@ -104,7 +102,6 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) { | |
imgAttributes = ${props.imgAttributes} | ||
content = ${props.content} | ||
renderDimensionAttributes = ${props.renderDimensionAttributes} | ||
preserveAspect = ${props.preserveAspect} | ||
|
||
renderer = afx` | ||
<picture class={props.class} {...props.attributes}> | ||
|
@@ -121,7 +118,6 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) { | |
srcset={source.srcset ? source.srcset : props.srcset} | ||
sizes={source.sizes ? source.sizes : props.sizes} | ||
renderDimensionAttributes={props.renderDimensionAttributes} | ||
preserveAspect={props.preserveAspect} | ||
/> | ||
</Neos.Fusion:Loop> | ||
<Neos.Fusion:Loop | ||
|
@@ -143,7 +139,6 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) { | |
title={props.title} | ||
attributes={props.imgAttributes} | ||
renderDimensionAttributes={props.renderDimensionAttributes} | ||
preserveAspect={props.preserveAspect} | ||
/> | ||
</picture> | ||
` | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,6 @@ prototype(Sitegeist.Kaleidoscope:Source) < prototype(Neos.Fusion:Component) { | |
type = null | ||
media = null | ||
renderDimensionAttributes = true | ||
preserveAspect = true | ||
|
||
renderer = Neos.Fusion:Component { | ||
|
||
|
@@ -32,10 +31,9 @@ prototype(Sitegeist.Kaleidoscope:Source) < prototype(Neos.Fusion:Component) { | |
isScalableSource = ${imageSource && Type.instance(imageSource, '\\Sitegeist\\Kaleidoscope\\Domain\\ScalableImageSourceInterface')} | ||
|
||
imageSource = ${imageSource} | ||
[email protected] = ${(props.width && props.height) ? value.withDimensions(props.width, props.height) : value} | ||
[email protected] = ${(props.width && !props.height) ? value.withWidth(props.width, props.preserveAspect) : value} | ||
[email protected] = ${(props.height && !props.width) ? value.withHeight(props.height, props.preserveAspect) : value} | ||
[email protected] = ${props.format ? value.withFormat(props.format) : value} | ||
[email protected] = ${width ? value.withWidth(width) : value} | ||
[email protected] = ${height ? value.withHeight(height) : value} | ||
[email protected] = ${format ? value.withFormat(format) : value} | ||
[email protected] = ${quality ? value.withQuality(quality) : value} | ||
|
||
type = ${format ? 'image/' + format : props.type} | ||
|