From c62247a3f10fb77a15509ec69502671f031cfba3 Mon Sep 17 00:00:00 2001 From: yangjian Date: Tue, 16 Mar 2021 21:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96HTML=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/app_admin/admin_overview.html | 145 ++++++++++-------- template/app_doc/doc.html | 2 +- template/app_doc/docs_base.html | 129 +++------------- .../app_doc/editor/tpl_editor_editormd.html | 2 +- 4 files changed, 105 insertions(+), 173 deletions(-) diff --git a/template/app_admin/admin_overview.html b/template/app_admin/admin_overview.html index e274df3..6c03203 100644 --- a/template/app_admin/admin_overview.html +++ b/template/app_admin/admin_overview.html @@ -10,79 +10,100 @@ {% block content %}
-
-
-
用户总数
-
-
-
- {{ user_cnt }} +
+
+
+
用户总数
+
+
+
+ {{ user_cnt }} +
+
+
-
-
+
+
+
文集总数
+
+
+
+ {{ pro_cnt }} +
+
+ +
+
+
+
+
+
+
+
文档总数
+
+
+
+ {{ doc_cnt }} +
+
+ +
+
+
+
+
+
+
+
图片总数
+
+
+
+ {{img_cnt}} +
+
+ +
+
+
+
+
+
+
+
附件总数
+
+
+
+ {{attachment_cnt}} +
+
+ +
+
+
+
+
+
+
-
-
文集总数
+
+
觅道文档 {{mrdoc_version}}
-
-
- {{ pro_cnt }} -
-
- -
+
+ Gitee
-
-
-
-
-
-
文档总数
-
-
-
- {{ doc_cnt }} -
-
- -
+
+ GitHub
-
-
-
-
-
-
图片总数
-
-
-
- {{img_cnt}} -
-
- -
+
+ QQ群
+
-
-
-
-
-
附件总数
-
-
-
- {{attachment_cnt}} -
-
- -
-
-
-
+
diff --git a/template/app_doc/doc.html b/template/app_doc/doc.html index 5c6916c..2580160 100644 --- a/template/app_doc/doc.html +++ b/template/app_doc/doc.html @@ -210,7 +210,7 @@ } // 切换文档目录显示与否 $(".tocMenu").click(function() { - console.log("切换文档目录显示") + // console.log("切换文档目录显示") $(".sidebar").toggleClass("doc-toc-hide"); }); diff --git a/template/app_doc/docs_base.html b/template/app_doc/docs_base.html index 7f91454..9c486c3 100644 --- a/template/app_doc/docs_base.html +++ b/template/app_doc/docs_base.html @@ -300,20 +300,23 @@

作者博客:https://zmister.com

-
-
+
+
+ {% if doc.editor_mode == 2 %} @@ -325,75 +328,12 @@ @@ -412,47 +352,17 @@ var img_viewer = new Viewer(document.getElementById('content'), img_options); {% endif %} - // 收藏文集 - var layer = layui.layer; - $("#collect_pro").click(function(e){ - $(this).toggleClass("layui-icon-star-fill layui-icon-star"); - $(this).toggleClass("collected"); - $.ajax({ - url:'/my_collect/', - type:'post', - data:{'type':2,'id':'{{project.id}}'}, - success:function(r){ - layer.msg(r.data) - }, - error:function(){ - layer.msg("操作异常") - } - }); - }); - // 收藏文档 - $("#collect_doc").click(function(){ - $(this).toggleClass("layui-icon-star-fill layui-icon-star") - $(this).toggleClass("collected") - $.ajax({ - url:'/my_collect/', - type:'post', - data:{'type':1,'id':'{{doc.id}}'}, - success:function(r){ - layer.msg(r.data) - }, - error:function(){ - layer.msg("操作异常") - } - }) - }); // 外部链接添加图标 document.addEventListener('DOMContentLoaded', function() { Array.prototype.filter.call(document.links, function(link) { return link.hostname && link.hostname !== location.hostname; }) - .forEach(function(link) { + .forEach(function(link) { + // console.log(link,$(link).children('img').length) + if($(link).children().length == 0){ link.classList.add('external'); - }); + } + }); }); @@ -475,6 +385,7 @@ $("#ad-3").appendTo($("#ad-code-3")); {% endif %} + {% if debug %} diff --git a/template/app_doc/editor/tpl_editor_editormd.html b/template/app_doc/editor/tpl_editor_editormd.html index 7f20922..60fa4b3 100644 --- a/template/app_doc/editor/tpl_editor_editormd.html +++ b/template/app_doc/editor/tpl_editor_editormd.html @@ -219,7 +219,7 @@ sequenceDiagram : true, //开启序列图 imageUpload : true, //开启图片上传 codeFold :true, //代码折叠 - htmlDecode : "link,style,base,script", //过滤部分HTML标签 + htmlDecode : "link,style,base,script|on*", //过滤部分HTML标签 imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], imageUploadURL : "{% url 'upload_doc_img' %}", onchange:function(){