@@ -87,6 +87,11 @@ export function ExternalLink({id, configuration, ...props}) {
8787
8888 const scaleCategorySuffix = scaleCategorySuffixes [ props . textSize || 'small' ] ;
8989
90+ const inlineFileRightsAfterCard = props . textPosition === 'right' ||
91+ props . textPosition === 'overlay' ||
92+ props . textPosition === 'none' ;
93+
94+ const inlineFileRightsItems = [ { file : thumbnailImageFile , label : 'image' } ] ;
9095 return (
9196 < li className = { classNames ( styles . item ,
9297 styles [ `textPosition-${ props . textPosition } ` ] ,
@@ -101,53 +106,66 @@ export function ExternalLink({id, configuration, ...props}) {
101106 href = { href }
102107 openInNewTab = { openInNewTab }
103108 onChange = { handleLinkChange } >
104- < div className = { classNames (
105- styles . card ,
106- styles [ `thumbnailSize-${ props . thumbnailSize } ` ]
107- ) } >
108- < div className = { styles . thumbnail } >
109- < Thumbnail imageFile = { thumbnailImageFile }
110- aspectRatio = { props . thumbnailAspectRatio }
111- cropPosition = { props . thumbnailCropPosition }
112- load = { props . loadImages } >
113- < InlineFileRights context = "insideElement" items = { [ { file : thumbnailImageFile , label : 'image' } ] } />
114- </ Thumbnail >
115- </ div >
116- < div className = { classNames ( styles . background ,
117- styles [ `align-${ configuration . textAlign } ` ] ,
118- props . darkBackground ? styles . light : styles . dark ) }
119- style = { { pointerEvents : ! isEditable || isSelected ? undefined : 'none' } } >
120- < InlineFileRights context = "afterElement" items = { [ { file : thumbnailImageFile , label : 'image' } ] } />
121- < div className = { styles . details } >
122- { presentOrEditing ( 'tagline' ) &&
123- < Text scaleCategory = { `teaserTagline-${ scaleCategorySuffix } ` } >
124- < EditableInlineText value = { itemTexts [ id ] ?. tagline }
125- placeholder = { t ( 'pageflow_scrolled.inline_editing.type_tagline' ) }
126- onChange = { value => handleTextChange ( 'tagline' , value ) } />
127- </ Text > }
128- < Text scaleCategory = { `teaserTitle-${ scaleCategorySuffix } ` } >
129- < EditableInlineText value = { itemTexts [ id ] ?. title || legacyTexts . title }
130- placeholder = { t ( 'pageflow_scrolled.inline_editing.type_heading' ) }
131- onChange = { value => handleTextChange ( 'title' , value ) } />
132- </ Text >
133- { presentOrEditing ( 'description' ) &&
134- < div className = { styles . link_desc } >
109+ < div className = { styles . cardWrapper } >
110+ < div className = { classNames (
111+ styles . card ,
112+ styles [ `thumbnailSize-${ props . thumbnailSize } ` ]
113+ ) } >
114+ < div className = { styles . thumbnail } >
115+ < Thumbnail imageFile = { thumbnailImageFile }
116+ aspectRatio = { props . thumbnailAspectRatio }
117+ cropPosition = { props . thumbnailCropPosition }
118+ load = { props . loadImages } >
119+ < InlineFileRights configuration = { configuration }
120+ context = "insideElement"
121+ position = { props . textPosition === 'overlay' ? 'top' : 'bottom' }
122+ items = { inlineFileRightsItems } />
123+ </ Thumbnail >
124+ </ div >
125+ < div className = { classNames ( styles . background ,
126+ styles [ `align-${ configuration . textAlign } ` ] ,
127+ props . darkBackground ? styles . light : styles . dark ) }
128+ style = { { pointerEvents : ! isEditable || isSelected ? undefined : 'none' } } >
129+ { ! inlineFileRightsAfterCard &&
130+ < InlineFileRights configuration = { configuration }
131+ context = "afterElement"
132+ items = { inlineFileRightsItems } /> }
133+ < div className = { styles . details } >
134+ { presentOrEditing ( 'tagline' ) &&
135+ < Text scaleCategory = { `teaserTagline-${ scaleCategorySuffix } ` } >
136+ < EditableInlineText value = { itemTexts [ id ] ?. tagline }
137+ placeholder = { t ( 'pageflow_scrolled.inline_editing.type_tagline' ) }
138+ onChange = { value => handleTextChange ( 'tagline' , value ) } />
139+ </ Text > }
140+ < Text scaleCategory = { `teaserTitle-${ scaleCategorySuffix } ` } >
141+ < EditableInlineText value = { itemTexts [ id ] ?. title || legacyTexts . title }
142+ placeholder = { t ( 'pageflow_scrolled.inline_editing.type_heading' ) }
143+ onChange = { value => handleTextChange ( 'title' , value ) } />
144+ </ Text >
145+ { presentOrEditing ( 'description' ) &&
135146 < EditableText value = { itemTexts [ id ] ?. description || legacyTexts . description }
136147 scaleCategory = { `teaserDescription-${ scaleCategorySuffix } ` }
137148 placeholder = { t ( 'pageflow_scrolled.inline_editing.type_text' ) }
138- onChange = { value => handleTextChange ( 'description' , value ) } />
139- </ div > }
140- { configuration . displayButtons && presentOrEditing ( 'link' ) &&
141- < LinkButton className = { styles . link }
142- href = { href }
143- openInNewTab = { openInNewTab }
144- value = { itemTexts [ id ] ?. link }
145- linkPreviewDisabled = { true }
146- actionButtonVisible = { false }
147- onTextChange = { value => handleTextChange ( 'link' , value ) }
148- onLinkChange = { value => handleLinkChange ( value ) } /> }
149+ onChange = { value => handleTextChange ( 'description' , value ) } /> }
150+ { configuration . displayButtons && presentOrEditing ( 'link' ) &&
151+ < div className = { styles . button } >
152+ < LinkButton href = { href }
153+ openInNewTab = { openInNewTab }
154+ value = { itemTexts [ id ] ?. link }
155+ linkPreviewDisabled = { true }
156+ actionButtonVisible = { false }
157+ onTextChange = { value => handleTextChange ( 'link' , value ) }
158+ onLinkChange = { value => handleLinkChange ( value ) } />
159+ </ div > }
160+ </ div >
149161 </ div >
150162 </ div >
163+ { inlineFileRightsAfterCard &&
164+ < div className = { styles . inlineFileRightsAfterCard } >
165+ < InlineFileRights configuration = { configuration }
166+ context = "afterElement"
167+ items = { inlineFileRightsItems } />
168+ </ div > }
151169 </ div >
152170 </ Link >
153171 </ li >
0 commit comments