From 9f4236ecd9d2cdb6730cdd71a0752aea4329e5e2 Mon Sep 17 00:00:00 2001 From: yangjian Date: Sat, 21 Nov 2020 21:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E6=A1=A3=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BD=9C=E8=80=85=E6=82=AC=E6=B5=AE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/mrdoc/mrdoc.css | 41 +++------------------------------ template/app_doc/doc.html | 6 ++++- template/app_doc/docs_base.html | 3 +++ 3 files changed, 11 insertions(+), 39 deletions(-) diff --git a/static/mrdoc/mrdoc.css b/static/mrdoc/mrdoc.css index 6c69b70..b1a195f 100644 --- a/static/mrdoc/mrdoc.css +++ b/static/mrdoc/mrdoc.css @@ -374,7 +374,7 @@ li.active > a,li.active > div > a{ } /* 返回顶部 */ -.toTop { +.toTop,.tocMenu,.shareDoc,.editDoc{ width: 40px; height: 40px; border-radius: 50%; @@ -389,28 +389,7 @@ li.active > a,li.active > div > a{ font-size: 12px; */ } -.toTop:hover { - background: #eeeeee; - font-size: 14px; - cursor: pointer; - color: red; -} -/* 文档目录 */ -.tocMenu{ - width: 40px; - height: 40px; - border-radius: 50%; - background: #f6f6f6; - text-align: center; - line-height: 40px; - /*返回顶部标签固定定位*/ - /* position: fixed; - right: 35px; - bottom: 90px; - z-index: 999; - font-size: 12px; */ -} -.tocMenu:hover,.shareDoc:hover { +.toTop:hover,.tocMenu:hover,.shareDoc:hover,.editDoc:hover { background: #eeeeee; font-size: 14px; cursor: pointer; @@ -419,21 +398,7 @@ li.active > a,li.active > div > a{ .doc-toc-hide{ display: none; } -/* 分享按钮 */ -.shareDoc{ - width: 40px; - height: 40px; - border-radius: 50%; - background: #f6f6f6; - text-align: center; - line-height: 40px; - /*返回顶部标签固定定位*/ - /* position: fixed; - right: 35px; - bottom: 135px; - z-index: 999; - font-size: 14px; */ -} + /*切换字号*/ .switch-font{ diff --git a/template/app_doc/doc.html b/template/app_doc/doc.html index 8f4a3cb..a9ae9b4 100644 --- a/template/app_doc/doc.html +++ b/template/app_doc/doc.html @@ -97,11 +97,15 @@ {% endblock %} {% block right_widget %} + +{% if doc.create_user == request.user %} + +{% endif %} {% if project.role == 1 and request.user == doc.create_user %} -
+
{% endif %} {% endblock %} diff --git a/template/app_doc/docs_base.html b/template/app_doc/docs_base.html index 30e5d0b..7115edd 100644 --- a/template/app_doc/docs_base.html +++ b/template/app_doc/docs_base.html @@ -560,12 +560,15 @@ $(document).ready(function() { // 初始时,“返回顶部”标签隐藏 $(".toTop").hide(); + $(".editDoc").hide(); $(window).scroll(function() { // 若滚动的高度,超出指定的高度后,“返回顶部”的标签出现。 if($(document).scrollTop() >= 140) { $(".toTop").show(); + $(".editDoc").show(); } else { $(".toTop").hide(); + $(".editDoc").hide(); } }) // 绑定点击事件,实现返回顶部的效果