{{if w==null}} {{widget_id=queries['widget_id']}} {{w=widget_by_id widget_id}} {{end}} {{if db==null}} {{dashboard = queries['dashboard']}} {{db=dashboard_ref dashboard}} {{end}} {{if dbs==null}} {{dbs=dashboards_ref}} {{end}} {{wid = w.id}} {{style_css=''}} {{if db.layout == 'FIXED_RESIZEABLE' || db.layout == 'MASONRY_RESIZEABLE'}} {{swidth=''}} {{sheight=''}} {{if w.width>0}} {{swidth='width:' | string.append w.width | string.append 'px;'}} {{end}} {{if w.height>0}} {{h=w.height}} {{sheight='height:' | string.append h | string.append 'px;'}} {{end}} {{if w.width>0 || w.height>0}} {{style_css='overflow:hidden;' | string.append sheight | string.append swidth}} {{end}} {{if db.layout == 'FIXED_RESIZEABLE'}} {{style_css=style_css | string.append 'position:fixed;left: ' | string.append position_left | string.append 'px; top: ' | string.append position_top | string.append 'px;'}} {{end}} {{end}} {{style_css=style_css | string.append 'border: ' | string.append w.border_size | string.append 'px solid #999999; border-color: ' | string.append w.border_color | string.append '; border-radius: ' | string.append w.border_radius | string.append 'px; background: ' | string.append w.background_color | string.append ';'}} {{if w.stretch_background}} {{stretch='background-size: cover;'}} {{else}} {{stretch='background-position: center;'}} {{end}}