{% if block.typeblock == 26 %}{{ block.name|raw }}
{% elseif block.typeblock == 27 %}{{ block.content|raw }}
{% else %}
{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% if null != block.typeblock %}
{# {{ dump(block) }} #}
{# une image titre à droite #}
{% if block.typeblock == 1 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type1" {% if null != image_bg %}style="background-image: url('{{ image_bg }}')"{% endif %}>
{% if null != block.content %}
<div class="block-type1-desc">
{{ block.content|raw }}
</div>
{% endif %}
{% if null != block.name %}
<div class="block-type1-top">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
</div>
{% endif %}
{# une image titre à gauche #}
{% if block.typeblock == 2 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type2">
<div class="block-type2-ctn">
<div class="block-type2-left">
{% if null != block.name %}
<div class="title">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
{% if null != block.content %}
<div class="desc">
{{ block.content|raw }}
</div>
{% endif %}
</div>
<div class="block-type2-right">
<img src="{{ image_bg }}">
</div>
</div>
</div>
{% endif %}
{# caroussel #}
{% if block.typeblock == 3 %}
{% if null != block.taxons %}
{% for taxon in block.taxons %}
{{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }}
{% endfor %}
{% endif %}
{% endif %}
{# texte uniquement #}
{% if block.typeblock == 4 %}
{% if null != block.content %}
<div class="block-type4">
<div class="block-type4-ctn">
{{ block.content|raw }}
</div>
</div>
{% endif %}
{% endif %}
{# image uniquement #}
{% if block.typeblock == 5 %}
{% if null != block.images %}
<div class="block-type5">
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
<img src="{{ image_bg }}">
{% endfor %}
</div>
{% endif %}
{% endif %}
{# Image de fond avec texte, titre à gauche #}
{% if block.typeblock == 6 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type1 block-type6" {% if null != image_bg %}style="background-image: url('{{ image_bg }}')"{% endif %}>
{% if null != block.content %}
<div class="block-type1-desc">
{{ block.content|raw }}
</div>
{% endif %}
{% if null != block.name %}
<div class="block-type1-top">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
</div>
{% endif %}
{# Bloc de taxon sans caroussel #}
{% if block.typeblock == 7 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type7" {% if null != image_bg %}style="background-image: url('{{ image_bg }}')"{% endif %}>
<div class="block-type7-ctn">
{% if null != block.name %}
<div class="block-type7-top">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
{% if null != block.taxons %}
{% for taxon in block.taxons %}
{# {{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }} #}
{% include '@SyliusShop/Webapic/page/taxon.html.twig' with {'taxons': taxon.children} only %}
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
{# Bloc orange #}
{% if block.typeblock == 8 %}
<div class="block-type8">
<div class="block-type8-ctn">
{% if null != block.name %}
<div class="title">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
{% if null != block.content %}
<div class="desc">
{{ block.content|raw }}
</div>
{% endif %}
</div>
</div>
{% endif %}
{# Bloc sans titre, texte à gauche, image à droite et encart bleu au dessus l\'image #}
{% if block.typeblock == 9 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{# {% set image_bg = asset('/media/image/'~image.path) %} #}
{% set image_bg = image.path|imagine_filter(filter|default('app_any_image')) %}
{% endfor %}
{% endif %}
<div class="block-type9">
{% if null != block.content %}
<div class="block-type9-desc">
{{ block.content|raw }}
</div>
{% endif %}
<div class="block-type9-right">
{% if null != block.taxons %}
{% for taxon in block.taxons %}
{# {{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }} #}
{% include '@SyliusShop/Webapic/page/encartbleu.html.twig' with {'taxons': taxon.children} only %}
{% endfor %}
{% endif %}
{% if null != image_bg %}
<img src="{{ image_bg }}">
{% endif %}
</div>
</div>
{% endif %}
{# Collection - Image avec texte, titre à gauche #}
{% if block.typeblock == 10 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type2 block-type10">
<div class="block-type2-ctn">
<div class="block-type2-left block-type10-left">
{% if null != block.name %}
<div class="title">
<h2>{{ block.name }}</h2>
</div>
{% endif %}
{% if null != block.content %}
<div class="desc">
{{ block.content|raw }}
</div>
{% endif %}
</div>
<div class="block-type2-right">
<img src="{{ image_bg }}">
</div>
</div>
</div>
{% endif %}
{# Collection - Image avec texte à droite, sans titre #}
{% if block.typeblock == 11 %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type11">
<div class="block-type11-ctn">
<div class="block-type11-left ">
<img src="{{ image_bg }}">
</div>
{% if null != block.content %}
<div class="block-type11-right ">
<div class="desc">
{{ block.content|raw }}
</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
{# Collection - image et produit #}
{% if block.typeblock == 12 and null != block.products %}
{% set image_bg = '' %}
{% if null != block.images %}
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
{% endfor %}
{% endif %}
<div class="block-type12">
<div class="block-type12-ctn">
<div class="block-type12-left ">
<img src="{{ image_bg }}">
</div>
<div class="block-type12-right ">
{% for product in block.products %}
{% include '@SyliusShop/Product/Box/_content-product4.html.twig' with {'product': product} only %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{# image uniquement #}
{% if block.typeblock == 13 %}
{% if null != block.images %}
<div class="block-type13">
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
<a class="lien-type13" href=" {{ block.link }}">
<img src="{{ image_bg }}">
</a>
{% endfor %}
</div>
{% endif %}
{% endif %}
{# Collection - "Ces collections matchent !" #}
{% if block.typeblock == 14 %}
<div class="block-type14">
<div class="block-type14-ctn">
<div class="block-type14-top">
<span>Associées ensemble,</span>
<h3>Ces collections <strong>matchent</strong> !</h3>
</div>
{% if null != block.taxons %}
<div class="block-type14-collections">
<div class="block-type14-collections-ctn">
{% for taxon in block.taxons %}
{{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock, 'id': taxon.id})) }}
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
{# Bloc de taxon sans caroussel #}
{% if block.typeblock == 15 %}
{% if null != block.taxons %}
{% for taxon in block.taxons %}
{# {{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }} #}
{% include '@SyliusShop/Webapic/page/listing-categories.html.twig' with {'taxon': taxon} only %}
{% endfor %}
{% endif %}
{% endif %}
{# Bloc programme fidelité #}
{% if block.typeblock == 16 %}
<div class="block-type16">
{% set path = '' %}
{% for image in block.images %}
{% set path = asset('/media/image/'~image.path) %}
{% endfor %}
<div class="block-type16-left">
{% if null != path %}
<img src="{{ path }}" class="ui image" />
{% endif %}
</div>
<div class="block-type16-right">
{{ block.content|raw}}
</div>
</div>
{% endif %}
{# Bloc cadeau #}
{% if block.typeblock == 17 %}
<div class="block-type17">
{% set path = '' %}
{% if null != block.images %}
<div class="block-type17-left">
{% for image in block.images %}
{% set image_bg = asset('/media/image/'~image.path) %}
<img src="{{ image_bg }}">
{% endfor %}
</div>
{% endif %}
{% if null != block.taxons %}
{% set taxonCode = '' %}
<div class="block-type17-right">
<div class="block-type17-right-ctn">
<div class="block-type17-right-top">
<ul>
{% for taxon in block.taxons %}
{% for children in taxon.children %}
<li>
<a href="">{{ children.name }}</a>
</li>
{# {% set taxonCode = taxon.code %}
{{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }} #}
{% endfor %}
{% endfor %}
</ul>
</div>
<div class="block-type17-right-form">
<h1>{{ block.name|raw }} </h1>
{{ block.content|raw }}
<form>
<ul class="top">
<li class="active">Pour</li>
<li>Budget</li>
<li>Qui aime</li>
</ul>
<ul class="bottom">
<li class="active">
{{ render(url('bitbag_render_block', {'code': taxonCode, 'typeblock': block.typeblock, 'select': 113, 'name': 'pour'})) }}
</li>
<li>
{{ render(url('bitbag_render_block', {'code': taxonCode, 'typeblock': block.typeblock, 'select': 126, 'name': 'budget'})) }}
</li>
<li>
{{ render(url('bitbag_render_block', {'code': taxonCode, 'typeblock': block.typeblock, 'select': 116, 'name': 'qui'})) }}
</li>
</ul>
<button data-url="{{ path('app_gift_submit') }}">Découvrir ma sélection <i class="check icon"></i></button>
</form>
</div>
</div>
</div>
{% endif %}
<div class="block-type17-bottom">
<h2>Ma sélection d’idées cadeaux <strong>sur mesure</strong> !
</div>
</div>
{% endif %}
{# Produits uniquement #}
{% if block.typeblock == 18 and null != block.products %}
{% include '@SyliusShop/Webapic/listing/gift.html.twig' with {'products': block.products} %}
{% endif %}
{# idéées coutures #}
{% if block.typeblock == 20 and null != block.taxons %}
{% include '@SyliusShop/Webapic/page/block-ideescouture.html.twig' with {'block': block} only %}
{% endif %}
{# collections - listing derniers collections #}
{% if block.typeblock == 21 %}
{{ render(url('bitbag_render_block', {'typeblock': block.typeblock})) }}
{% endif %}
{# guide - sous menu #}
{% if block.typeblock == 22 and null != block.taxons %}
{% include '@SyliusShop/Webapic/page/block-sousmenu.html.twig' with {'block': block} only %}
{% endif %}
{# guide - derniers articles #}
{% if block.typeblock == 23 and null != block.taxons %}
{# {% include '@SyliusShop/Webapic/page/block-derniersarticles.html.twig' with {'block': block} only %} #}
{% for taxon in block.taxons %}
<div class="categorie">
{% include '@SyliusShop/Webapic/page/block-categorie-childrens.html.twig' with {'taxonsChilds': taxon.children} only %}
</div>
{{ render(url('bitbag_render_block', {'code': taxon.code, 'typeblock': block.typeblock})) }}
{% endfor %}
{% endif %}
{% if block.typeblock == 24 %}
<div class="banner-left" style="background-image: url({{ asset('webapic-theme/images/asupprimer/bg-accueil-banner.jpg') }})">
{% if not is_mobile() %}
<div class="banner-left-img">
<div id="circle">
<img class="ui image lazyload" data-src="{{ asset('webapic-theme/images/txt-tournant-pensepour.svg') }}" />
</div>
</div>
{% endif %}
<div class="banner-left-content" style="background-image: url({{ asset('webapic-theme/images/asupprimer/bg-accueil-banner.jpg') }})">
<img class="ui image lazyload" data-src="{{ asset('webapic-theme/images/logo-vertical.svg') }}" />
<h2>
{{ block.name }}
{# {{ 'app.front.accueil.banner.content1'|trans|raw }} #}
</h2>
<p>
{# {{ block.content|raw }} #}
{% if is_mobile() %}
<div>
<input type="checkbox" id="expanded">
<div>{{ block.content|raw }}</div>
<label for="expanded" role="button">{{ 'app.front.global.btn_voirplus'|trans }}</label>
</div>
{% else %}
<div>{{ block.content|raw }}</div>
{% endif %}
{# {{ 'app.front.accueil.banner.content2'|trans|raw }}
{{ 'app.front.accueil.banner.content3'|trans|raw }} #}
</p>
{# <div class="lien-ctn">
<a class="lien-bleu" href=" {{ block.link }}">
{{ 'app.ui.btn_ensavoirplus'|trans }}
</a>
</div> #}
<div class="banner-bt">
{# {{ bitbag_cms_render_link_for_code('lamarque', { name: 'En savoir plus' }) }} #}
<a href=" {{ block.link }}">
{{ 'app.ui.btn_ensavoirplus'|trans }}
</a>
</div>
</div>
</div>
{% endif %}
{% if block.typeblock == 0 %}
{% if null != block.name %}
<h2>{{ block.name }}</h2>
{% if null != block.taxons %}
{% for taxon in block.taxons %}
<p>Taxon: {{ taxon.slug }}</p>
{# {{ dump(taxon) }} #}
{# {{ render(url('bitbag_render_block', {'code': taxon.code})) }} #}
{% endfor %}
{% endif %}
{% if null != block.products %}
{% for product in block.products %}
<p>Product: {{ product }}</p>
{% endfor %}
{% endif %}
{% endif %}
{{ bitbag_cms_render_content(block) }}
{% endif %}
{% else %}
{% if null != block.name %}
<h2>{{ block.name }}</h2>
{% if null != block.taxons %}
{% for taxon in block.taxons %}
<p>Taxon: {{ taxon.slug }}</p>
{# {{ dump(taxon) }} #}
{# {{ render(url('bitbag_render_block', {'code': taxon.code})) }} #}
{% endfor %}
{% endif %}
{% if null != block.products %}
{% for product in block.products %}
<p>Product: {{ product }}</p>
{% endfor %}
{% endif %}
{% endif %}
{{ bitbag_cms_render_content(block) }}
{% endif %}
{% endif %}