This commit is contained in:
root 2019-06-09 22:09:44 +02:00
parent 11f4958e5f
commit 3988986d60
1 changed files with 4 additions and 3 deletions

View File

@ -80,10 +80,11 @@
{% endif %} {% endif %}
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %} {% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
{% if feed.color is defined and feed.color is not null %} {% if feed.color is defined and feed.color is not null %}
{% set stylefeed = "background-color: #" ~ feed.color ~ ";" %} {% set stylecolor = "background-color: #" ~ feed.color ~ ";" %}
{% endif %} {% endif %}
{% set stylefeed = "" %}
{% if feed.image is not null and feed.image != ""%} {% if feed.image is not null and feed.image != ""%}
{% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %} {% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %}
{% endif %} {% endif %}
@ -93,7 +94,7 @@
{% if feed.image is not empty %} {% if feed.image is not empty %}
<img src="{{feed.image}}" width="100%"> <img src="{{feed.image}}" width="100%">
{% endif %} {% endif %}
<div class="caption" style="background-color: #{{ colorbodyfont }}; color: #{{ colorbodyback }};"> <div class="caption" style="{{ stylecolor }}">
<h1 class="grid-preview-title" style="color: #{{ colorbodyback }};">{{ feed.title }}</h1> <h1 class="grid-preview-title" style="color: #{{ colorbodyback }};">{{ feed.title }}</h1>
<small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br> <small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br>
{{ feed.description | nl2br }} {{ feed.description | nl2br }}