Add additional title styles (hero-main, is-large) if editor chose
This commit is contained in:
parent
abbb88da94
commit
4921ad739a
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,13 @@
|
||||||
{% if paragraph.field_style_titlebar is empty %}
|
{% if paragraph.field_style_titlebar is empty %}
|
||||||
{% set classes = classes|merge(['hero-project']) %}
|
{% set classes = classes|merge(['hero-project']) %}
|
||||||
{% endif %}
|
{% 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 %}
|
{% 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)~')') %}
|
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}
|
||||||
|
|
Loading…
Reference in a new issue