-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.fusion
31 lines (29 loc) · 979 Bytes
/
Image.fusion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
prototype(Garagist.Mjml:Presentation.Image) < prototype(Neos.Fusion:Component) {
@propTypes {
carousel = ${PropTypes.boolean}
}
image = Neos.Fusion:DataStructure {
# Properties from Neos.Neos:ImageUri
assset = null
}
thumbnail = Neos.Fusion:DataStructure {
# Only used if carousel is true
# Properties from Neos.Neos:ImageUri
assset = null
}
carousel = false
renderer = Neos.Fusion:Tag {
tagName = ${props.carousel ? 'mj-carousel-image' : 'mj-image'}
attributes {
@ignoreProperties = ${['carousel', 'image', 'thumbnail']}
@apply.props = ${props}
thumbnails-src = Neos.Neos:ImageUri {
@if.isCarousel = ${props.carousel && props.thumbnail.asset}
@apply.thumbnail = ${props.thumbnail}
}
src = Neos.Neos:ImageUri {
@apply.image = ${props.image}
}
}
}
}