{% if editmode %}
<style>
.article-edit-box,
.editor-checkbox label {
color: #fff;
}
</style>
<div class="main-article-area">
{{ pimcore_input("title", {
"placeholder": 'Cím',
"class": "article-edit-title"
}) }}
<div style="display: flex; align-items: center; margin-bottom: 25px">
<label class="pimcore-edit-label">Cím igazítása: </label>
{{ pimcore_select("title_align", {
"store": [
["left", "Balra"],
["center", "Középre"],
],
"defaultValue" : "left"
}) }}
</div>
<div style="display: flex; align-items: center; margin-bottom: 25px">
<label class="pimcore-edit-label">Cím utáni távolság: </label>
{{ pimcore_select("title_padding", {
"store": [
["small", "Kicsi"],
["medium", "Közepes"],
["big", "Nagy"],
],
"defaultValue" : "small"
}) }}
</div>
<div class="article-area-checkbox-container">
{{ pimcore_checkbox('contentEmbed', {
'reload': true,
'class': 'editor-checkbox',
'label': 'Beágyazott tartalom '
}) }}
<span title="A jelölőnégyzet használatával a szerkesztő tartalma elveszik.">ℹ️</span>
</div>
{% if pimcore_checkbox('contentEmbed').isChecked() %}
<div class="article-area-embed-container">
{{ pimcore_textarea('embedContent', {
"height": "200",
"placeholder": "Beágyazott tartalom",
"class": "article-edit-box"
}) }}
</div>
{% else %}
{{ pimcore_wysiwyg("content", {
"height": 200,
"placeholder": "Szöveg",
"class": "article-edit-box"
}) }}
{% endif %}
<div class="article-images-container">
<h3>Képek</h3>
{% for i in pimcore_block('article-images-top').iterator %}
{{ pimcore_image("article-image-top", { "class": "w-max-100-percent" }) }}
{% endfor %}
</div>
<div>
<h3>Apple link</h3>
{{ pimcore_link('dld_apple') }}
<h3>Google link</h3>
{{ pimcore_link('dld_google') }}
</div>
{{ pimcore_wysiwyg("contentFooter", {
"height": 200,
"placeholder": "Szöveg",
"class": "article-edit-box"
}) }}
</div>
<div class="article-images" style="background-color: #fff !important;">
<h3>KÉPEK</h3>
{% for i in pimcore_block('article-images').iterator %}
<p>Link:<br>{{ pimcore_link('link', {'required': 'linkonly'}) }}</p>
<p>Kép:<br>{{ pimcore_image('image', {'required': true}) }}</p>
<hr>
{% endfor %}
</div>
{% else %}
{% set title = pimcore_input("title") %}
{% set content = pimcore_wysiwyg("content") %}
{% set contentFooter = pimcore_wysiwyg("contentFooter") %}
{% set titleAlign = pimcore_select('title_align') %}
{% set titlePadding = pimcore_select('title_padding') %}
<div class="main-article-area">
{% if title and title.getText() %}
{% set align = 'left' %}
{% set padding = 'small' %}
{% if titleAlign and titleAlign.getData() %}
{% set align = titleAlign.getData() %}
{% endif %}
{% if titlePadding and titlePadding.getData() %}
{% set padding = titlePadding.getData() %}
{% endif %}
<h1 class="title-padding-{{ padding }}" style="text-align: {{ align }}">{{ title.render() | raw }}</h1>
{% endif %}
{% if pimcore_checkbox('contentEmbed').isChecked() %}
{{ pimcore_textarea('embedContent', {
"htmlspecialchars": false
}) }}
{% else %}
{% if content and not content.isEmpty() %}
{{ content.render() | raw }}
{% endif %}
{% endif %}
{% set articleImagesTop = pimcore_block('article-images-top') %}
{% if articleImagesTop and articleImagesTop.getCount() %}
<div class="justify-content-center">
{% for i in articleImagesTop.iterator %}
{% set image = pimcore_image('article-image-top') %}
{% if image and image.getImage() %}
<div class="col d-flex justify-content-center m-3">
{{ image.getImage().getThumbnail('seiko_srticle_top').getHtml() | raw }}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if not pimcore_link('dld_apple').isEmpty() and not pimcore_link('dld_google').isEmpty() %}
<div class="store-button-container">
<div class="store-button-wrapper">
<div class="store-button">
{{ pimcore_link('dld_apple', {
'textPrefix': '<img src="/themes/frontend/images/apple-logo.png" alt="">'
}) }}
</div>
<div class="store-button">
{{ pimcore_link('dld_google', {
'textPrefix': '<img src="/themes/frontend/images/google-play.png" alt="">'
}) }}
</div>
</div>
</div>
{% endif %}
{% if contentFooter and not contentFooter.isEmpty() %}
{{ contentFooter.render() | raw }}
{% endif %}
</div>
{% set articleImages = pimcore_block('article-images') %}
{% if articleImages and articleImages.getCount() %}
<div class="row article-images justify-content-center">
{% for i in articleImages.iterator %}
{% set image = pimcore_image('image') %}
{% if image and image.getImage() %}
<div class="col d-flex justify-content-center m-3">
{% if pimcore_link('link').isEmpty() %}
{{ image.getImage().getThumbnail('seiko_article').getHtml() | raw }}
{% else %}
{{ pimcore_link('link', {
'noText': true,
'textPrefix': image.getImage().getThumbnail('seiko_article').getHtml() | raw
}) }}
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endif %}