238 lines
7.5 KiB
Twig
238 lines
7.5 KiB
Twig
{% macro libmonth(month) %}
|
|
{% if month==1 %} Janvier
|
|
{% elseif month==2 %} Février
|
|
{% elseif month==3 %} Mars
|
|
{% elseif month==4 %} Avril
|
|
{% elseif month==5 %} Mai
|
|
{% elseif month==6 %} Juin
|
|
{% elseif month==7 %} Juillet
|
|
{% elseif month==8 %} Août
|
|
{% elseif month==9 %} Septembre
|
|
{% elseif month==10 %} Octobre
|
|
{% elseif month==11 %} Novembre
|
|
{% elseif month==12 %} Décembre
|
|
{%endif%}
|
|
{% endmacro %}
|
|
|
|
{% macro libday(day) %}
|
|
{% if day==1 %} Lundi
|
|
{% elseif day==2 %} Mardi
|
|
{% elseif day==3 %} Mercredi
|
|
{% elseif day==4 %} Jeudi
|
|
{% elseif day==5 %} Vendredi
|
|
{% elseif day==6 %} Samedi
|
|
{% elseif day==7 %} Dimanche
|
|
{%endif%}
|
|
{% endmacro %}
|
|
|
|
{% macro mycolormain() %}
|
|
{% set color = app.session.get('color') %}{% set colormain = app.session.get('colorbgbodydark') %}{{ colormain }}
|
|
{% endmacro %}`
|
|
|
|
{% macro mystylewidget(entity) %}
|
|
{% set colorheaderback = entity.colorheaderback %}
|
|
{% if colorheaderback is null %}
|
|
{% set colorheaderback = "var(--colorfttitledark)" %}
|
|
{% endif %}
|
|
|
|
{% set stylewidget = "" %}
|
|
{% if not entity.autoajust %}
|
|
{% set stylewidget = stylewidget ~ "height: " ~ entity.height ~ "px; " %}
|
|
{% endif %}
|
|
|
|
{% if entity.border %}
|
|
{% set stylewidget = stylewidget ~ "border:1px solid " ~ colorheaderback ~ "; " %}
|
|
{% endif %}
|
|
|
|
{{ stylewidget }}
|
|
{% endmacro %}`
|
|
|
|
|
|
{% macro mystylewidgetmenu(entity) %}
|
|
{% set color = app.session.get('color') %}
|
|
|
|
{% set colorheaderfont = entity.colorheaderfont %}
|
|
{% if colorheaderfont is null %}
|
|
{% set colorheaderfont = "var(--colorfttitledark)" %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetmenu = "" %}
|
|
{% set stylewidgetmenu = stylewidgetmenu ~ "color: " ~ colorheaderfont ~ "; " %}
|
|
{% set stylewidgetmenu = stylewidgetmenu ~ "cursor: pointer; " %}
|
|
|
|
{{ stylewidgetmenu }}
|
|
{% endmacro %}`
|
|
|
|
|
|
|
|
{% macro mystylewidgetheader(entity) %}
|
|
|
|
{% set colorheaderback = entity.colorheaderback %}
|
|
{% if colorheaderback is null %}
|
|
{% set colorheaderback = "var(--colorbgbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% set colorheaderfont = entity.colorheaderfont %}
|
|
{% if colorheaderfont is null %}
|
|
{% set colorheaderfont = "var(--colorfttitledark)" %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetheader = "" %}
|
|
{% set stylewidgetheader = stylewidgetheader ~ "background-color: " ~ colorheaderback ~ "; " %}
|
|
{% set stylewidgetheader = stylewidgetheader ~ "color: " ~ colorheaderfont ~ "; " %}
|
|
|
|
{{ stylewidgetheader }}
|
|
{% endmacro %}`
|
|
|
|
|
|
|
|
|
|
{% macro mystylewidgetbody(entity) %}
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = "var(--colorbgbodydark)" %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = "var(--colorfttitledark)" %}
|
|
{% endif %}
|
|
|
|
{% if not entity.border %}
|
|
{% set colorbodyback = "var(--colorbgbodylight)" %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetbody = "" %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "background-color: " ~ colorbodyback ~ "; " %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "color: " ~ colorbodyfont ~ "; " %}
|
|
{% if not entity.autoajust %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "height: " ~ (entity.height-50-2) ~ "px; overflow-y: auto;" %}
|
|
{% endif %}
|
|
|
|
{% if entity.border %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "padding:10px;" %}
|
|
{% endif %}
|
|
|
|
{% if not entity.opened %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "display:none;" %}
|
|
{% endif %}
|
|
|
|
{{ stylewidgetbody }}
|
|
|
|
{% endmacro %}`
|
|
|
|
{% macro mystylewidgetbodyreverse(entity) %}
|
|
{% set color = app.session.get('color') %}
|
|
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = app.session.get('colorfttitledark') %}
|
|
{% endif %}
|
|
|
|
{% if colorbodyfont == colorbodyback %}
|
|
{% if colorbodyfont == app.session.get('colorbgbodydark') %}
|
|
{% set colorbodyfont=app.session.get('colorfttitledark') %}
|
|
{% else %}
|
|
{% set colorbodyfont=app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
|
|
{% set stylewidgetbody = "" %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "background-color: " ~ colorbodyback ~ "; " %}
|
|
{% set stylewidgetbody = stylewidgetbody ~ "color: " ~ colorbodyfont ~ "; " %}
|
|
|
|
|
|
{{ stylewidgetbody }}
|
|
|
|
{% endmacro %}`
|
|
|
|
|
|
|
|
{% macro mystylewidgetbodyframe(entity) %}
|
|
{% set color = app.session.get('color') %}
|
|
|
|
{% set colorheaderback = entity.colorheaderback %}
|
|
{% if colorheaderback is null %}
|
|
{% set colorheaderback = app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
|
|
{% set colorheaderfont = entity.colorheaderfont %}
|
|
{% if colorheaderfont is null %}
|
|
{% set colorheaderfont = app.session.get('colorfttitledark') %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = app.session.get('colorfttitledark') %}
|
|
{% endif %}
|
|
|
|
{% if not entity.border %}
|
|
{% set colorbodyback = app.session.get('colorbgbodylight') %}
|
|
{% endif %}
|
|
|
|
{% if colorbodyfont == colorbodyback %}
|
|
{% if colorbodyfont == app.session.get('colorbgbodydark') %}
|
|
{% set colorbodyfont=app.session.get('colorfttitledark') %}
|
|
{% else %}
|
|
{% set colorbodyfont=app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetbodyframe = "" %}
|
|
{% set stylewidgetbodyframe = stylewidgetbodyframe ~ "background-color: " ~ colorbodyback ~ "; " %}
|
|
{% set stylewidgetbodyframe = stylewidgetbodyframe ~ "color: " ~ colorbodyfont ~ "; " %}
|
|
{% if not entity.autoajust %}
|
|
{% set stylewidgetbodyframe = stylewidgetbodyframe ~ "height: " ~ (entity.height-50-2) ~ "px;" %}
|
|
{% endif %}
|
|
|
|
{{ stylewidgetbodyframe }}
|
|
|
|
{% endmacro %}`
|
|
|
|
|
|
|
|
|
|
|
|
{% macro mystylewidgetbodyimage(entity) %}
|
|
{% set color = app.session.get('color') %}
|
|
|
|
{% set colorheaderback = entity.colorheaderback %}
|
|
{% if colorheaderback is null %}
|
|
{% set colorheaderback = app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
|
|
{% set colorheaderfont = entity.colorheaderfont %}
|
|
{% if colorheaderfont is null %}
|
|
{% set colorheaderfont = app.session.get('colorfttitledark') %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = app.session.get('colorbgbodydark') %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = app.session.get('colorfttitledark') %}
|
|
{% endif %}
|
|
|
|
{% set stylewidgetbodyimage = "" %}
|
|
{% set stylewidgetbodyimage = stylewidgetbodyimage ~ "background-color: " ~ colorbodyback ~ "; " %}
|
|
{% set stylewidgetbodyimage = stylewidgetbodyimage ~ "color: " ~ colorbodyfont ~ "; " %}
|
|
{% if not entity.autoajust %}
|
|
{% set stylewidgetbodyimage = stylewidgetbodyimage ~ "height: " ~ (entity.height-2) ~ "px; " %}
|
|
{% endif %}
|
|
|
|
{{ stylewidgetbodyimage }}
|
|
{% endmacro %}` |