<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>MlTree Blog Edited</title>
    <link rel="stylesheet" href="../assets/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/css/common.css">
</head>

<body>
    <header class="layui-nav">
        <li class="layui-nav-item layui-this"> <a href="">控制面板</a> </li>
        <li class="layui-nav-item" onclick="goToEditor()"> <a href="">写作中心</a> </li>
    </header>
    <div class="layui-container" style="margin-top: 15px;">
        <div id="info" class="layui-row layui-col-space10">
            <div class="layui-col-xs6">
                <div class="layui-card">
                    <div class="layui-card-header layui-bg-red">欢迎回来，今天你要记录些什么吗？</div>
                    <div class="layui-card-body">
                        <ul>
                            <li>今天是<span id="date"></span></li>
                            <li>总文章数：{{= it.system.articleCount}}</li>
                            <li>总草稿数：{{= it.system.count}}</li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-card">
                    <div class="layui-card-header layui-bg-cyan">站点信息</div>
                    <div class="layui-card-body">
                        <ul>
                            <li>站点地址：{{= it.system.url}}</li>
                            <li>当前主题：{{= it.system.theme}}</li>
                            <li>部署地址：{{= it.system.deployUrl}}</li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs12">
                <div class="layui-card">
                    <div class="layui-card-header layui-bg-cyan">站点管理</div>
                    <div class="layui-card-body"> <button onclick="Rendering()" class="layui-btn layui-btn-normal"
                            title="编译"> <i class="layui-icon layui-icon-engine"></i> </button> <button class="layui-btn"
                            title="设置"> <i class="layui-icon layui-icon-set"></i> </button> </div>
                </div>
            </div>
        </div>
    </div>
    <script src="../assets/js/jquery-3.4.1.min.js"></script>
    <script src="../assets/js/doT.js"></script>
    <script src="../assets/js/marked.min.js"></script>
    <script src="../assets/layui/layui.js"></script>
    <script src="../assets/js/index.js"></script>
    <script src="../assets/layer/layer.js"></script>
    <script>
        $(function () {
            let date = new Date();
            $('#date').text(date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate());
        });

        function goToEditor() {
            showEditor();
        }

        function markToHtml(val) {
            return marked(val);
        }

        function TplRender(tplVal, data) {
            let tplFunc = doT.template(tplVal);
            let obj = JSON.parse(data);
            return tplFunc(obj);
        }

        function showDosWinow() {
            layer.msg
        }
    </script>
</body>

</html>