pref: change back2top position

This commit is contained in:
XPoet 2020-09-05 23:08:03 +08:00
parent 999c97b883
commit 8cb7861da3
5 changed files with 16 additions and 18 deletions

View File

@ -17,5 +17,10 @@
<li class="page-aside-toggle">
<i class="fa fa-bars"></i>
</li>
<% if (theme.back2top.enable) { %>
<li class="scroll-to-top">
<i class="fa fa-caret-up"></i>
</li>
<% } %>
</ul>
</div>

View File

@ -59,17 +59,7 @@
<%- partial('_partial/tools') %>
</div>
<% if (theme.back2top.enable) { %>
<div class="scroll-to-top">
<ul>
<li>
<span class="scroll-percent">
<i class="fa fa-caret-up"></i>
</span>
</li>
</ul>
</div>
<% } %>
<!-- page aside -->
<aside class="page-aside">

View File

@ -20,6 +20,10 @@ $li-margin-bottom = 12px;
margin-bottom: $li-margin-bottom;
background: var(--background-color);
&:last-child {
margin-bottom: 0;
}
if (hexo-config('magic.enable') == true) {
magic-style(1.1, 1.1);
} else {
@ -32,7 +36,6 @@ $li-margin-bottom = 12px;
background: var(--primary-color);
}
&.rss {
a {
@ -52,11 +55,11 @@ $li-margin-bottom = 12px;
}
&:last-child {
margin-bottom: 0;
&.scroll-to-top {
display: none;
}
}
}
}
}

View File

@ -151,7 +151,7 @@ $page-aside-width = 248px;
}
.scroll-to-top {
/*.scroll-to-top {
display: none;
position: fixed;
@ -186,6 +186,6 @@ $page-aside-width = 248px;
}
}
}
*/
}

View File

@ -33,7 +33,7 @@
scrollToTopDom.style.display = 'none';
headerProgressDom.style.display = 'none';
} else {
scrollToTopDom.style.display = 'block';
scrollToTopDom.style.display = 'flex';
// scrollPercentDom.innerHTML = parseInt(percent) < 10 ? `0${percent}` : percent;
headerProgressDom.style.display = 'block';