Streamline teasergroup rendering

This commit is contained in:
Björn Fromme
2022-03-14 17:53:56 +01:00
parent f958f50b24
commit ccbcb16818
2 changed files with 45 additions and 22 deletions
@@ -209,7 +209,7 @@ page {
page.bodyTagCObject.value = <body class="antialiased text-gray-800 font-sans bg-white p-4">
[end]
[like(request.getHttpUserAgent(), "*Googlebot*")]
[like(request.getNormalizedParams().getHttpUserAgent(), "*Googlebot*")]
page.headerData.998 >
page.headerData.999 >
[end]
@@ -26,27 +26,50 @@
<div class="col-span-3 lg:col-span-2">
<f:render partial="City/Details" arguments="{city: city}"/>
<f:if condition="{teasers}">
<div class="flex flex-col space-y-4 md:space-y-8">
<f:for each="{teasers}" as="teaser" iteration="iteration">
<f:render partial="Product/Teaser" section="Teaser" arguments="{
concept: teaser.concept,
hotel: teaser.hotel,
product: teaser.product,
country: teaser.country,
region: teaser.region,
productImage: teaser.product.images.original.0,
nights: teaser.nights,
board: teaser.board,
minPrice: teaser.minPrice,
daytrip: teaser.daytrip,
season: teaser.season,
forceHotelUid: teaser.forceHotelUid,
dateFrom: dateFrom,
dateTo: dateTo,
landscape: 1,
index: iteration.index
}"/>
</f:for>
<a id="teasers" class="anchor"></a>
<div class="bg-gray-50 p-4 mb-4"
data-controller="teasergrid"
data-teasergrid-grid-class="grid-cols-2"
data-teasergrid-disabled-value="false">
<div class="flex items-center space-x-1 mb-2 sm:hidden">
<button type="button"
class="opacity-50"
data-action="teasergrid#grid"
data-teasergrid-target="button">
<svg class="w-5 h-5 text-ep-primary">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-teaser-grid"></use>
</svg>
</button>
<button type="button"
data-action="teasergrid#block"
data-teasergrid-target="button">
<svg class="w-5 h-5 text-ep-primary">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-teaser-single"></use>
</svg>
</button>
</div>
<div class="grid grid-cols-2 xl:grid-cols-3 gap-4 md:gap-8"
data-teasergrid-target="container">
<f:for each="{teasers}" as="teaser" iteration="iteration">
<f:render partial="Product/Teaser" section="Teaser" arguments="{
concept: teaser.concept,
hotel: teaser.hotel,
product: teaser.product,
country: teaser.country,
region: teaser.region,
productImage: teaser.product.images.original.0,
nights: teaser.nights,
board: teaser.board,
minPrice: teaser.minPrice,
daytrip: teaser.daytrip,
season: teaser.season,
forceHotelUid: teaser.forceHotelUid,
dateFrom: dateFrom,
dateTo: dateTo,
index: iteration.index
}"/>
</f:for>
</div>
</div>
<f:if condition="{settings.showMoreLink}">
<f:link.action pageUid="{settings.defaultStaticSearchPageUid}" class="button my-8"