We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc9ff52 commit 3c52ecdCopy full SHA for 3c52ecd
1 file changed
Resources/views/show.html.twig
@@ -3,10 +3,14 @@
3
{% trans_default_domain "victoire" %}
4
5
{% block content %}
6
- {% if image.url is defined and opacity is not null %}
7
- {% set background = "background-image: " ~ opacity ~ ", url(" ~ image.url ~ ");" %}
8
- {% elseif image.url is defined %}
9
- {% set background = "background-image: url(" ~ image.url ~ ");" %}
+
+ {% if opacity is not null %}
+ {% set opacity = opacity ~ "," %}
+ {% endif %}
10
+ {% if image.url is defined %}
11
+ {% set background = "background-image: " ~ opacity ~ " url(" ~ image.url ~ ");" %}
12
+ {% elseif image.path is defined %}
13
+ {% set background = "background-image: " ~ opacity ~ " url(" ~ asset(image.path) ~ ");" %}
14
{% else %}
15
{% set background = "background-color: #cccccc;" %}
16
{% endif %}
0 commit comments