fix: correct icon rendering on offer page
This commit is contained in:
@@ -108,21 +108,43 @@
|
||||
data-toggle-target="icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 256 256">
|
||||
<rect width="256" height="256" fill="none"/>
|
||||
<polyline points="208 96 128 176 48 96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
||||
<rect width="256" height="256" fill="none"></rect>
|
||||
<polyline points="208 96 128 176 48 96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="rte-content" data-toggle-target="content">
|
||||
{% set icons = ctx.hotelCmsData.icons %}
|
||||
{% set iconMap = {
|
||||
bedsCount: { icon: 'bed', label: 'Anzahl Betten' },
|
||||
parkingCount: { icon: 'parking', label: 'Anzahl Parkplätze' },
|
||||
altitude: { icon: 'mountain', label: 'Höhe' },
|
||||
partyroom: { icon: 'party', label: 'Partyraum' },
|
||||
gamesroom: { icon: 'dice', label: 'Spieleraum' },
|
||||
distanceBus: { icon: 'bus', label: 'Entfernung Bus' },
|
||||
distanceLift: { icon: 'lift', label: 'Entfernung Lifte' },
|
||||
sauna: { icon: 'sauna', label: 'Sauna' },
|
||||
shower: { icon: 'shower', label: 'Dusche' },
|
||||
wifi: { icon: 'wifi', label: 'WiFi' },
|
||||
} %}
|
||||
{% if icons is not empty %}
|
||||
<ul class="grid grid-cols-2 md:grid-cols-3 gap-2">
|
||||
{% for icon, label in icons %}
|
||||
{% for key, value in icons %}
|
||||
{% set mapping = iconMap[key] ?? null %}
|
||||
{% set isBool = value is same as(true) or value is same as(false) %}
|
||||
<li class="flex items-center gap-2">
|
||||
<div class="border-2 border-gray-900 rounded-full w-16 h-16 flex flex-col items-center justify-center">
|
||||
{{ icon(icon, 'w-8 h-8 shrink-0 text-gray-900') }}
|
||||
<div class="border-2 border-gray-900 rounded-full w-16 h-16 shrink-0 flex flex-col items-center justify-center">
|
||||
{% if mapping %}
|
||||
{{ icon(mapping.icon, 'w-8 h-8 shrink-0 text-gray-900') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-sm font-bold">
|
||||
{% if isBool %}
|
||||
{{ mapping ? mapping.label : '' }}
|
||||
{% else %}
|
||||
{{ mapping ? mapping.label ~ ': ' ~ value : value }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ label }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -130,20 +152,26 @@
|
||||
|
||||
{{ ctx.hotelCmsData.description | raw }}
|
||||
|
||||
<h2>
|
||||
Details zur Unterkunft
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.features | raw }}
|
||||
{% if ctx.hotelCmsData.features|striptags|trim is not empty %}
|
||||
<h2>
|
||||
Details zur Unterkunft
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.features | raw }}
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
Die Zimmer
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.roomTypes | raw }}
|
||||
{% if ctx.hotelCmsData.roomTypes|striptags|trim is not empty %}
|
||||
<h2>
|
||||
Die Zimmer
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.roomTypes | raw }}
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
Weitere Infos
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.additionalInformation | raw }}
|
||||
{% if ctx.hotelCmsData.additionalInformation|striptags|trim is not empty %}
|
||||
<h2>
|
||||
Weitere Infos
|
||||
</h2>
|
||||
{{ ctx.hotelCmsData.additionalInformation | raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -164,8 +192,8 @@
|
||||
data-toggle-target="icon"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 256 256">
|
||||
<rect width="256" height="256" fill="none"/>
|
||||
<polyline points="208 96 128 176 48 96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
||||
<rect width="256" height="256" fill="none"></rect>
|
||||
<polyline points="208 96 128 176 48 96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user