MrDoc/template/app_doc/doc.html

59 lines
2.5 KiB
HTML
Raw Normal View History

2019-12-15 15:45:05 +08:00
<!-- 继承自模板app_doc/docs_base.html -->
{% extends 'app_doc/docs_base.html' %}
<!-- 引入静态文件 -->
{% load staticfiles %}
2020-02-17 23:02:53 +08:00
{% block keyword %}{{ doc.name }},{{ project.name }},{% endblock %}
{% block description %}{{doc.pre_content | slice:"0:100"}}{% endblock %}
2019-12-15 15:45:05 +08:00
{% block title %}{{ doc.name }} - {{ project.name }}{% endblock %}
2019-12-15 15:45:05 +08:00
{% block head_toolbar %}
{% if request.user == doc.create_user %}
<a class="btn pull-left" aria-label="" href="{% url 'modify_doc' doc_id=doc.id %}">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn pull-left" aria-label="" href="{% url 'create_doc' %}" target="_blank">
<i class="fa fa-file"></i> 新建
</a>
{% endif %}
{% endblock %}
2019-12-15 15:45:05 +08:00
{% block content_head %}
<h1>{{ doc.name }}</h1><hr>
<p style="color: #666;font-size:12px;">
<!--<i class="fa fa-th-large"></i> 发表:{{ doc.create_time }}-->
&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-edit"></i> 最后修改于:{{ doc.modify_time }}
<!--<i class="fa fa-user"></i> {{ doc.create_user.username }}-->
</p>
{% endblock %}
2019-12-15 15:45:05 +08:00
{% block page_content %}
{# {{ doc.content | safe }} #}
<style>
div.editormd-toc-menu ul.markdown-toc-list li,ul.markdown-toc-list > li > ul li{
list-style: none;
}
2019-12-15 15:45:05 +08:00
</style>
<textarea id="" style="display: none;">{{ doc.pre_content }}</textarea>
2020-01-15 21:03:44 +08:00
{% endblock %}
{% block doc_previous_next %}
{% load doc_filter %}
2020-02-17 23:02:53 +08:00
<div class="layui-row" style="margin-top: 10px;padding:10px;display:flex;justify-content:space-around;border-top: 1px #e6e6e6 solid;">
<hr>
2020-01-15 21:03:44 +08:00
<div>
{% if doc.id|get_doc_previous == None %}
<button class="layui-btn layui-btn-disabled layui-btn-sm"><i class="layui-icon layui-icon-prev "></i>上一篇</button>
{% else %}
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_previous %}" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon layui-icon-prev "></i>上一篇</a>
{% endif %}
</div>
<div>
{% if doc.id|get_doc_next == None %}
<button class="layui-btn layui-btn-disabled layui-btn-sm">下一篇<i class="layui-icon layui-icon-next"></i></button>
{% else %}
<a href="{% url 'doc' doc.top_doc doc.id|get_doc_next %}" class="layui-btn layui-btn-normal layui-btn-sm">下一篇<i class="layui-icon layui-icon-next"></i></a>
{% endif %}
</div>
</div>
2019-12-15 15:45:05 +08:00
{% endblock %}