Skip to content

Commit 3ca75b5

Browse files
committed
回到顶部与导航栏样式调整
1 parent da1059d commit 3ca75b5

File tree

3 files changed

+31
-23
lines changed

3 files changed

+31
-23
lines changed

static/css/main.css

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ textarea{
6666
color: #333;
6767
max-width: 300px;
6868
white-space:nowrap;
69-
overflow: hidden;
69+
/* overflow: hidden; */
7070
}
7171
.manual-reader .slidebar {
7272
margin: 7px 10px 0 0;
7373
}
7474
.user-info{
7575
border: 0;
7676
background-color: #ffffff;
77-
padding: 5px 10px !important;
77+
padding: 9px 10px !important;
7878
cursor: pointer;
7979
}
8080
.user-info:hover{
@@ -397,7 +397,7 @@ textarea{
397397
}
398398
/**************用户搜索界面样式********************/
399399
.searchbar{
400-
padding: 8px;
400+
padding: 12px 8px;
401401
}
402402
.searchbar .search-btn {
403403
display: inline-block;
@@ -634,16 +634,19 @@ textarea{
634634

635635

636636
/* 以下是Bookstack的修正样式 */
637-
.navbar{min-height: 49px;}
637+
.navbar{min-height: 60px;}
638638
.navbar-brand{padding-left: 0px;}
639639
a{color: #333}
640640
.mgt-15px{margin-top: 15px;}
641641
.mgr-15px{margin-right: 15px;}
642642
.mgb-15px{margin-bottom: 15px;}
643643
.text-danger{color: red;}
644644
.none-listyle{list-style: none;padding: 0px;}
645-
.btn-group.dropdown-menu-right.pull-right.slidebar.visible-xs-inline-block.visible-sm-inline-block{margin-top: 7px;}
645+
.btn-group.dropdown-menu-right.pull-right.slidebar.visible-xs-inline-block.visible-sm-inline-block{margin-top: 12px;margin-right: 0;}
646646
.navbar-nav>li.active a{background-color: #EFEFEF;color: #06f;padding-bottom: 16px;}
647+
.navbar-nav>li>a{
648+
font-size: 15px;line-height: 28px;
649+
}
647650
.manual-list .list-item .manual-item-standard .cover{box-shadow: none;}
648651
.manual-list{
649652
padding-top: 15px;
@@ -675,7 +678,7 @@ a{color: #333}
675678

676679
.border{border: 1px solid #efefef;}
677680
.border-cover-img{box-shadow: 0px 1px 3px rgba(0,0,0,.1);border-radius: 4px;}
678-
.navbar-brand>img.logo{height: 50px;margin-top: -15px;}
681+
.navbar-brand>img.logo{height: 55px;margin-top: -13px;}
679682
#bookstack-intro{padding-top: 70px;}
680683
#bookstack-intro ul,#bookstack-intro li{list-style: none;padding:0px;}
681684
#bookstack-intro h1{font-size: 22px;line-height: 150%;color: #555;margin-top: 10px;}
@@ -764,7 +767,7 @@ a{color: #333}
764767
.row-cate-sub a{display: inline-block;text-align: center;}
765768
.row-cate-sub a img{width: 60px;height: 60px;border-radius: 4px;}
766769

767-
.cate-list{margin-top: 70px;}
770+
.cate-list{margin-top: 75px;}
768771
.cate-list .panel-recommend .pull-right{position: relative;top:3px;color: #06f;}
769772
.cate-list .panel-recommend .panel-body{padding: 15px 9px;}
770773
.cate-list .panel-recommend .panel-body a .help-block{
@@ -995,6 +998,7 @@ a{color: #333}
995998
line-height: 40px;
996999
border-radius: 4px;
9971000
cursor: pointer;
1001+
background-color: #fff;
9981002
}
9991003
.backtop:hover{background-color: #dddddd;color: #10af88;}
10001004
.wait2del>div{margin-bottom: 15px;}

static/images/logo.png

-2.47 KB
Loading

views/cates/list.html

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,20 @@ <h3 class="panel-title">
105105
<script>
106106
'use strict';
107107
$(function () {
108+
$(".cate-item").tooltip();
109+
$(".backtop").click(function () {
110+
$(window).scrollTop(0)
111+
});
112+
$(".cate-item").click(function (e) {
113+
e.preventDefault()
114+
location.href=$(this).find("a").attr("href")
115+
});
116+
$(".panel-recommend .panel-body a").tooltip();
117+
108118
function setFixedWith(){
109119
$(".category-index .panel-default").attr("style","width:"+$(".category-index").width()+"px")
110120
}
121+
111122
function fixed(){
112123
var top = $(".category-index").offset().top
113124
var height = $(window).height() - 110 - 70
@@ -131,13 +142,8 @@ <h3 class="panel-title">
131142
}
132143
}
133144
}
134-
$(".cate-item").tooltip();
145+
135146
$(".category-index a").tooltip();
136-
$(".panel-recommend .panel-body a").tooltip();
137-
$(".cate-item").click(function (e) {
138-
e.preventDefault()
139-
location.href=$(this).find("a").attr("href")
140-
});
141147
$(".category-index a").click(function () {
142148
var show=$(this).attr("data-show"),panels = $('.category-detail .panel');
143149
$(".category-index a").removeClass("active");
@@ -150,18 +156,16 @@ <h3 class="panel-title">
150156
$(window).scrollTop(scrollTo)
151157
}
152158
});
153-
setFixedWith()
154-
fixed()
155-
$(window).resize(function () {
159+
if($(".category-index").length>0){
156160
setFixedWith()
157-
})
158-
$(window).scroll(function () {
159161
fixed()
160-
})
161-
162-
$(".backtop").click(function () {
163-
$(window).scrollTop(0)
164-
});
162+
$(window).resize(function () {
163+
setFixedWith()
164+
})
165+
$(window).scroll(function () {
166+
fixed()
167+
})
168+
}
165169
})
166170
</script>
167171
</body>

0 commit comments

Comments
 (0)