For titlebars with images, make it the background image
This commit is contained in:
parent
d372e8375e
commit
75f5d32b5b
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@
|
||||||
{% set classes = classes|merge(['hero-project']) %}
|
{% set classes = classes|merge(['hero-project']) %}
|
||||||
{% endif %}
|
{% 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)~')') %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block paragraph %}
|
{% block paragraph %}
|
||||||
<section{{ attributes.addClass(classes) }}>
|
<section{{ attributes.addClass(classes) }}>
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
Loading…
Reference in a new issue