{namespace neos=Neos\Neos\ViewHelpers}

<f:if condition="{node.parent.parent.nodetype} == 'Newland.CityTheme:Container'">
    <section class="o-container o-container--sm">
</f:if>

<f:section name="imageRendering">
<figure class="c-image-text {f:if(condition:'{isInverted} == true', then:'c-image-text--inverted')} {marginTop} ">
     <div class="c-image-text__image-wrapper">
    <noscript>
        <media:image image="{image}"
                     alt="{alternativeText}"
                     width="{width}"
                     maximumWidth="{maximumWidth}"
                     height="{height}"
                     maximumHeight="{maximumHeight}"
                     allowUpScaling="{allowUpScaling}"
                     allowCropping="{allowCropping}"
                     class="c-image__image" />

    </noscript>

    <img data-src="{media:uri.image(image: image, allowCropping: allowCropping, allowUpScaling: allowUpScaling, height: height, maximumHeight: 248, maximumWidth: 248)}"
         class="c-image__image lazyload"
         alt="{alternativeText}" />

    <f:render partial="Copyright" arguments="{_all}"></f:render>
    </div>
    <figcaption class="{f:if(condition: imageFontColorOverwrite, then: imageFontColorOverwrite)}">
        <neos:contentElement.editable property="title" class="c-image-text__title" tag="h3" />
        <neos:contentElement.editable property="text" tag="p" />

        <f:if condition="{link}">
            <a class="c-button c-button--soft-rounded {buttonColor}" href="{link}"
            {f:if(condition: openLinkInNewWindow, then: 'target="_blank" rel="noopener noreferrer"')}>
                {linkTitle}
            </a>
        </f:if>
    </figcaption>
</figure>

<f:if condition="{node.parent.parent.nodetype} == 'Newland.CityTheme:Container'">
    </section>
</f:if>