<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
      xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
      xmlns:sms="http://typo3.org/ns/SMS/SmsResponsiveImages/ViewHelpers"
      data-namespace-typo3-fluid="true">


<n:excludeDisplayedNews newsItem="{newsItem}"/>
<div class="card card-newsteaser card-newsteaser--large card-horizontal">
    <f:if condition="{newsItem.mediaNonPreviews.0}">
        <f:then>
            <n:link class="card-img" newsItem="{newsItem}" settings="{settings}" title="{newsItem.title}">

                <sms:media file="{newsItem.mediaPreviews.0}" class="img-cover" cropVariant="default" srcset="1x, 2x" placeholderSize="100" title="{newsItem.mediaPreviews.0.title}" alt="{newsItem.mediaPreviews.0.alternative}" width="437"/>
            </n:link>
        </f:then>
        <f:else>
            <f:if condition="{settings.displayDummyIfNoMedia}">
                <n:link class="card-img" newsItem="{newsItem}" settings="{settings}" title="{newsItem.title}">
                    <f:image class="img-dummy img-cover" src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
                </n:link>
            </f:if>
        </f:else>
    </f:if>


    <div class="card-body articletype-{newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}" itemscope="itemscope" itemtype="http://schema.org/Article">
        <h3 itemprop="headline">
            <n:link newsItem="{newsItem}" settings="{settings}" title="{newsItem.title}">
                {newsItem.title}
            </n:link>
        </h3>
        <f:comment>
            <f:render partial="General/AdditionalInformation" arguments="{settings:settings,newsItem:newsItem}"/>
        </f:comment>
        <!-- teaser -->
        <n:removeMediaTags>
            <f:if condition="{newsItem.teaser}">
                <f:then>
                    <div itemprop="description">
                        {newsItem.teaser -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()}
                    </div>
                </f:then>
                <f:comment>
                    <f:else>
                        {newsItem.bodytext -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()}
                    </f:else>
                </f:comment>
            </f:if>
        </n:removeMediaTags>
        <p><br/>
            <n:link newsItem="{newsItem}" settings="{settings}" class="card-link" title="{newsItem.title}">
                <f:translate key="more-link"/>
            </n:link>
        </p>
    </div>

</div>
</html>
