Add additional title styles (hero-main, is-large) if editor chose

This commit is contained in:
benjamin melançon 2018-11-14 15:03:42 -05:00
parent abbb88da94
commit 4921ad739a

View file

@ -50,6 +50,13 @@
{% if paragraph.field_style_titlebar is empty %}
{% set classes = classes|merge(['hero-project']) %}
{% endif %}
{% if paragraph.field_style_classes is not empty %}
{% set styles=[] %}
{% for style in paragraph.field_style_classes %}
{% set styles = styles|merge([style.value]) %}
{% endfor %}
{% set classes = classes|merge(styles) %}
{% endif %}
{% if paragraph.field_style_titlebar is not empty and paragraph.field_image is not empty %}
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}