<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:sms="http://typo3.org/ns/Sitegeist/SmsResponsiveImages/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default"/>

<f:section name="Header"/>

<f:section name="Main">
    <f:switch expression="{data.layout}">
        <f:case value="3">
            <f:render section="newslink" arguments="{_all}"/>
        </f:case>
        <f:defaultCase>
            <f:render section="fsc-default" arguments="{_all}"/>
        </f:defaultCase>
    </f:switch>
</f:section>

<f:section name="newslink">
    <article class="news-item">
        <f:link.typolink parameter="{data.header_link}">
            <div class="news-text">
                <div class="header">
                    <h3>{data.header}</h3>
                </div>
                <div class="teaser-text">
                    <div class="bodytext">
                        <f:format.raw>{data.bodytext}</f:format.raw>
                    </div>
                    <span class="more">
                        <f:translate key="LLL:EXT:seragwiessner_sitepackage/Resources/Private/Language/locallang.xlf:readmore" />
                        <span class="icon icon-right-open" />
                    </span>
                </div>
                <div class="news-image">
                    <f:if condition="{files}">
                        <sms:image image="{files.0}" srcset="410,615,820" width="410" loading="lazy" class="img-fluid" />
                    </f:if>
                </div>
            </div>
        </f:link.typolink>
    </article>
</f:section>

<f:section name="fsc-default">
    <div class="ce-textpic ce-{gallery.position.horizontal} ce-{gallery.position.vertical}{f:if(condition: gallery.position.noWrap, then: ' ce-nowrap')}">
        <f:if condition="{data.header}">
            <f:render partial="Header/All" arguments="{_all}"/>
        </f:if>
        <f:if condition="{data.bodytext}">
            <div class="ce-bodytext">
                <f:format.html>{data.bodytext}</f:format.html>
            </div>
        </f:if>

        <f:render partial="Media/Gallery" arguments="{_all}"/>
    </div>
</f:section>

</html>
