{% set widgethaveheader=entity.viewheader %} {%if widgethaveheader %} {% set widgetstyle=(entity.colorheaderback ? "border-color:"~entity.colorheaderback~";" : "border-color:var(--colorbgbodydark);") %} {% set widgetstylemenu=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %} {%else%} {% set widgetstyle=(entity.colorbodyback ? "border-color:"~entity.colorbodyback~";" : "border-color:var(--colorbgbodydark);") %} {% set widgetstylemenu="margin:-26px 0px 0px 0px; padding: 1px 10px; background-color:var(--colorbgbodydark); color: var(--colorfttitledark); border-radius: 5px;" %} {%endif%} {% set widgetstyleheader=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %} {% set widgetstylebody=(entity.colorbodyback ? "background-color:"~entity.colorbodyback~";" : "background-color:var(--colorbgbodylight);")~(entity.colorbodyfont ? "color:"~entity.colorbodyfont~";" : "color:var(--colorfttitlelight);")~(entity.isopened ? "display:block;" : "display:none;")~(widgetname=="url" ? "padding:0px;" : "")~(not widgethaveheader and not entity.border ? "padding-top: 0px" : "")~(entity.autoajust ? "" : "height:"~entity.height~"px;") %} {% set widgeicon= entity.icon ? path('app_minio_image',{file:entity.icon.label}) : path('app_minio_image',{file:"icon/icon_pin.png"}) %} {% if modedesktop is defined %} {% if modedesktop==0 %} {% set itemsize="item-verysmall" %} {% elseif modedesktop==1 %} {% set itemsize="item-small" %} {% elseif modedesktop==2 %} {% set itemsize="item-medium" %} {% elseif modedesktop==3 %} {% set itemsize="item-large" %} {% elseif modedesktop==4 %} {% set itemsize="item-list" %} {% endif %} {% endif %} {% if app.user %} {% set username = app.user.username %} {% else %} {% set username = "" %} {% endif %} {% set colorbodyfont = "color: var(--colorfttitlelight)" %} {% if entity.colorbodyfont is not null %} {% set colorbodyfont = "color: " ~ entity.colorbodyfont %} {% endif %}