This commit is contained in:
parent
5245aafcca
commit
acffd3c0f3
@ -203,6 +203,9 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<#include "bottom.ftl">
|
<#include "bottom.ftl">
|
||||||
</div>
|
</div>
|
||||||
|
<#if article?? && article.articleToC?? && article.articleToC?size > 0>
|
||||||
|
<#include "../../common-template/toc.ftl"/>
|
||||||
|
</#if>
|
||||||
</div>
|
</div>
|
||||||
<#if pjax><!---- pjax {#pjax} end ----></#if>
|
<#if pjax><!---- pjax {#pjax} end ----></#if>
|
||||||
</div>
|
</div>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -19,9 +19,11 @@
|
|||||||
* skin style
|
* skin style
|
||||||
*
|
*
|
||||||
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
||||||
* @version 2.0.0.2, Mar 16, 2019
|
* @version 2.1.0.0, Mar 22, 2019
|
||||||
*/
|
*/
|
||||||
@import "../../../scss/reset";
|
@import "../../../scss/reset";
|
||||||
|
@import "../../../scss/usite";
|
||||||
|
@import "../../../scss/toc";
|
||||||
@import "../../../scss/nprogress";
|
@import "../../../scss/nprogress";
|
||||||
@import "vditor/src/assets/scss/classic";
|
@import "vditor/src/assets/scss/classic";
|
||||||
|
|
||||||
@ -343,6 +345,18 @@
|
|||||||
|
|
||||||
/* star article */
|
/* star article */
|
||||||
.article {
|
.article {
|
||||||
|
&__toc {
|
||||||
|
left: 100%;
|
||||||
|
position: fixed;
|
||||||
|
top: 90px;
|
||||||
|
bottom: 60px;
|
||||||
|
a {
|
||||||
|
color: rgba(0, 0, 0, 0.54);
|
||||||
|
&:hover {
|
||||||
|
color: rgba(0, 0, 0, 0.68);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
&__main {
|
&__main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -442,10 +456,6 @@
|
|||||||
/* end article list */
|
/* end article list */
|
||||||
|
|
||||||
/* start article */
|
/* start article */
|
||||||
.b3-solo-list {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post {
|
.post {
|
||||||
max-width: 740px;
|
max-width: 740px;
|
||||||
margin: 50px auto 20px;
|
margin: 50px auto 20px;
|
||||||
@ -556,7 +566,9 @@
|
|||||||
|
|
||||||
.article__bottom {
|
.article__bottom {
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
padding: 40px 20px
|
padding: 40px 20px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article__bottom .footer__tag {
|
.article__bottom .footer__tag {
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="fn-clear">
|
<div class="fn-clear">
|
||||||
${blogSubtitle}
|
${blogSubtitle}
|
||||||
|
<#include "../../common-template/macro-user_site.ftl"/>
|
||||||
|
<@userSite dir="n"/>
|
||||||
<div class="fn-right">
|
<div class="fn-right">
|
||||||
${blogTitle} © ${year} ${footerContent}
|
${blogTitle} © ${year} ${footerContent}
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @fileoverview util and every page should be used.
|
* @fileoverview util and every page should be used.
|
||||||
*
|
*
|
||||||
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
||||||
* @version 0.1.0.0, Feb 27, 2019
|
* @version 0.1.0.1, Mar 22, 2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,7 +28,16 @@
|
|||||||
*/
|
*/
|
||||||
var Skin = {
|
var Skin = {
|
||||||
init: function () {
|
init: function () {
|
||||||
|
const $article__toc = $('.article__toc')
|
||||||
$(window).scroll(function () {
|
$(window).scroll(function () {
|
||||||
|
if ($article__toc.length === 1) {
|
||||||
|
if ($('.article__bottom').offset().top < $(window).scrollTop()) {
|
||||||
|
$article__toc.hide()
|
||||||
|
} else {
|
||||||
|
$article__toc.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($('#headerNav').length === 0) {
|
if ($('#headerNav').length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -54,7 +63,9 @@ var Skin = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Skin.initToc()
|
||||||
})
|
})
|
||||||
|
Skin.initToc()
|
||||||
},
|
},
|
||||||
initTags: function () {
|
initTags: function () {
|
||||||
var $tags = $('#tags');
|
var $tags = $('#tags');
|
||||||
@ -198,6 +209,15 @@ var Skin = {
|
|||||||
|
|
||||||
window.open(urls[key], '_blank', 'top=100,left=200,width=648,height=618')
|
window.open(urls[key], '_blank', 'top=100,left=200,width=648,height=618')
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
initToc: function () {
|
||||||
|
if ($('.article__toc').length !== 0 && $(window).width() > 1000) {
|
||||||
|
$('.article__toc').animate({
|
||||||
|
'left': ($('.post').outerWidth() + $('.post').offset().left) + 'px'
|
||||||
|
}, 600)
|
||||||
|
} else {
|
||||||
|
$('.article__toc').hide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Skin.init();
|
Skin.init();
|
Loading…
x
Reference in New Issue
Block a user