{% set widgethaveheader=entity.viewheader %} {% set widgetname="item" %} {%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="background-color:var(--colorbgbodydark); color: var(--colorfttitledark); padding:10px; 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);") %} {% set widgeicon= entity.icon ? path('app_minio_image',{file:entity.icon.label}) : path('app_minio_image',{file:"icon/icon_pin.png"}) %} {% 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 %} {% if app.user %} {% set username = app.user.username %} {% else %} {% set username = "" %} {% endif %} {% set colorbodyfont = "" %} {% if entity.colorbodyfont is not null %} {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} {% endif %}