91 lines
2.9 KiB
Twig
91 lines
2.9 KiB
Twig
{%if not mini %}
|
|
{# Récupération des couleurs #}
|
|
{% set colorheaderback = entity.colorheaderback %}
|
|
{% if colorheaderback is null %}
|
|
{% set colorheaderback = "var(--colorbgbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% set colorheaderfont = entity.colorheaderfont %}
|
|
{% if colorheaderfont is null %}
|
|
{% set colorheaderfont = "var(--colorftbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = "var(--colorbgbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = "var(--colorftbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% if not entity.border %}
|
|
{% set colorbodyback = "var(--colorbgbodylight)" %}
|
|
{% set colorbodyfont = "var(--colorftbodylight)" %}
|
|
{% endif %}
|
|
|
|
|
|
{# Definition style widget #}
|
|
{% set widgetheight = "" %}
|
|
{% if not entity.autoajust %}
|
|
{% set widgetheight = "height: " ~ entity.height ~ "px; " %}
|
|
{% endif %}
|
|
|
|
{# Definition style widgetheader #}
|
|
{% set widgetheaderback = "background-color:"~colorheaderback~";" %}
|
|
{% set widgetheaderfont = "color:"~colorheaderfont~";" %}
|
|
|
|
{% set widgetheaderborder = "" %}
|
|
{% if entity.border %}
|
|
{% set widgetheaderborder = "border:1px solid " ~ colorheaderback ~ "; " %}
|
|
{% endif %}
|
|
|
|
{# Definition style widgetbody #}
|
|
{% set widgetbodyback = "background-color:"~colorbodyback~";" %}
|
|
{% set widgetbodyfont = "color:"~colorbodyfont~";" %}
|
|
|
|
{% set widgetbodyborder = "" %}
|
|
{% if entity.border %}
|
|
{% set widgetbodyborder = "border:1px solid " ~ colorbodyback ~ "; " %}
|
|
{% endif %}
|
|
|
|
{% set widgetbodypadding = "" %}
|
|
{% if entity.border %}
|
|
{% set widgetbodypadding = "padding:10px;" %}
|
|
{% endif %}
|
|
|
|
{% set widgetbodydisplay = "" %}
|
|
{% if not entity.opened %}
|
|
{% set widgetbodydisplay = "display:none;" %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetbodyreverse = widgetheaderback~widgetheaderfont %}
|
|
|
|
|
|
<div
|
|
class="widget widget-info"
|
|
data-id="{{ entity.id }}"
|
|
loc="{{ entity.loc }}"
|
|
style="{{ widgetheight }}">
|
|
<div
|
|
class="widgetmenu"
|
|
style="{{widgetheaderback}}{{widgetheaderfont}}">
|
|
{{ widgetmenu|raw }}
|
|
</div>
|
|
|
|
<div
|
|
class="widgetheader"
|
|
style="{{widgetheaderback}}{{widgetheaderfont}}{{widgetheaderborder}}">
|
|
{% if icon %}
|
|
<img src="/{{ appAlias }}{{ icon }}" class="logo" style="border-radius:100%"/>
|
|
{% else %}
|
|
<img src="{{icondefault}}" class="logo"/>
|
|
{% endif %}
|
|
<span class="title">{{ title }}</span>
|
|
</div>
|
|
|
|
<div
|
|
class="widgetbody"
|
|
style="{{widgetbodyback}}{{widgetbodyfont}}{{widgetbodyborder}}{{widgetbodypadding}}{{widgetbodydisplay}}">
|
|
{% endif %} |