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(); } }) // 绑定点击事件,实现返回顶部的效果