{% extends 'layout/app.html.twig' %}
{% block PAGE_CSS %}
{% endblock %}
{% block CONTENT_MID %}
<div class="bg-white">
<div class="pt-4 max-w-7xl mx-auto lg:flex items-center justify-between space-y-2 lg:space-y-0 lg:space-x-2 px-4 sm:px-6 lg:px-8">
<ol role="list" class="max-w-3xl flex items-center space-x-2">
<li>
<div class="flex items-center">
<a href="{{ navStartNode }}/" class="mr-2 text-sm font-medium text-gray-900">Home</a>
<svg width="16" height="20" viewBox="0 0 16 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="h-5 w-4 text-gray-300">
<path d="M5.697 4.34L8.98 16.532h1.327L7.025 4.341H5.697z" />
</svg>
</div>
</li>
<li>
<div class="flex items-center">
<a href="{{ navStartNode }}/" class="mr-2 text-sm font-medium text-gray-900">{{ 'Produkte' | trans }}</a>
<svg width="16" height="20" viewBox="0 0 16 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="h-5 w-4 text-gray-300">
<path d="M5.697 4.34L8.98 16.532h1.327L7.025 4.341H5.697z" />
</svg>
</div>
</li>
<li class="text-sm">
<a href="{{ product.slug is defined ? product.slug : '#' }}" aria-current="page" class="font-medium text-brand-600 hover:text-gray-600">{{ product.name is defined ? product.name : '' }}</a>
</li>
</ol>
</div>
<div class="mx-auto max-w-2xl pb-16 px-4 sm:pb-24 sm:px-6 lg:max-w-7xl lg:px-8 pt-4 space-y-8">
<div class="lg:grid lg:grid-cols-2 lg:items-start lg:gap-x-8">
<!-- Image gallery -->
<div class="flex flex-1 flex-col" x-data="{ showTab: 1 }">
<!-- Image selector -->
<div class="aspect-w-1 aspect-h-1 w-full bg-gray-100 rounded-lg">
<!-- Tab panel, show/hide based on tab state. -->
<div x-cloak x-show="showTab === 1" class="flex justify-center items-center" id="tabs-1-panel-1" aria-labelledby="tabs-1-tab-1" role="tabpanel" tabindex="0">
{{ (product.mainImage is not empty ? product.mainImage.thumbnail('productThumbnail').html : pimcore_asset_by_path('/System/missing.png').thumbnail('productThumbnail').html ) | raw }}
{% if product.discontinued %}
<span class="absolute top-2 right-2 bg-brand-600 text-center text-white text-xs rounded-full px-2 py-1">Auslaufartikel</span>
{% endif %}
</div>
{% for key, otherImage in product.otherImages %}
<div x-cloak x-show="showTab === {{ key+2 }}" class="flex justify-center items-center" id="tabs-1-panel-{{ key+2 }}" aria-labelledby="tabs-1-tab-{{ key+2 }}" role="tabpanel" tabindex="0">
{{ otherImage.thumbnail('productThumbnail').html | raw }}
{% if product.discontinued %}
<span class="absolute top-2 right-2 bg-brand-600 text-center text-white text-xs rounded-full px-2 py-1">Auslaufartikel</span>
{% endif %}
</div>
{% endfor %}
{% for key, detailImage in product.detailView %}
<div x-cloak x-show="showTab === {{ key+50 }}" class="flex justify-center items-center" id="tabs-1-panel-{{ key+50 }}" aria-labelledby="tabs-1-tab-{{ key+50 }}" role="tabpanel" tabindex="0">
{{ detailImage.thumbnail('productThumbnail').html | raw }}
{% if product.discontinued %}
<span class="absolute top-2 right-2 bg-brand-600 text-center text-white text-xs rounded-full px-2 py-1">Auslaufartikel</span>
{% endif %}
</div>
{% endfor %}
</div>
<div class="mx-auto mt-6 w-full max-w-2xl lg:max-w-none relative"
x-data="{start: true, end: false}">
<div class="grid auto-cols-[25%] grid-flow-col gap-6 overflow-x-auto py-2"
x-ref="slider" x-on:scroll.debounce="$refs.slider.scrollLeft == 0 ? start = true : start = false; Math.abs(($refs.slider.scrollWidth - $refs.slider.offsetWidth) - $refs.slider.scrollLeft) < 5 ? end = true : end = false;"
aria-orientation="horizontal" role="tablist">
<button x-on:click="showTab = 1" class="relative flex items-center justify-center h-32 bg-gray-100 hover:bg-gray-50 border-2 focus:outline-none rounded-md cursor-pointer select-none transition ease duration-300" :class="{'border-brand-500': showTab === 1, 'border-transparent': showTab !== 1}" aria-controls="tabs-1-panel-1" role="tab" type="button">
<span class="sr-only">Main Product Image</span>
<span class="absolute flex inset-0 overflow-hidden rounded-md">
{{ (product.mainImage is not empty ? product.mainImage.thumbnail('productThumbnail').html : pimcore_asset_by_path('/System/missing.png').thumbnail('productThumbnail').html ) | raw }}
</span>
</button>
{% for key, otherImage in product.otherImages %}
<button x-on:click="showTab = {{ key+2 }}" class="relative flex items-center justify-center h-32 bg-gray-100 hover:bg-gray-50 border-2 focus:outline-none rounded-md cursor-pointer select-none transition ease duration-300" :class="{'border-brand-500': showTab === {{ key+2 }}, 'border-transparent': showTab !== {{ key+2 }}}" aria-controls="tabs-1-panel-{{ key+2 }}" role="tab" type="button">
<span class="sr-only">Additional Product Image</span>
<span class="absolute flex inset-0 overflow-hidden rounded-md">
{{ otherImage.thumbnail('productThumbnail').html | raw }}
</span>
</button>
{% endfor %}
{% for key, detailImage in product.detailView %}
<button x-on:click="showTab = {{ key+50 }}" class="relative flex items-center justify-center h-32 bg-gray-100 hover:bg-gray-50 border-2 focus:outline-none rounded-md cursor-pointer select-none transition ease duration-300" :class="{'border-brand-500': showTab === {{ key+50 }}, 'border-transparent': showTab !== {{ key+50 }}}" aria-controls="tabs-1-panel-{{ key+50 }}" role="tab" type="button">
<span class="sr-only">Additional Product Image</span>
<span class="absolute flex inset-0 overflow-hidden rounded-md">
{{ detailImage.thumbnail('productThumbnail').html | raw }}
</span>
</button>
{% endfor %}
</div>
{% if(1 + (product.otherImages|length) + (product.detailView|length) >= 4) %}
<button class="absolute top-14 left-[-20px]" x-on:click="$refs.slider.scrollBy({left: $refs.slider.offsetWidth * -1, behavior: 'smooth'});" x-bind:class="start ? '' : 'slider__nav__button--active'">
<span class="hidden sm:inline-flex justify-center items-center rounded-full w-10 h-10 bg-gray-100 group-hover:bg-brand/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-none">
<svg class="w-5 h-5 text-brand sm:w-6 sm:h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path></svg>
<span class="hidden">Previous</span>
</span>
</button>
<button class="absolute top-14 right-[-20px]" x-on:click="$refs.slider.scrollBy({left: $refs.slider.offsetWidth, behavior: 'smooth'});" x-bind:class="end ? '' : 'slider__nav__button--active'">
<span class="hidden sm:inline-flex justify-center items-center rounded-full w-10 h-10 bg-gray-100 group-hover:bg-brand/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-none">
<svg class="w-5 h-5 sm:w-6 sm:h-6 text-brand" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
<span class="hidden">Next</span>
</span>
</button>
{% endif %}
</div>
</div>
<!-- Product info -->
<div class="mt-10 px-4 sm:mt-16 sm:px-0 lg:mt-0 space-y-6">
<h1 class="text-3xl font-bold text-gray-900 tracking-tight">{{ product.name is defined ? product.name : '' }}</h1>
{% if product.brandImage is not empty %}
<img class="float-right max-h-16" src="{{ product.brandImage.thumbnail({'width': 128}).path }}">
{% endif %}
<div class="space-y-3">
{% if product.manufacturer is not empty %}
<div>
<div class="flex items-center space-x-1.5 text-sm">
<p>{{ 'manufacturer'|trans }}:</p>
<p class="font-semibold">{{ product.manufacturer }}</p>
</div>
</div>
{% endif %}
<div class="grid grid-cols-1 md:grid-cols-2 gap-y-2 md:gap-x-6 text-sm">
{% if product.group is not empty %}
<div class="flex items-center space-x-1.5">
<p>{{ 'product group' | trans }}:</p>
<div class="flex" style="max-width: 9rem">
<span class="text-white text-sm rounded-r-full pl-4 pr-8 py-1 w-fit" style="background-color: {{ product.group.color | slice(0,7) }};">{{ product.group.name }}</span>
</div>
</div>
{% endif %}
{% if product.code is not empty %}
<div class="flex items-center space-x-1.5">
<p>{{ 'general.filter.code' | trans }}:</p>
<p class="font-semibold">{{ product.code }}</p>
</div>
{% endif %}
{% if product.availableColors is not empty %}
<div class="flex items-center space-x-1.5">
<p>{{ 'color' | trans }}:</p>
<p class="font-semibold">{{ product.availableColors|map(feature => feature)|join(', ') | raw }}</p>
</div>
{% endif %}
</div>
</div>
{% if product.normPictograms|length > 0 %}
<div>
<div class="grid lg:grid-cols-4 grid-cols-2 gap-4">
{% for pictogram in product.normPictograms %}
<div class="flex flex-col items-center">
<img width="48" src="{{ pictogram.pictogram.thumbnail('icon-64x64').path }}">
<span class="text-xs text-gray-500 text-center font-bold">{{ pictogram.normName|raw }}</span>
<span class="text-xs text-gray-500 text-center">{{ pictogram.additionalInfo }}</span>
</div>
{% endfor %}
</div>
<p class="text-gray-500 text-sm mt-1">Weitere Informationen finden Sie <a class="text-brand" href="https://hugo-josten.de/service/wissenswertes/359-normenuebersicht">hier</a></p>
</div>
{% endif %}
<div class="space-y-1">
<h2 class="text-lg font-semibold text-gray-900">{{ 'description' | trans }}</h2>
<div class="prose prose-base text-gray-500">
<p class="leading-6">
{{ product.shortDescription | raw }}
</p>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12">
<div class="space-y-6">
<dl class="p-6 bg-gray-50 rounded-lg space-y-4">
<h2 class="text-lg font-semibold text-gray-900">{{ 'description' | trans }}</h2>
<div class="space-y-2 text-sm">
{% for property in [
"manufacturer",
"group",
"code",
"availableColorsWithCode",
"clothingType",
"sizeRange",
"specialities",
"ceMark",
"norms",
"procedureEN_ISO",
"codeEN_ISO",
"typeEN_ISO",
"safetyClassEN_ISO",
"discontinued",
] %}
{% if product[property]|length > 0 %}
<div class="grid grid-cols-2 gap-4">
<dt class="font-semibold">{{ ('general.filter.' ~ property) | trans }}</dt>
{% if property == "group" %}
<dd class="mt-1 sm:mt-0">{{ product.group.name }}</dd>
{% elseif product[property] is iterable %}
<dd class="mt-1 sm:mt-0">{{ product[property]|map(feature => feature)|join('<br>') | raw }}</dd>
{% else %}
<dd class="mt-1 sm:mt-0">{{ product[property] }}</dd>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
</dl>
{% if product.productMaterial %}
<dl class="p-6 bg-gray-50 rounded-lg space-y-4">
<h2 class="text-lg font-semibold text-gray-900">{{ 'Material' | trans }}</h2>
<div class="space-y-2 text-sm">
{% for property in [
"strength",
"fabricQuality",
"cotton",
"polyester",
"polyamid",
"polyacryl",
"elasthan",
"guidelines",
"protex",
"bio_cotton",
"cotton_carbon",
"pan",
"recycled_polyester",
"carbon",
] %}
{% if product.productMaterial[property]|length > 0 and product.productMaterial[property] > 0 %}
<div class="grid grid-cols-2 gap-4">
<dt class="font-semibold">{{ ('general.filter.' ~ property) | trans }}</dt>
{% if product.productMaterial[property] is iterable %}
<dd class="mt-1 sm:mt-0">{{ product.productMaterial[property]|map(feature => feature)|join('<br>') | raw }}</dd>
{% else %}
<dd class="mt-1 sm:mt-0">{{ product.productMaterial[property] }}</dd>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
</dl>
{% endif %}
</div>
<div class="space-y-6">
{% if product.productDatasheet|length > 0 or
product.mainImage|length > 0 or
product.otherImages|length > 0 or
product.detailView|length > 0 %}
<div class="p-6 bg-gray-50 rounded-lg space-y-4">
<h2 class="text-lg font-semibold text-gray-900">{{ 'download media' | lower | trans }}</h2>
{% if product.productDatasheet|length > 0 %}
<div class="space-y-1">
<p class="text-sm font-semibold">{{ 'productdatasheet' | lower | trans }}:</p>
<ul role="list" class="divide-y divide-gray-200 rounded-md border border-gray-200">
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ product.productDatasheet.filename }}</span>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ product.productDatasheet.fullpath }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
</ul>
</div>
{% endif %}
{% if product.sizeTable|length > 0 %}
<div class="space-y-1">
<p class="text-sm font-semibold">{{ 'Größentabelle' | trans }}:</p>
<ul role="list" class="divide-y divide-gray-200 rounded-md border border-gray-200">
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ product.sizeTable.filename }}</span>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ product.sizeTable.fullpath }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
</ul>
</div>
{% endif %}
{% if product.mainImage|length > 0 or
product.otherImages|length > 0 or
product.detailView|length > 0
%}
<div class="space-y-1">
<p class="text-sm font-semibold">{{ 'productImages' | lower | trans }}:</p>
<ul role="list" class="divide-y divide-gray-200 rounded-md border border-gray-200">
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm relative group">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ basename(product.mainImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}</span>
</div>
<div class="absolute w-64 h-64 bg-gray-100 p-6 shadow-lg left-[calc(-16rem-20px)] rounded-md hidden group-hover:block">
{{ product.mainImage.thumbnail('productThumbnail').html|raw }}
<svg class="absolute text-gray-100 h-8 right-0 mr-[-33px] top-[calc(50%-19px)]" x="0px" y="0px" viewBox="0 0 255 255" xml:space="preserve">
<polygon style="fill: currentColor;" points="0,0 127.5,127.5 0,255"/>
</svg>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ product.mainImage.thumbnail('high-1920px').path }}" download="{{ basename(product.mainImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
{% for otherImage in product.otherImages %}
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm relative group">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ basename(otherImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}</span>
</div>
<div class="absolute w-64 h-64 bg-gray-100 p-6 shadow-lg left-[calc(-16rem-20px)] rounded-md hidden group-hover:block">
{{ otherImage.thumbnail('productThumbnail').html|raw }}
<svg class="absolute text-gray-100 h-8 right-0 mr-[-33px] top-[calc(50%-19px)]" x="0px" y="0px" viewBox="0 0 255 255" xml:space="preserve">
<polygon style="fill: currentColor;" points="0,0 127.5,127.5 0,255"/>
</svg>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ otherImage.thumbnail('high-1920px').path }}" download="{{ basename(otherImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
{% endfor %}
{% for detailImage in product.detailView %}
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm relative group">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ basename(detailImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}</span>
</div>
<div class="absolute w-64 h-64 bg-gray-100 p-6 shadow-lg left-[calc(-16rem-20px)] rounded-md hidden group-hover:block">
{{ detailImage.thumbnail('productThumbnail').html|raw }}
<svg class="absolute text-gray-100 h-8 right-0 mr-[-33px] top-[calc(50%-19px)]" x="0px" y="0px" viewBox="0 0 255 255" xml:space="preserve">
<polygon style="fill: currentColor;" points="0,0 127.5,127.5 0,255"/>
</svg>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ detailImage.thumbnail('high-1920px').path }}" download="{{ basename(detailImage.thumbnail('high-1920px').path)|replace({'%20': '_', ' ': '_'}) }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if product.applicationImages|length > 0 %}
<div class="space-y-1">
<p class="text-sm font-semibold">{{ 'applicationImages' | lower | trans }}:</p>
<ul role="list" class="divide-y divide-gray-200 rounded-md border border-gray-200">
{% for applicationImage in product.applicationImages %}
<li class="flex items-center justify-between py-3 pl-3 pr-4 text-sm relative group">
<div class="flex w-0 flex-1 items-center">
<!-- Heroicon name: mini/paper-clip -->
<svg class="h-5 w-5 flex-shrink-0 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M15.621 4.379a3 3 0 00-4.242 0l-7 7a3 3 0 004.241 4.243h.001l.497-.5a.75.75 0 011.064 1.057l-.498.501-.002.002a4.5 4.5 0 01-6.364-6.364l7-7a4.5 4.5 0 016.368 6.36l-3.455 3.553A2.625 2.625 0 119.52 9.52l3.45-3.451a.75.75 0 111.061 1.06l-3.45 3.451a1.125 1.125 0 001.587 1.595l3.454-3.553a3 3 0 000-4.242z" clip-rule="evenodd" />
</svg>
<span class="ml-2 w-0 flex-1 truncate">{{ basename(applicationImage.thumbnail('high-1920px').path) }}</span>
</div>
<div class="absolute w-64 h-64 bg-gray-100 p-6 shadow-lg left-[calc(-16rem-20px)] rounded-md hidden group-hover:block">
{{ applicationImage.thumbnail('productThumbnail').html|raw }}
<svg class="absolute text-gray-100 h-8 right-0 mr-[-33px] top-[calc(50%-19px)]" x="0px" y="0px" viewBox="0 0 255 255" xml:space="preserve">
<polygon style="fill: currentColor;" points="0,0 127.5,127.5 0,255"/>
</svg>
</div>
<div class="ml-4 flex-shrink-0">
<a href="{{ applicationImage.thumbnail('high-1920px').path }}" download="{{ basename(applicationImage.thumbnail('high-1920px').path) }}" target="_blank" class="font-medium text-brand-600 hover:text-brand-500">Download</a>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endif %}
{% if product.relatedProducts|length > 0 %}
<div class="p-6 bg-gray-50 rounded-lg space-y-4">
<h2 class="text-lg font-semibold text-gray-900">{{ 'Zugehörige Produkte' | trans }}</h2>
<div class="space-y-1">
<div class="divide-y divide-gray-200 rounded-md border border-gray-200 text-sm">
{% for relatedProduct in product.relatedProducts %}
<a href="{{ app_product_detaillink(relatedProduct) }}" class="grid grid-cols-2 items-center hover:bg-gray-100 cursor-pointer">
<div>
{{ (relatedProduct.mainImage is not empty ? relatedProduct.mainImage.thumbnail('productThumbnail').html : pimcore_asset_by_path('/System/missing.png').thumbnail('productThumbnail').html ) | raw }}
</div>
<div>
<div class="font-semibold">{{ relatedProduct.name }}</div>
<div class="">{{ relatedProduct.code }}</div>
</div>
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block PAGE_JS %}
<div id="promo-box" class="bg-brand-600 px-8 py-12 rounded shadow-md fixed top-1/3 right-0 hidden">
<button id="close-button" class="absolute top-0 right-0 p-2 text-white opacity-100" type="button" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<div class="text-white">
<span class=" text-xl ">Wir veredeln mit</span><br>
<span class="text-2xl font-bold">Ihrem Logo!</span><br>
</div>
<br>
<div>
<a href="https://hugo-josten.de/service/beratung" class="text-white font-bold">
Erfahren Sie mehr
</a>
</div>
<div class="h-4"></div>
</div>
<div id="promo-icon" class="fixed top-1/3 right-0 p-2 bg-brand-600 text-white rounded-l cursor-pointer hidden">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42" />
</svg>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const promoBox = document.getElementById('promo-box');
const promoIcon = document.getElementById('promo-icon');
const closeButton = document.getElementById('close-button');
// Check if the promo box should be hidden
if (localStorage.getItem('promoBoxClosed') !== 'true') {
promoBox.classList.remove('hidden');
}else{
promoIcon.classList.remove('hidden');
}
// Add click event to the close button
closeButton.addEventListener('click', function() {
promoBox.classList.add('hidden');
promoIcon.classList.remove('hidden');
localStorage.setItem('promoBoxClosed', 'true');
});
promoIcon.addEventListener('click', function() {
promoIcon.classList.add('hidden');
promoBox.classList.remove('hidden');
localStorage.setItem('promoBoxClosed', 'false');
});
});
</script>
{% endblock %}