{% extends base_layout() %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-12">
{{ pimcore_areablock('content_top') }}
</div>
</div>
</div>
{% if productsGroups is defined %}
<section class="mb-5">
<div class="container">
<div class="row row-cols-2 row-cols-lg-5 g-5 d-flex justify-content-center">
{% for productsGroup in productsGroups %}
{% if loop.index <= 10 %}
{% set detailLink = app_product_grouplink(productsGroup) %}
<div class="col">
<div class="text-center catoverview">
<a href="{{ detailLink }}" class="fs-5" onMouseOver="this.style.color='{{ productsGroup.bgcolor }}'" onMouseOut="this.style.color='#595959'">
<div class="p-3 position-relative h-100 d-block">
{% set productimage = productsGroup.image %}
{% if productimage %}
<img src="{{ productimage.getThumbnail('homepage-icon') }}" class="img-fluid d-block" style="z-index: 1">
{% endif %}
{% set productimagebg = productsGroup.imagebg %}
{% if productimagebg %}
<img src="{{ productimagebg.getThumbnail('homepage-icon') }}" class="img-fluid position-absolute top-0 start-0 d-block bg-shape" style="z-index: -1">
{% endif %}
</div>
{% if productsGroup.combinedCategoryName is not empty %}
{{ productsGroup.combinedCategoryName|capitalize }}
{% else %}
{{ productsGroup.oms|capitalize }}
{% endif %}
</a>
</div>
</div>
{% endif %}
{% endfor %}
<div class="accordion col-12 w-100 accordion-flush homeaccordion" id="accordionExample">
<div class="accordion-item">
<div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="row row-cols-2 row-cols-lg-5 g-5 mb-5 d-flex justify-content-center">
{% for productsGroup in productsGroups %}
{% if loop.index > 10 %}
{% set detailLink = app_product_grouplink(productsGroup) %}
<div class="col">
<div class="text-center catoverview">
<a href="{{ detailLink }}" class="fs-5" onMouseOver="this.style.color='{{ productsGroup.bgcolor }}'" onMouseOut="this.style.color='#595959'">
<div class="p-3 position-relative h-100 d-block">
{% set productimage = productsGroup.image %}
{% if productimage %}
<img src="{{ productimage.getThumbnail('homepage-icon') }}" class="img-fluid d-block" style="z-index: 1">
{% endif %}
{% set productimagebg = productsGroup.imagebg %}
{% if productimagebg %}
<img src="{{ productimagebg.getThumbnail('homepage-icon') }}" class="img-fluid position-absolute top-0 start-0 d-block bg-shape" style="z-index: -1">
{% endif %}
</div>
{{ productsGroup.oms|capitalize }}
</a>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="text-center" id="headingOne">
<button class="accordion-button mx-auto collapsed text-red" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
{{ 'Alle categorieëen'|trans }}
</button>
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if productPromotion is defined %}
<section class="homepromoties mb-5">
<div class="container py-5">
<div class="row">
<div class="col-12 mb-3">
<h2 class="text-red display-5 text-center mb-5">
<span class="heading-line red">{{ 'Promoties'|trans }}</span>
</h2>
</div>
<div class="splide" id="promosplide">
<div class="splide__track">
<ul class="splide__list pb-5">
{% for productPromotion in productPromotion %}
{% set categoryProduct = app_product_getCategory(productPromotion.parent) %}
{% set subcategoryProduct = productPromotion.parent %}
{% set detailLink = app_product_articlelink(categoryProduct,subcategoryProduct,productPromotion) %}
<li class="splide__slide">
<div class="promo position-relative">
<a href="{{ detailLink }}">
{% set productPromotionImage = productPromotion.fotos %}
{% if productPromotionImage %}
<div class="p-3">
<img src="{{ productPromotionImage.getThumbnail('homepage-catoverview') }}" class="img-fluid">
</div>
{% endif %}
{#{{ productPromotion.fotos }}#}
<strong>{{ productPromotion.oms }}</strong>
</a>
{% if productPromotion.promoprijs is defined %}
{% if productPromotion.promoprijs > 0 %}
<div class="promoprijs">
<div class="d-inline-block">
<strike>€ {{ productPromotion.prijs|number_format(2, ',', ' ') }}</strike><br>
<span>€ {{ productPromotion.promoprijs|number_format(2, ',', ' ') }}</span>
</div>
</div>
{% else %}
<br>€ {{ productPromotion.prijs|number_format(2, ',', ' ') }}
{% endif %}
{% endif %}
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{#
{% if overons is defined %}
<section>
<div class="container">
<div class="row">
<div class="col-12">
<h2>{{ 'In de kijker'|trans }}</h2>
</div>
</div>
<div class="row">
{% for overonsPage in overons %}
<div class="col-4">
<a href="{{ overonsPage.fullpath }}"><h2>{{ overonsPage.title }}</h2></a>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}#}
{% if editmode %}
<div class="container">
<div class="row">
<div class="col-12">
<p class="advice">{{ 'tip: Door op het plusteken te klikken kun je kiezen welke inhoudelijke blok je kan toevoegen.'|trans({}, 'admin') }}</p>
</div>
</div>
</div>
{% endif %}
<div class="container">
<div class="row">
<div class="col-12">
{{ include('includes/default-content.html.twig') }}
</div>
</div>
</div>
{% if news is defined %}
<section class="homenews">
<div class="container py-5">
<div class="row">
<div class="col-12 mb-3 position-relative">
<h2 class="text-primary display-5 text-center mb-5">
<span class="heading-line primary">{{ 'Nieuws'|trans }}</span></h2>
<div class="position-absolute top-0 end-0 d-flex align-items-center h-100 pb-5">
<a href="{% if check_websitesetting('news_document', 'document') %}{{ inotherlang('LocalizedDocument', pimcore_website_config('news_document')) }}{% endif %}" class="text-secondary btn-more">
<span class="float-start">{{ 'Alle nieuws'|trans() }}</span>
<span class="material-symbols-rounded ms-2 pb-1 float-start">arrow_forward</span>
</a>
</div>
</div>
</div>
<div class="row row-cols-lg-3 gy-3 gy-lg-0">
{{ include('includes/news/detail.html.twig', {
'news': news
}) }}
</div>
</div>
</section>
{% endif %}
{% endblock %}