{% extends "layout-snippets.html.twig" %}
{% block snippets %}
{% if editmode %}
<h2 class="uk-text-center">{{ pimcore_textarea("service-titre")}}</h2>
{% for a in pimcore_block('contentservices').iterator %}
{{ pimcore_relation("myServices") }}
{{ pimcore_link("link-service") }}
{% endfor %}
{% else %}
<div class="apk-snippet-services">
<div class="uk-container apk-container-1400">
{% if not pimcore_textarea("service-titre").isEmpty() %}
<h2 class="uk-text-center">{{ pimcore_textarea("service-titre")}}</h2>
{% endif %}
<div class="uk-child-width-1-3@m" uk-grid uk-height-match="target: .apk-container-height-match" uk-scrollspy="cls: uk-animation-scale-up; target: .apk-animate; delay: 300; repeat: false">
{% for a in pimcore_block('contentservices').iterator %}
{% if pimcore_relation("myServices").element.className == 'Services' %}
<div>
<div class="apk-container-content uk-text-center apk-{{ pimcore_relation("myServices").element.typeService }} apk-animate">
<div data-apk-href="{#{ link }#}">
{{ pimcore_relation("myServices").element.image.thumbnail('global-image').html()|raw }}
</div>
<div class="apk-container-textes">
<div class="apk-container-height-match">
<h3 class="uk-margin-top uk-margin-bottom">{{ pimcore_relation("myServices").element.titre }}</h3>
<p class="uk-margin-remove">{{ (pimcore_relation("myServices").element.description|nl2br)|raw }}</p>
</div>
<div class="uk-margin-top">
<a href="{{ pimcore_link('link-service').getHref() }}" class="uk-button uk-margin-top">{{ "En savoir plus"|trans }}</a>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endblock %}