<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8"/>
    <title>{% block title %}{% end %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <!-- style -->
    <!-- build:css ../css/site.min.css -->
    <link rel="stylesheet" href="{{ static_url('css/bootstrap.css') }}" type="text/css"/>
    <link rel="stylesheet" href="{{ static_url('css/theme.css') }}" type="text/css"/>
    <link rel="stylesheet" href="{{ static_url('css/style.css') }}" type="text/css"/>
    {% block css %}{% end %}
    <!-- endbuild -->
</head>
<body class="layout-row">
<div id="aside" class="page-sidenav no-shrink bg-light nav-dropdown fade" aria-hidden="true">
    <div class="sidenav h-100 modal-dialog bg-light">
        <!-- sidenav top -->
        <div class="navbar">
            <!-- brand -->
            <a href="/dashboard" class="navbar-brand ">
                <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none"
                     stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                     class="feather feather-slack">
                    <path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path>
                    <path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path>
                    <path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path>
                    <path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path>
                    <path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path>
                    <path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path>
                    <path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path>
                    <path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>
                </svg>

                <!--<img src="{{ static_url('img/logo.png') }}" alt="...">-->
                <span class="hidden-folded d-inline l-s-n-1x ">Swan Beta</span>
            </a>
            <!-- / brand -->
        </div>
        <!-- Flex nav content -->
        <div class="flex scrollable hover">
            <div class="nav-active-text-primary" data-nav>
                <ul class="nav bg">
                    <li class="nav-header hidden-folded">
                        <span class="text-muted">仪表盘</span>
                    </li>
                    <li>
                        <a href="dashboard">
                            <span class="nav-icon text-primary"><i data-feather='home'></i></span>
                            <span class="nav-text">首页</span>
                        </a>
                    </li>
                    <li class="nav-header hidden-folded">
                        <span class="text-muted">功能管理</span>
                    </li>
                    <li>
                        <a href="sitelist" class="">
                            <span class="nav-icon"><i data-feather='list'></i></span>
                            <span class="nav-text">网站管理</span>
                        </a>
                    </li>

                    <li>
                        <a href="column_list" class="">
                            <span class="nav-icon"><i data-feather='columns'></i></span>
                            <span class="nav-text">栏目管理</span>
                        </a>

                    </li>

                    <li>
                        <a href="#" class="">
                            <span class="nav-icon"><i data-feather='globe'></i></span>
                            <span class="nav-text">系统建站</span>
                            <span class="nav-caret"></span>
                        </a>
                        <ul class="nav-sub nav-mega">
                            <li>
                                <a href="single" class="">
                                    <span class="nav-text">独立建站</span>
                                </a>
                            </li>
                            <li>
                                <a href="batch" class="">
                                    <span class="nav-text">批量建站</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <!--
                    <li>
                        <a href="#" class="hidden-folded">
                            <span class="nav-icon"><i data-feather='box'></i></span>
                            <span class="nav-text">插件管理</span>
                            <span class="nav-caret"></span>
                            <ul class="nav-sub nav-mega">
                                <li>
                                    <a href="plugins" class="">
                                        <span class="nav-text">插件市场</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="my-plugins" class="">
                                        <span class="nav-text">我的插件</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="buyplugins" class="">
                                        <span class="nav-text">已购插件</span>
                                    </a>
                                </li>
                            </ul>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="hidden-folded">
                            <span class="nav-icon"><i data-feather='layout'></i></span>
                            <span class="nav-text">模板管理</span>
                            <span class="nav-caret"></span>
                            <ul class="nav-sub nav-mega">
                                <li>
                                    <a href="#" class="">
                                        <span class="nav-text">模板市场</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="#" class="">
                                        <span class="nav-text">本地模板</span>
                                    </a>
                                </li>
                            </ul>
                        </a>
                    </li>
                    -->
                    <li>
                        <a href="uploadfile" class="">
                            <span class="nav-icon"><i data-feather='upload'></i></span>
                            <span class="nav-text">文件管理</span>
                        </a>
                    </li>
                    <li>
                        <a href="accesslog" class="">
                            <span class="nav-icon"><i data-feather='activity'></i></span>
                            <span class="nav-text">访问统计</span>
                        </a>
                    </li>
                </ul>
                <ul class="nav ">
                    <li class="nav-header hidden-folded">
                        <span class="text-muted">内容管理</span>
                    </li>
                    <li>
                        <a href="#" class="">
                            <span class="nav-icon"><i data-feather='grid'></i></span>
                            <span class="nav-text">内容管理</span>
                            <span class="nav-caret"></span>
                        </a>
                        <ul class="nav-sub nav-mega">
                            <li>
                                <a href="articlelist" class="">
                                    <span class="nav-text">文章数据</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="pageupdate_info" class="">
                            <span class="nav-icon"><i data-feather='command'></i></span>
                            <span class="nav-text">数据采集</span>
                        </a>

                    </li>

                    <li class="nav-header hidden-folded">
                        <span class="text-muted">系统设置</span>
                    </li>

                    <li>
                        <a href="#" class="">
                            <span class="nav-icon"><i data-feather='users'></i></span>
                            <span class="nav-text">用户管理</span>
                            <span class="nav-caret"></span>
                        </a>
                        <ul class="nav-sub nav-mega">
                            <li>
                                <a href="member" class="">
                                    <span class="nav-text">升级会员</span>
                                </a>
                            </li>
                            <li>
                                <a href="order" class="">
                                    <span class="nav-text">交易信息</span>
                                </a>
                            </li>
                            <li>
                                <a href="profile" class="">
                                    <span class="nav-text">个人信息</span>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="setting" class="">
                            <span class="nav-icon"><i data-feather='settings'></i></span>
                            <span class="nav-text">基础设置</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- sidenav bottom -->
        <div class="no-shrink ">
            <div class="p-3 d-flex align-items-center">
                <div class="text-sm hidden-folded text-muted">
                    <div class="text-sm hidden-folded text-muted">
                        当前时间:<span class="nav-text" id="now_time"></span>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<!-- ############ Aside END-->
<div id="main" class="layout-column flex">
    <!-- ############ Header START-->
    <div id="header" class="page-header ">
        <div class="navbar navbar-expand-lg">
            <!-- brand -->
            <a href="/" class="navbar-brand d-lg-none">
                <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none"
                     stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                     class="feather feather-slack">
                    <path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path>
                    <path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path>
                    <path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path>
                    <path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path>
                    <path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path>
                    <path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path>
                    <path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path>
                    <path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>
                </svg>

                <!-- <img src="../img/logo.png" alt="..."> -->
                <span class="hidden-folded d-inline l-s-n-1x ">Swan Beta</span>
            </a>
            <!-- / brand -->
            <!-- Navbar collapse -->
            <div class="collapse navbar-collapse order-2 order-lg-1" id="navbarToggler">
                {% if not current_user['initialed'] %}
                <div id="global-notic" class="alert alert-warning" role="alert">
                    <i width="15px" height="15px" data-feather="alert-circle"></i>
                    <span class="mx-2">还未初始化必要数据,请前往<a href="setting">设置</a>页面进行全局初始化!</span>
                </div>
                {% end %}
                {% if current_user['c_version_update']=='1' or current_user['c_f_version_update']=='1' %}
                <div id="version-notic" class="alert alert-primary" role="alert">
                    <i width="15px" height="15px" data-feather="alert-circle"></i>
                    <span class="mx-2">有新的版本可供升级,请前往<a href="update"> 更新 </a>页面进行升级!</span>
                </div>
                {% end %}
            </div>
            <ul class="nav navbar-menu order-1 order-lg-2 top-header-info">
                <li class="nav-item d-none d-sm-block">
                    <a class="nav-link px-2" data-toggle="fullscreen" data-plugin="fullscreen">
                        <i data-feather="maximize"></i>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link px-2" data-toggle="dropdown">
                        <i data-feather="settings"></i>
                    </a>
                    <!-- ############ Setting START-->
                    <div class="dropdown-menu dropdown-menu-center mt-3 w animate fadeIn">
                        <div class="setting px-3">
                            <div class="mb-2 text-muted">
                                <strong>界面设置:</strong>
                            </div>
                            <div class="mb-3" id="settingLayout">
                                <label class="ui-check ui-check-rounded my-1 d-block">
                                    <input type="checkbox" name="stickyHeader">
                                    <i></i>
                                    <small>固定顶部</small>
                                </label>
                                <label class="ui-check ui-check-rounded my-1 d-block">
                                    <input type="checkbox" name="stickyAside">
                                    <i></i>
                                    <small>固定侧边栏</small>
                                </label>
                                <label class="ui-check ui-check-rounded my-1 d-block">
                                    <input type="checkbox" name="foldedAside">
                                    <i></i>
                                    <small>折叠侧边栏</small>
                                </label>
                                <label class="ui-check ui-check-rounded my-1 d-block">
                                    <input type="checkbox" name="hideAside">
                                    <i></i>
                                    <small>隐藏侧边栏</small>
                                </label>
                            </div>
                            <div class="mb-2 text-muted">
                                <strong>背景颜色:</strong>
                            </div>
                            <div class="mb-2">
                                <label class="radio radio-inline ui-check ui-check-md">
                                    <input type="radio" name="bg" value="">
                                    <i></i>
                                </label>
                                <label class="radio radio-inline ui-check ui-check-color ui-check-md">
                                    <input type="radio" name="bg" value="bg-dark">
                                    <i class="bg-dark"></i>
                                </label>
                            </div>
                        </div>
                    </div>
                    <!-- ############ Setting END-->
                </li>
                <!-- User dropdown menu -->
                <li class="nav-item dropdown">
                    <a href="#" data-toggle="dropdown" class="nav-link d-flex align-items-center px-2 text-color">
                        <span class="avatar w-24" style="margin: -2px;box-shadow: none;"><img
                                src="{{ static_url('img/default.png') }}"
                                alt="..."></span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right w mt-3 animate fadeIn">
                        <a class="dropdown-item" href="/profile" style="padding-bottom: 0.08rem; font-size:15px;">
                            {% if current_user['group_name']=="ee" %}
                            <img style="margin-bottom:2px;" src="{{ static_url('img/ee.png') }}" width="20"
                                 height="20"/>
                            {% elif current_user['group_name']=="pro" %}
                            <img style="margin-bottom:2px;" src="{{ static_url('img/pro.png') }}" width="20"
                                 height="20"/>
                            {% elif current_user['group_name']=="vip" %}
                            <img style="margin-bottom:2px;" src="{{ static_url('img/vip.png') }}" width="20"
                                 height="20"/>
                            {% else %}
                            <img style="margin-bottom:2px;" src="{{ static_url('img/free.png') }}" width="20"
                                 height="20"/>
                            {% end %}
                            <span class="font-weight-500">{{ current_user['nickname'] }}</span>
                        </a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/profile">
                            <span>个人信息</span>
                        </a>
                        <a class="dropdown-item" href="/order">
                            <span>购买记录</span>
                        </a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/setting">系统设置</a>
                        <a class="dropdown-item" href="/logout">注销</a>
                        <div class="dropdown-divider"></div>
                        <span class="runtime text-muted">程序已运行: {{ current_user['runtime'] }}天</span>
                    </div>
                </li>
                <!-- Navarbar toggle btn -->
                <li class="nav-item d-lg-none">
                    <a class="nav-link px-1" data-toggle="modal" data-target="#aside">
                        <i data-feather="menu"></i>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <!-- ############ Footer END-->
    <!-- ############ Content START-->
    <div id="content" class="flex ">
        <!-- ############ Main START-->
        {% block content %}{% end %}
        <!-- ############ Main END-->
    </div>
    <!-- ############ Content END-->
    <!-- ############ Footer START-->
    <div id="footer" class="page-footer hide">
        <div class="d-flex p-3">
            <span class="text-sm text-muted flex">&copy; Copyright. Swan</span>
            <div class="text-sm text-muted">Beta Version 1.0</div>
        </div>
    </div>
    <!-- ############ Footer END-->
</div>
<!-- build:js ../js/site.min.js -->
<!-- jQuery -->

<script src="{{ static_url('libs/jquery/dist/jquery.min.js') }}"></script>
<!-- Bootstrap -->
<script src="{{ static_url('libs/popper.js/dist/umd/popper.min.js') }}"></script>
<script src="{{ static_url('libs/bootstrap/dist/js/bootstrap.min.js') }}"></script>
<!-- ajax page -->

<!--<script src="{{static_url('libs/pjax/pjax.min.js')}}"></script>-->
<!--<script src="{{static_url('js/ajax.js')}}"></script>-->

<!-- lazyload plugin -->
<script src="{{ static_url('js/lazyload.config.js') }}"></script>
<script src="{{ static_url('js/lazyload.js') }}"></script>
<script src="{{ static_url('js/plugin.js') }}"></script>
<!-- scrollreveal -->
<script src="{{ static_url('libs/scrollreveal/dist/scrollreveal.min.js') }}"></script>
<!-- feathericon -->
<script src="{{ static_url('libs/feather-icons/dist/feather.min.js') }}"></script>
<script src="{{ static_url('js/plugins/feathericon.js') }}"></script>
<!-- theme -->
<script src="{{ static_url('js/theme.js') }}"></script>
<script src="{{ static_url('js/utils.js') }}"></script>
<!-- endbuild -->
{% block js %} {% end %}
<script>
    window.onload = function () {
        //每1秒刷新时间
        setInterval("NowTime()", 1000);
    }

    function NowTime() {
        //获取年月日
        var time = new Date();
        var year = time.getFullYear();
        var month = time.getMonth() + 1;
        var day = time.getDate();

        //获取时分秒
        var h = time.getHours();
        var m = time.getMinutes();
        var s = time.getSeconds();

        //检查是否小于10
        h = check(h);
        m = check(m);
        s = check(s);
        year = check(year);
        month = check(month);
        day = check(day);
        document.getElementById("now_time").innerHTML = month + "-" + day + " " + h + ":" + m + ":" + s;
    }

    //时间数字小于10，则在之前加个“0”补位。
    function check(i) {
        //方法一，用三元运算符
        var num;
        i < 10 ? num = "0" + i : num = i;
        return num;

        //方法二，if语句判断
        //if(i<10){
        //    i="0"+i;
        //}
        //return i;
    }
</script>
</body>
</html>
