<header class="main-header">
    <!-- Logo -->
    <a href="#(CPATH)/ucenter" class="logo">
        <span class="logo-mini"><b>JPr</b></span>
        <span class="logo-lg"><b>#option('web_name','JPress')</b></span>
    </a>
    <nav class="navbar navbar-static-top">
        #if(showToggle)
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">切换</span>
        </a>
        #end

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <li class="dropdown user user-menu">
                    <a href="#(CPATH)/ucenter/index">
                        <img src="#(USER.avatar ??)" class="user-image">
                        <span class="hidden-xs">您好 #(user.nickname ??) , 欢迎回来</span>
                    </a>
                </li>




                <li class="dropdown messages-menu" style="border-left: 1px solid #ccc;">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <i class="fa fa-fw fa-shopping-cart"></i>
                        #if(USER_CARTS_COUNT && USER_CARTS_COUNT > 0)
                        <span class="label label-danger">#(USER_CARTS_COUNT)</span>
                        #end
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">购物车列表</li>
                        <li>
                            <ul class="menu" style="background-color: #f7f7f7">

                                #for(userCart : USER_CARTS)
                                <li>
                                    <a href="#(userCart.product_link ?? '#')" target="_blank">
                                        #if(userCart.product_thumbnail)
                                        <div class="pull-left">
                                            <img src="#(userCart.product_thumbnail)" class="img-circle" >
                                        </div>
                                        <h4>
                                            #maxLength(userCart.product_title ??,16,'...')
                                        </h4>
                                        <p>#maxLength(userCart.product_summary ??,20,'...')</p>
                                        #else
                                        <h4 style="margin: 0">
                                            #maxLength(userCart.product_title ??,16,'...')
                                        </h4>
                                        <p style="margin: 0">#maxLength(userCart.product_summary ??,20,'...')</p>
                                        #end
                                    </a>
                                </li>
                                #end

                            </ul>
                        </li>
                        <li class="footer"><a href="#(CPATH)/ucenter/cart" style="color: #3c8dbc !important;" target="_blank">查看全部</a></li>
                    </ul>
                </li>

                <li style="border-left: 1px solid #ccc;">
                    <a href="#(CPATH)/" target="_blank">
                        <i class="fa fa-fw fa-home"></i>
                    </a>
                </li>

                <li style="border-left: 1px solid #ccc;">
                    <a href="#(CPATH)/ucenter/logout">
                        <i class="fa fa-fw fa-circle-o-notch"></i>退出
                    </a>
                </li>
            </ul>
        </div>
    </nav>
</header>