Ensure teaser layout when not linked

This commit is contained in:
Björn Fromme
2022-03-08 15:52:38 +01:00
parent 06f7d4832a
commit 51496de05b
5 changed files with 120 additions and 114 deletions
@@ -5,29 +5,30 @@
<f:section name="Teaser"> <f:section name="Teaser">
<f:link.typolink parameter="{city.detailPage}" <f:link.typolink parameter="{city.detailPage}"
title="{city.name}" title="{city.name}">
class="flex flex-col"> <div class="flex flex-col">
<div class="relative"> <div class="relative">
<svg class="w-8 h-6 absolute top-0 left-0"> <svg class="w-8 h-6 absolute top-0 left-0">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{city.country.code -> f:format.case(mode: 'lower')}"></use> <use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{city.country.code -> f:format.case(mode: 'lower')}"></use>
</svg> </svg>
<ep:lazyLoadImage image="{city.teaserImage}" <ep:lazyLoadImage image="{city.teaserImage}"
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
class="block w-full h-full object-cover" class="block w-full h-full object-cover"
width="360c" width="360c"
height="270c" height="270c"
alt="{city.name}" /> alt="{city.name}" />
</div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200">
<span class="headline--3 mb-4">
{city.name}
</span>
{city.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</div> </div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200">
<span class="headline--3 mb-4">
{city.name}
</span>
{city.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</f:link.typolink> </f:link.typolink>
</f:section> </f:section>
@@ -5,25 +5,26 @@
<f:section name="Teaser"> <f:section name="Teaser">
<f:link.typolink parameter="{concept.detailPage}" <f:link.typolink parameter="{concept.detailPage}"
title="{concept.name}" title="{concept.name}">
class="flex flex-col"> <div class="flex flex-col">
<div class="relative"> <div class="relative">
<ep:lazyLoadImage image="{concept.teaserImage}" <ep:lazyLoadImage image="{concept.teaserImage}"
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
class="block w-full h-full object-cover" class="block w-full h-full object-cover"
width="360c" width="360c"
height="270c" height="270c"
alt="{concept.name}" /> alt="{concept.name}" />
<div class="absolute top-0 left-0 inset-0 bg-concept-{concept.code}-overlay"> <div class="absolute top-0 left-0 inset-0 bg-concept-{concept.code}-overlay">
<div class="flex h-full w-full p-4 items-end headline--3 text-white"> <div class="flex h-full w-full p-4 items-end headline--3 text-white">
{concept.name} {concept.name}
</div>
</div> </div>
</div> </div>
<div class="p-4 flex-1">
{concept.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<div class="bg-concept-{concept.code} h-1 w-20"></div>
</div> </div>
<div class="p-4 flex-1">
{concept.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<div class="bg-concept-{concept.code} h-1 w-20"></div>
</f:link.typolink> </f:link.typolink>
</f:section> </f:section>
@@ -5,39 +5,40 @@
<f:section name="Teaser"> <f:section name="Teaser">
<f:link.typolink parameter="{hotel.detailPage}" <f:link.typolink parameter="{hotel.detailPage}"
title="{hotel.name}" title="{hotel.name}">
class="flex flex-col"> <div class="flex flex-col">
<div class="relative"> <div class="relative">
<svg class="w-8 h-6 absolute top-0 left-0"> <svg class="w-8 h-6 absolute top-0 left-0">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{hotel.country.code -> f:format.case(mode: 'lower')}"></use> <use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{hotel.country.code -> f:format.case(mode: 'lower')}"></use>
</svg> </svg>
<ep:lazyLoadImage image="{hotel.images.original.0}" <ep:lazyLoadImage image="{hotel.images.original.0}"
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
class="block w-full h-full object-cover" class="block w-full h-full object-cover"
width="360c" width="360c"
height="270c" height="270c"
alt="{hotel.name}" /> alt="{hotel.name}" />
</div> </div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200"> <div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200">
<span class="headline--3 mb-4"> <span class="headline--3 mb-4">
{hotel.name -> f:format.nl2br()} {hotel.name -> f:format.nl2br()}
</span>
<f:if condition="{hotel.category}">
<span class="searchresult-item__category">
<strong>Kategorie</strong> {hotel.category}
</span> </span>
</f:if> <f:if condition="{hotel.category}">
{hotel.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()} <span class="searchresult-item__category">
<f:if condition="{hotel.available} != -1"> <strong>Kategorie</strong> {hotel.category}
<span class="teaserbox__price"> </span>
<strong>{f:if(condition: '{hotel.available} > 0', then: 'ab {hotel.minPrice} €', else: 'ausgebucht')}</strong> </f:if>
</span> {hotel.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</f:if> <f:if condition="{hotel.available} != -1">
<span class="teaserbox__price">
<strong>{f:if(condition: '{hotel.available} > 0', then: 'ab {hotel.minPrice} €', else: 'ausgebucht')}</strong>
</span>
</f:if>
</div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</div> </div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</f:link.typolink> </f:link.typolink>
</f:section> </f:section>
@@ -5,29 +5,30 @@
<f:section name="Teaser"> <f:section name="Teaser">
<f:link.typolink parameter="{region.detailPage}" <f:link.typolink parameter="{region.detailPage}"
title="{region.name}" title="{region.name}">
class="flex flex-col"> <div class="flex flex-col">
<div class="relative"> <div class="relative">
<svg class="w-8 h-6 absolute top-0 left-0"> <svg class="w-8 h-6 absolute top-0 left-0">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{region.country.code -> f:format.case(mode: 'lower')}"></use> <use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{region.country.code -> f:format.case(mode: 'lower')}"></use>
</svg> </svg>
<ep:lazyLoadImage image="{region.teaserImages.0}" <ep:lazyLoadImage image="{region.teaserImages.0}"
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
class="block w-full h-full object-cover" class="block w-full h-full object-cover"
width="360c" width="360c"
height="270c" height="270c"
alt="{region.name}" /> alt="{region.name}" />
</div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200" data-rte-content>
<span class="headline--3 mb-4">
{region.name}
</span>
{region.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</div> </div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200" data-rte-content>
<span class="headline--3 mb-4">
{region.name}
</span>
{region.teaser -> f:format.crop(maxCharacters: settings.teaserTextMaxChars) -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{f:translate(key: 'tx_eptheme.label.teaserbutton.default', extensionName: 'ep_theme')}
</button>
</f:link.typolink> </f:link.typolink>
</f:section> </f:section>
@@ -5,30 +5,32 @@
<f:section name="Teaser"> <f:section name="Teaser">
<f:link.typolink parameter="{data.header_link}" <f:link.typolink parameter="{data.header_link}"
class="flex flex-col group"> class="group">
<div class="relative"> <div class="flex flex-col">
<f:if condition="{context.country}"> <div class="relative">
<svg class="w-8 h-6 absolute top-0 left-0"> <f:if condition="{context.country}">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{context.country.code -> f:format.case(mode: 'lower')}"></use> <svg class="w-8 h-6 absolute top-0 left-0">
</svg> <use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{context.country.code -> f:format.case(mode: 'lower')}"></use>
</f:if> </svg>
<ep:lazyLoadImage image="{teaserImage}" </f:if>
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" <ep:lazyLoadImage image="{teaserImage}"
class="block w-full h-full object-cover" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
width="360c" class="block w-full h-full object-cover"
height="270c" width="360c"
alt="{teaserImage.alternative}" /> height="270c"
alt="{teaserImage.alternative}" />
</div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200" data-rte-content>
<span class="headline--3 mb-4">
{data.header -> f:format.nl2br()}{f:if(condition: data.subheader, then: '<br>{data.subheader}')}
</span>
{data.bodytext -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{data.button -> v:or(alternative: 'Details')}
</button>
</div> </div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200" data-rte-content>
<span class="headline--3 mb-4">
{data.header -> f:format.nl2br()}{f:if(condition: data.subheader, then: '<br>{data.subheader}')}
</span>
{data.bodytext -> f:format.html()}
</div>
<button type="button"
class="button w-full">
{data.button -> v:or(alternative: 'Details')}
</button>
</f:link.typolink> </f:link.typolink>
</f:section> </f:section>