Skip to content

Commit

Permalink
DROOP-1043 Divider is not visible when there is no header and content
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-odorski-droptica committed Jan 3, 2024
1 parent 7f2b7b9 commit 3b7e78b
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions themes/custom/droopler_theme/src/components/d-p-form/d-p-form.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,33 @@
</div>
</div>

<div {{ bem('content', [], base_class, ['container']) }}>
<div {{ bem('content-wrapper', [], base_class, ['row']) }}>
<div {{ bem('content-column', ['header'], base_class, [content_classes]) }}>
{% block header %}
{% endblock %}
<div {{ bem('content', [], base_class, ['container']) }}>
<div {{ bem('content-wrapper', [], base_class, ['row']) }}>

{% include '@droopler_theme/base/divider/divider.twig' %}
{% set has_header = block('header')|render|striptags('<img>')|trim is not empty %}
{% set has_content = block('content')|render|striptags|trim is not empty %}

{% block content %}
{% endblock %}
</div>
{% if has_header or has_content %}
<div {{ bem('content-column', ['header'], base_class, [content_classes]) }}>

{% if has_header %}
{% block header %}
{% endblock %}

{% if has_content %}
{% include '@droopler_theme/base/divider/divider.twig' %}
{% endif %}
{% endif %}

<div {{ bem('content-column', ['form'], base_class, [form_classes]) }}>
{% block form %}
{% endblock %}
{% block content %}
{% endblock %}
</div>
{% endif %}

<div {{ bem('content-column', ['form'], base_class, [form_classes]) }}>
{% block form %}
{% endblock %}
</div>
</div>
</div>
</div>
</section>

0 comments on commit 3b7e78b

Please sign in to comment.