MrDoc/template/app_doc/manage_base.html
2019-07-24 10:45:45 +08:00

89 lines
3.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{# 文档、文集、文档模板管理基础HTML模板 #}
{% load staticfiles %}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %} - MrDoc</title>
<link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
<style>
.logo img{
height: 30px;
}
.layui-btn a{
color:white;
}
</style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">
<a class="logo" href="{% url 'pro_list' %}">
<img src="/media/logo-white.png" />
</a>
</div>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item">
<a href="javascript:;">
<i class="layui-icon layui-icon-username"></i> {{request.user.username}}
</a>
<dl class="layui-nav-child">
<!-- <dd><a href="">基本资料</a></dd> -->
<dd><a href="{% url 'logout' %}">退出登录</a></dd>
</dl>
</li>
</ul>
</div>
<div class="layui-side layui-bg-black">
<div class="layui-side-scroll">
<!-- 左侧导航区域可配合layui已有的垂直导航 -->
<ul class="layui-nav layui-nav-tree" lay-filter="test">
<li class="layui-nav-item layui-nav-itemed">
<a href="{% url 'manage_project' %}"><i class="layui-icon layui-icon-list"></i> 文集管理</a>
</li>
<li class="layui-nav-item layui-nav-itemed">
<a href="{% url 'manage_doc' %}"><i class="layui-icon layui-icon-file-b"></i> 文档管理</a>
</li>
<li class="layui-nav-item layui-nav-itemed">
<a href="{% url 'manage_doctemp' %}"><i class="layui-icon layui-icon-template"></i> 文档模板管理</a>
</li>
</ul>
</div>
</div>
<div class="layui-body">
<!-- 内容主体区域 -->
<div style="padding: 15px;">{% block content %}{% endblock %}</div>
</div>
<div class="layui-footer" style="text-align:center;">
<!-- 底部固定区域 -->
© <a href="/">MrDoc 2019</a>
</div>
</div>
<script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<script src="{% static 'layui/layui.all.js' %}"></script>
<script>
//为当前页面的目录链接添加样式
$("li a").each(function (i) {
var $me = $(this);
var lochref = $.trim(window.location.href);
var mehref = $.trim($me.get(0).href);
if (lochref.indexOf(mehref) != -1) {
//console.log($me,lochref,mehref)
$me.parent().addClass("layui-this");
} else {
//console.log(lochref,mehref)
$me.parent().removeClass("layui-this");
}
});
$.ajaxSetup({
data: {csrfmiddlewaretoken: '{{ csrf_token }}' },
});
</script>
{% block custom_script %}
{% endblock %}
</body>
</html>