{% from '@Provider/macros/include-svg.html.twig' import includeSvg %}
{# Default block settings #}
{% set class = pimcore_input('class').getData() %}
{% set marginTop = pimcore_select('margin_top').getData() %}
{% set marginBottom = pimcore_select('margin_bottom').getData() %}
{% set containerWidth = pimcore_select('container_width').getData() %}
{% set areaClass = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
{% set anchorId = pimcore_input('anchor').getData() %}
{# Quote block settings #}
{% set type = pimcore_select('type').getData() %}
<div class="area area--quote {{ areaClass }}"{% if anchorId %} id="{{ anchorId }}"{% endif %}>
{% if type == 'image' and editmode %}
{{ pimcore_relation("quote_image",{
"types": ["asset"],
"subtypes": {
"asset": ["image"]
},
"reload": true
}) }}
{% endif %}
<blockquote class="{% if type == 'highlight' %}highlight{% endif %}{% if type == 'image' %} image{% endif %}">
<div class="icon">
{% if type == 'image' %}
{% if not pimcore_relation('quote_image').isEmpty() %}
{{ pimcore_relation('quote_image').getElement().getThumbnail('quoteImage').getHtml() | raw }}
{% endif %}
{% else %}
{{ includeSvg('diverses/quotes', true, false, false) }}
{% endif %}
</div>
{{ pimcore_wysiwyg('quote_text', {
}) }}
<cite>
{{ pimcore_input('quote_input', {
'placeholder': 'Autorname'
}) }}
</cite>
</blockquote>
</div>