Permalink
Browse files

refactor: scrolling button 改写优化跳转按钮

  • Loading branch information...
MOxFIVE committed Oct 11, 2015
1 parent de48243 commit b0cda2714d440a4ffa37af5fcbdda1acf6174485
@@ -83,4 +83,20 @@
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</section>
<% } %>
<% if (!index && post.comments){ %>
<style type="text/css">
#scroll {
display: none;
}
.scroll .fa-arrow-up {
border-bottom: none;
}
</style>
<ul class="scroll">
<li><a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a></li>
<li><a href="#ds-thread" title="查看评论"><i class="fa fa-comments-o"></i></a></li>
<li><a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a></li>
</ul>
<% } %>
@@ -1,6 +1,4 @@
<div>
<a href="#" style="color:white" title="回页面顶部"><span class="scrolling-button" id="toTop">↑</span></a>
</div>
<div>
<a href="#footer" style="color:white" title="到页面底部"><span class="scrolling-button" id="toBottom">↓</span></a>
</div>
<ul class="scroll" id="scroll">
<li><a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a></li>
<li><a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a></li>
</ul>
View
0 themes/Yilia/layout/index.ejs 100755 → 100644
No changes.
@@ -9,7 +9,6 @@
<div class="body-wrap"><%- body %></div>
<%- partial('_partial/footer') %>
</div>
<%- partial('_partial/scrolling-button') %>
<%- partial('_partial/after-footer') %>
</div>
</body>
View
0 themes/Yilia/layout/post.ejs 100755 → 100644
No changes.
@@ -340,32 +340,6 @@
};
}
.scrolling-button {
display:block;
padding:0.05em;
border-radius:0.15em;
width:1.1em;
height:1.4em;
line-height:1.3em;
font-size:1.5em;
font-family: Calibri;
text-align: center;
background:rgba(215, 216, 215, .4);
position: fixed;
cursor: pointer;
color: #fff;
right: 1px;
&:hover {
background:rgba(215, 216, 215, .9);
};
}
#toTop {
top: 41%;
}
#toBottom {
top: 47%;
}
/*MOxFIVE's color schemes*/
body {
@@ -388,4 +362,35 @@ body {
#header .profilepic {
}
.scroll {
z-index: 999;
position: fixed;
top: 61.8%;
right: 0px;
text-align: center;
li {
width: 29px;
font-size: 28px;
background: rgba(215, 216, 215, .4);
}
.fa-comments-o {
border-top: 1px solid white;
border-bottom: 1px solid white;
}
.fa-arrow-up {
border-bottom: 1px solid white;
}
.fa {
color: rgba(255, 255, 255, .8);
padding-top: 6px;
padding-bottom: 6px;
}
li:hover {
background: rgba(147, 181, 224, .3);
.fa {
color: white;
}
}
}
@@ -223,32 +223,6 @@
}
}
.scrolling-button {
display:block;
padding:0.05em;
border-radius:0.15em;
width:1.5em;
height:1.5em;
line-height:1.5em;
font-size:2em;
font-family: Calibri;
text-align: center;
background:lightgray;
position: fixed;
cursor: pointer;
color: #fff;
right: 11px;
opacity:0.7;
}
#toTop {
top: 37%;
}
#toBottom {
bottom: 37%;
}
#tocButton {
z-index: 100;
position: fixed;
@@ -338,4 +312,10 @@
}
.article-meta time:before {
display: none;
}
.scroll {
right: 1.2em;
li {
font-size: 1.7em;
}
}

0 comments on commit b0cda27

Please sign in to comment.