{% if editmode %}
<div class="uk-container apk-container-1400 uk-margin-medium">
<h2 class="uk-h2"><strong>Section wysiwyg</strong></h2>
<ul uk-tab>
<li><a href="#">Configurations</a></li>
<li class="uk-active"><a href="#">Content Edit</a></li>
</ul>
<ul class="uk-switcher uk-margin">
<li>
<div class="uk-grid-small uk-child-width-1-3@m" uk-grid>
<div>
<h3><strong>Grille et alignement</strong></h3>
<div>
<strong>Répartition</strong> de la grille Image/texte
<br>
{{ pimcore_select("content-grid-rules", {
"store" : [
['grid-type-0', '1/1 | 1/1'],
['grid-type-1', '1/2 | 1/2'],
['grid-type-2', '2/5 | 3/5'],
['grid-type-3', '1/3 | 2/3'],
['grid-type-4', '2/3 | 1/3'],
['grid-type-5', 'auto | expand'],
['grid-type-6', 'expand | auto'],
['grid-type-7', '3/5 | 2/5'],
],
"defaultValue" : "grid-type-1"
}) }}
</div>
<div>
<strong>Position</strong> de l'image et du texte
<br>
{{ pimcore_select("image-text-position", {
"store" : [
['img-left', 'Image à gauche / texte à droite'],
['img-right', 'Image à droite / texte à gauche']
],
"defaultValue" : "img-left"
}) }}
</div>
<div>Largeur du container</div>
{{ pimcore_select("container-width", {
"store" : [
['apk-container-800', '800px'],
['apk-container-900', '900px'],
['apk-container-1000', '1000px'],
['apk-container-1200', '1200px'],
['apk-container-1400', '1400px']
],
"defaultValue" : "apk-container-1400"
}) }}
<div>Largeur du container de la video</div>
{{ pimcore_select("video-width", {
"store" : [
['apk-container-800', '800px'],
['apk-container-900', '900px'],
['apk-container-1000', '1000px'],
['apk-container-1200', '1200px'],
['apk-container-1400', '1400px']
],
"defaultValue" : "apk-container-1400"
}) }}
</div>
<div>
<h3><strong>Mise en page du texte</strong></h3>
<div>
<strong>Type</strong> de heading pour le titre ?
<br>
{{ pimcore_select("content-heading", {
"store" : [
['span', 'span'],
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
</div>
<div>
<strong>Style</strong> du heading pour le titre ?
<br>
{{ pimcore_select("content-heading-style", {
"store" : [
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
</div>
<div>
<strong>Couleur</strong> du background global
<br>
{{ pimcore_select("bg-color-global", {
"store" : [
['white','blanc'],
['black','noir']
],
"defaultValue" : "blanc"
}) }}
</div>
<div>
<strong>Alignement</strong> du titre
<br>
{{ pimcore_select("title-align", {
"store" : [
['uk-text-left', 'Gauche'],
['uk-text-center', 'Centré'],
['uk-text-right', 'Droite']
],
"defaultValue" : "uk-text-left"
}) }}
</div>
<div>
<strong>Bordure</strong> en dessus du titre ?
<br>
{{ pimcore_select("title-border", {
"store" : [
['', 'non'],
['apk-border', 'oui']
],
"defaultValue" : ""
}) }}
</div>
<div>
<strong>Alignement</strong> du texte
<br>
{{ pimcore_select("text-align", {
"store" : [
['uk-text-center', 'Centré'],
['uk-text-left', 'Gauche'],
['uk-text-right', 'Droite']
],
"defaultValue" : "uk-text-left"
}) }}
</div>
<div>
<strong>Titre séparé</strong> du texte ?
<br>
{{ pimcore_select("text-separation", {
"store" : [
['separated', 'Oui'],
['grouped', 'Non']
],
"defaultValue" : "separated"
}) }}
</div>
<div>
<strong>Alignement</strong> du bouton
<br>
{{ pimcore_select("button-align", {
"store" : [
['uk-text-center', 'Centré'],
['uk-text-left', 'Gauche'],
['uk-text-right', 'Droite']
],
"defaultValue" : "uk-text-center"
}) }}
</div>
</div>
<div>
<h3><strong>Gestion des espaces</strong></h3>
<div>
Espacement en <strong>haut</strong> du block
<br>
{{ pimcore_select("margin-top", {
"store" : [
['uk-padding-remove-top', 'Suppression du padding'],
['', 'Aucun'],
['uk-margin-small-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : ""
}) }}
</div>
<div>
Espacement en <strong>bas</strong> du block
<br>
{{ pimcore_select("margin-bottom", {
"store" : [
['uk-padding-remove-bottom', 'Suppression du padding'],
['', 'Aucun'],
['uk-margin-small-bottom', 'Petit'],
['uk-margin-medium-bottom', 'Moyen'],
['uk-margin-large-bottom', 'Grand'],
['uk-margin-xlarge-bottom', 'Très grand'],
],
"defaultValue" : ""
}) }}
</div>
<div>
Espacement en <strong>haut</strong> du wysiwyg
<br>
{{ pimcore_select("margin-cotent-top", {
"store" : [
['', 'Aucun'],
['uk-margin-small-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : "uk-margin-medium-top"
}) }}
</div>
<div>
Espacement en <strong>bas</strong> du wysiwyg
<br>
{{ pimcore_select("margin-content-bottom", {
"store" : [
['', 'Aucun'],
['uk-margin-small-bottom', 'Petit'],
['uk-margin-medium-bottom', 'Moyen'],
['uk-margin-large-bottom', 'Grand'],
['uk-margin-xlarge-bottom', 'Très grand'],
],
"defaultValue" : ""
}) }}
</div>
</div>
</div>
</li>
{% endif %}
{% set imgTextPosition = pimcore_select("image-text-position").data %}
{% if imgTextPosition == 'img-left' %}
{% set ImgTextPositionCode = 'uk-flex-first@m' %}
{% else %}
{% set ImgTextPositionCode = '' %}
{% endif %}
{% set content_grid_value = pimcore_select("content-grid-rules").getData() %}
{% if content_grid_value == 'grid-type-0' %}
{% set grid_left_class = 'uk-width-1-1' %}
{% set grid_right_class = 'uk-width-1-1' %}
{% elseif content_grid_value == 'grid-type-1' %}
{% set grid_left_class = 'uk-width-1-2@m' %}
{% set grid_right_class = 'uk-width-1-2@m' %}
{% elseif content_grid_value == 'grid-type-2' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-2-5@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-3-5@m' %}
{% elseif content_grid_value == 'grid-type-3' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-1-3@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-2-3@m' %}
{% elseif content_grid_value == 'grid-type-4' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-2-3@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-1-3@m' %}
{% elseif content_grid_value == 'grid-type-5' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-auto@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-expand@m' %}
{% elseif content_grid_value == 'grid-type-6' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-expand@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-auto@m' %}
{% elseif content_grid_value == 'grid-type-7' %}
{% set grid_left_class = 'uk-width-1-2@s uk-width-3-5@m' %}
{% set grid_right_class = 'uk-width-1-2@s uk-width-2-5@m' %}
{% endif %}
{% if editmode %}
<li class="uk-active">
<div>
{% if pimcore_select("text-separation").data == "separated" %}
<div class="{{ pimcore_select("title-align").data }}">
<span class="uk-h2">Titre</span>
<h2 class="uk-h2">
{{ pimcore_textarea("content-title",{
"nl2br" : true
}) }}
</h2>
</div>
{% endif %}
<div class="uk-grid-large uk-margin-large-bottom" uk-grid>
<div class="{{ grid_left_class }} apk-media">
<span class="uk-h2">Image (optionnel)</span>
{{ pimcore_image("content-figure") }}
<hr>
<span class="uk-h2">Vidéo (optionnel)</span>
{{ pimcore_video('content-video', {
width: 700,
height: 400
}) }}
<span class="uk-h4">Image à afficher pour la vidéo</span>
{{ pimcore_image("content-background-image") }}
<div class="actions uk-margin-top">
<span class="uk-h2">Lien (optionnel)</span>
{{ pimcore_link("content-btn") }}
</div>
</div>
<div class="{{ grid_right_class }} apk-content">
{% if pimcore_select("text-separation").data != "separated" %}
<div class="{{ pimcore_select("title-align").data }}">
<h2 class="uk-h2">
<span class="uk-h2">Titre</span>
{{ pimcore_textarea("content-title",{
"nl2br" : true
}) }}
</h2>
</div>
{% endif %}
<span class="uk-h2">Texte</span>
<div class="{{ pimcore_select("text-align").data }}">
{{ pimcore_wysiwyg("content") }}
</div>
</div>
</div>
<span class="uk-h2">Texte sous contenu</span>
<div class="{{ pimcore_select("text-align").data }}">
{{ pimcore_wysiwyg("content-bottom") }}
</div>
</div>
</li>
</ul>
</div>
{% endif %}
{% if not editmode %}
{% if ( not pimcore_image("content-figure").isEmpty() ) or ( not pimcore_video("content-video").isEmpty() ) %}
<div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }} {{ pimcore_select("bg-color-global") }}">
<div class="uk-container {{ pimcore_select("container-width") }}">
{% if pimcore_select("text-separation").data == "separated" %}
<div class="{{ pimcore_select("title-align") }} uk-margin-medium-bottom {{ pimcore_select("title-border")}}">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").getData() == 'span' %}
<span class="uk-h2">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
</div>
{% endif %}
<div class="uk-grid-large" uk-grid>
<div class="{{ grid_right_class }}">
<div>
{% if pimcore_select("text-separation").data != "separated" %}
<div class="{{ pimcore_select("title-align") }} uk-margin-medium-bottom {{ pimcore_select("title-border")}}">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").getData() == 'span' %}
<span class="uk-h2">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
</div>
{% endif %}
<div class="{{ pimcore_select("text-align") }} uk-container apk-wysiwyg-content-link">
{{ pimcore_wysiwyg("content") }}
</div>
<div class="{{ pimcore_select("button-align").data }}">
{{ pimcore_link("content-btn", {"class" : "uk-button"}) }}
</div>
</div>
</div>
{% if not pimcore_video("content-video").isEmpty() %}
<div class="{{ grid_left_class }} {{ ImgTextPositionCode }} apk-media uk-text-center">
<div>
{% if pimcore_link("content-btn").href %}
<a href="{{ pimcore_link("content-btn").href }}" target="{{ pimcore_link("content-btn").target }}">
{% endif %}
{% if not pimcore_video("content-video").isEmpty() %}
{% if pimcore_image("content-background-image").src() %}
<div class="uk-container {{ pimcore_select("video-width") }}">
<div data-caption="{{ pimcore_image('content-background-image').getAlt() }}" class="uk-height-1-1" uk-toggle="target: #modal-media-youtube;">
<figure class="uk-dark uk-position-relative uk-height-1-1" style="background: url('{{ pimcore_image("content-background-image").thumbnail('global-image') }}') 50% 50% / cover">
<img src="{{ pimcore_image("content-background-image").getThumbnail('global-image') }}" class="" alt=""/>
<div class="uk-overlay-primary uk-position-cover">
<div class="uk-position-center">
<svg width="80" height="80" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="play-circle"><polygon fill="none" stroke="currentColor" stroke-width="1.1" points="8.5 7 13.5 10 8.5 13"></polygon><circle fill="none" stroke="currentColor" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</div>
</div>
</figure>
</div>
<div id="modal-media-youtube" class="uk-flex-top" uk-modal>
<div class="uk-modal-dialog uk-margin-auto-vertical">
<button class="uk-modal-close-outside" type="button" uk-close></button>
{{ pimcore_video("content-video", {
width : 1920,
height: 1080
}) }}
</div>
</div>
</div>
{% else %}
<div class="uk-container {{ pimcore_select("video-width") }}">
<div class="uk-position-relative apk-video">
<div class="aspect-ratio">
{{ pimcore_video('content-video') }}
</div>
</div>
</div>
{% endif %}
{% else %}
{{ pimcore_image("content-figure").thumbnail("global-image").html()|raw }}
{% endif %}
{% if pimcore_link("content-btn").href %}
</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="{{ pimcore_select("text-align").data }} {{ pimcore_select("margin-content-bottom") }} {{ pimcore_select("margin-content-top") }}">
{{ pimcore_wysiwyg("content-bottom") }}
</div>
</div>
</div>
{% else %}
<div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }} {{ pimcore_select("bg-color-global") }}">
<div class="uk-container {{ pimcore_select("container-width") }}">
{% if pimcore_select("text-separation").data == "separated" %}
<div class="uk-grid-large" uk-grid>
<div class="{{ grid_right_class }}">
<div class="{{ pimcore_select("title-align") }} {{ pimcore_select("title-border")}}">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").getData() == 'span' %}
<span class="uk-h2">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
</div>
</div>
<div class="{{ grid_left_class }} {{ ImgTextPositionCode }} {{ pimcore_select("text-align") }}">
{{ pimcore_wysiwyg("content") }}
<div class="{{ pimcore_select("button-align").data }}">
{{ pimcore_link("content-btn", {"class" : "uk-button"}) }}
</div>
</div>
</div>
{% else %}
<div>
<div class="{{ pimcore_select("title-align") }} {{ pimcore_select("title-border")}}">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").getData() == 'span' %}
<span class="uk-h2">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
</div>
<div class="{{ pimcore_select("text-align") }} uk-container apk-wysiwyg-content-link">
{{ pimcore_wysiwyg("content") }}
<div class="{{ pimcore_select("button-align").data }}">
{{ pimcore_link("content-btn", {"class" : "uk-button "}) }}
</div>
</div>
</div>
{% endif %}
<div class="{{ pimcore_select("text-align").data }} {{ pimcore_select("margin-content-bottom") }} {{ pimcore_select("margin-content-top") }}">
{{ pimcore_wysiwyg("content-bottom") }}
</div>
</div>
</div>
{% endif %}
{% endif %}