{% if get_user() %} { "widgettype":"HBox", "options":{ "css":"clickable", "popup":{ "options":{ "auto_dismiss":true }, "popup_desc":{ "widgettype":"urlwidget", "options":{ "url":"{{entire_url('user_menu.ui')}}" } }, "popup_event":"click" } }, "subwidgets":[ { "widgettype":"Icon", "options":{ "url":"{{entire_url('/imgs/people.png')}}", "rate":1.5 } }, { "widgettype":"Text", "options":{ "wrap":false, "text":"{{get_username()}}" } } ] } {% else %} { "widgettype":"IconBar", "options":{ "css":"filler", "tools":[ { "name":"login", "tip":"user login", "icon":"{{entire_url('/imgs/login.png')}}" }, { "name":"register", "tip":"user register", "icon":"{{entire_url('/imgs/register.png')}}" } ] }, "binds":[ { "wid":"self", "event":"login", "actiontype":"urlwidget", "target":"self", "options":{ "url":"{{entire_url('login.ui')}}" } }, { "wid":"self", "event":"register", "actiontype":"urlwidget", "target":"self", "options":{ "url":"{{entire_url('register.ui')}}" } } ] } {% endif %}