-
-
-
-
- {{ user_cnt }}
+
+
+
+
+
+
+
+
+
+
+
+ {{attachment_cnt}}
+
+
+
+
+
+
+
+
-
-
+
+
-
-
- {{ pro_cnt }}
-
-
+
-
-
-
-
-
-
-
-
-
- {{ doc_cnt }}
-
-
+
-
-
-
-
-
-
-
-
-
-
-
- {{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(){