Make image background image to match design precisely
Also, try to strip comments so these 'data' fields still work in debug mode
This commit is contained in:
parent
a52a3e69ed
commit
ad8fd87fe2
1 changed files with 2 additions and 3 deletions
|
@ -46,13 +46,12 @@
|
|||
]
|
||||
%}
|
||||
{% if content.field_style_color %}
|
||||
{% set classes = classes|merge(['is-'~content.field_style_color|render|trim]) %}
|
||||
{% set classes = classes|merge(['is-'~content.field_style_color|render|striptags|trim]) %}
|
||||
{% endif %}
|
||||
{% block paragraph %}
|
||||
<a href="{{ path('entity.node.canonical', {'node': paragraph.getParentEntity().id()}) }}"{{ attributes.addClass(classes) }}>
|
||||
{% block content %}
|
||||
<div class="card-image">
|
||||
{{ content.field_image }}
|
||||
<div class="card-image" style="background-image: url({{ content.field_image|render|striptags|trim }}">
|
||||
</div>
|
||||
<div class="card-content">
|
||||
{{ content.field_title }}
|
||||
|
|
Loading…
Reference in a new issue