<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
    <title>oss-console</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 导航栏 -->
    <div class="layui-header">
        <a href="#" class="layui-logo">
            <span class="layui-logo-mini">oss-console</span>
            <span class="layui-logo-lg">oss-console</span>
        </a>
        <a class="side-toggle layui-layout-left" href="#">
            <i class="layui-icon layui-icon-shrink-right"></i>
            <i class="layui-icon layui-icon-spread-left"></i>
        </a>
        <ul class="layui-nav layui-layout-right">
            <li th:if="${unreadMessage != null}" class="layui-nav-item">
                <a href="/#/sys/message">
                    <i class="fa fa-bell-o fa-lg"></i>
                    <div class="layui-badge" th:text="${unreadMessage}"></div>
                </a>
            </li>
            <li class="layui-nav-item">
                <a class="timo-screen-full" href="#">
                    <i class="fa layui-icon layui-icon-screen-full"></i>
                </a>
            </li>
            <li class="layui-nav-item timo-nav-user">
                <a class="timo-header-screenName" th:text="${user.screenName}">oss-console</a>
                <div class="layui-nav-child">
                    <div class="timo-nav-child-box">
                        <div>
                            <a class="open-popup" data-title="个人信息" th:attr="data-url=@{/rbac/user/profile}" data-size="680,464">
                                <i class="fa fa-user-o"></i>个人信息</a>
                        </div>
                        <div>
                            <a class="open-popup" data-title="修改密码" th:attr="data-url=@{/rbac/user/passwd/edit}" data-size="456,296">
                                <i class="fa fa-lock" style="font-size:17px;width:12px;"></i>修改密码</a></div>
                        <div>
                            <a th:href="@{/logout}"><i class="fa fa-power-off"></i>退出登录</a>
                        </div>
                    </div>
                </div>
            </li>
        </ul>
    </div>

    <!-- 侧边栏 -->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 用户区域 -->
            <div class="layui-side-user">
                <img class="layui-side-user-avatar" th:src="@{${user.avatarUrl}}" alt="头像">
                <div>
                    <p class="layui-side-user-name" th:text="${user.screenName}">oss-console</p>
                    <p class="layui-side-user-designation">在线</p>
                </div>
            </div>
            <!-- TODO 导航区域(最多只能拥有三级菜单) -->
            <ul class="layui-nav layui-nav-tree" lay-filter="layui-nav-side">
                <li class="layui-nav-item" th:each="item:${treeMenu}">
                    <a href="javascript:" th:attr="lay-url=${item.value.url}">
                        <i th:class="${item.value.icon}"></i>
                        <span class="layui-nav-title" th:text="${item.value.name}">一级菜单</span>
                    </a>
                    <dl class="layui-nav-child" th:if="${item.value.children} != null">
                        <dd th:each="secondItem:${item.value.children}">
                            <a href="javascript:" th:attr="lay-url=${secondItem.value.url}">
                                <i th:class="${secondItem.value.icon}"></i>
                                <span class="layui-nav-title" th:text="${secondItem.value.name}">二级菜单</span>
                            </a>
                            <dl class="layui-nav-child" th:if="${secondItem.value.children} != null">
                                <dd th:each="thirdItem:${secondItem.value.children}">
                                    <a href="javascript:" th:attr="lay-url=${thirdItem.value.url}">
                                        <i th:class="${thirdItem.value.icon}"></i>
                                        <span class="layui-nav-title" th:text="${thirdItem.value.name}">三级菜单</span>
                                    </a>
                                </dd>
                            </dl>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <!-- 主体区域 -->
    <div class="layui-body layui-tab layui-tab-brief" lay-allowclose="true" lay-filter="iframe-tabs">
        <!-- 标签栏 -->
        <ul class="layui-tab-title"></ul>
        <!-- 内容区域 -->
        <div class="layui-tab-content"></div>
    </div>
</div>

<script th:replace="/common/template :: script"></script>
</body>
</html>
