fixed #12494
This commit is contained in:
parent
3a4d58638d
commit
c25e92f1f0
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
|
||||
<div class="content-reset">
|
||||
${article.articleAbstract}
|
||||
${article.articleContent}
|
||||
<#if "" != article.articleSign.signHTML?trim>
|
||||
<div>
|
||||
${article.articleSign.signHTML}
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
-->
|
||||
<li id="${comment.oId}" class="comments__item">
|
||||
<div class="comments__avatar" style="background-image: url(${comment.commentThumbnailURL})"></div>
|
||||
<div class="comments__meta fn__flex">
|
||||
<div class="fn__flex-1">
|
||||
<#if "http://" == comment.commentURL>
|
||||
@ -36,6 +35,7 @@
|
||||
<time>${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
|
||||
</div>
|
||||
<main class="comments__content fn__clear">
|
||||
<div class="comments__avatar" style="background-image: url(${comment.commentThumbnailURL})"></div>
|
||||
<div class="content-reset">
|
||||
${comment.commentContent}
|
||||
</div>
|
||||
|
@ -786,7 +786,7 @@ a {
|
||||
color: #fff;
|
||||
padding: 0 15px;
|
||||
display: inline-block; }
|
||||
.header a:hover {
|
||||
.header a.current, .header a:hover {
|
||||
text-decoration: none;
|
||||
background-color: rgba(102, 88, 184, 0.8); }
|
||||
.header__logo {
|
||||
@ -946,8 +946,7 @@ a {
|
||||
list-style: none;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
|
||||
transition: all .3s;
|
||||
position: relative; }
|
||||
transition: all .3s; }
|
||||
.comments__item:hover {
|
||||
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8); }
|
||||
.comments__item:hover .comments__avatar {
|
||||
@ -975,7 +974,8 @@ a {
|
||||
.comments__content {
|
||||
border-radius: 0 0 5px 5px;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
padding: 15px 15px 15px 45px; }
|
||||
padding: 15px 15px 15px 45px;
|
||||
position: relative; }
|
||||
.comments__avatar {
|
||||
position: absolute;
|
||||
height: 54px;
|
||||
@ -985,7 +985,7 @@ a {
|
||||
border: 2px solid #fff;
|
||||
border-radius: 35px;
|
||||
left: -29px;
|
||||
top: 15px;
|
||||
top: -23px;
|
||||
transition: all .8s ease; }
|
||||
.comments__captcha {
|
||||
height: 30px; }
|
||||
@ -1025,6 +1025,52 @@ a {
|
||||
margin: 0 0 0 10px;
|
||||
padding: 0 15px; }
|
||||
|
||||
.icon__up {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
right: 30px;
|
||||
color: #fff;
|
||||
background-color: rgba(114, 102, 186, 0.8);
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
line-height: 28px;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
text-align: center; }
|
||||
.icon__up:hover {
|
||||
background-color: #6658b8; }
|
||||
|
||||
.content .b3-solo-list {
|
||||
display: none !important; }
|
||||
|
||||
.b3-solo-list {
|
||||
margin: 0 !important;
|
||||
font-size: 14px !important; }
|
||||
|
||||
.b3-solo-list-h1 {
|
||||
margin: 0 !important; }
|
||||
|
||||
.b3-solo-list-h2 {
|
||||
margin: 0 !important; }
|
||||
.b3-solo-list-h2 a {
|
||||
padding-left: 30px !important; }
|
||||
|
||||
.b3-solo-list-h3 {
|
||||
margin: 0 !important; }
|
||||
.b3-solo-list-h3 a {
|
||||
padding-left: 45px !important; }
|
||||
|
||||
.b3-solo-list-h4 {
|
||||
margin: 0 !important; }
|
||||
.b3-solo-list-h4 a {
|
||||
padding-left: 60px !important; }
|
||||
|
||||
.b3-solo-list-h5 {
|
||||
margin: 0 !important; }
|
||||
.b3-solo-list-h5 a {
|
||||
padding-left: 75px !important; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.header__nav {
|
||||
display: none; }
|
||||
@ -1069,6 +1115,13 @@ a {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 1; }
|
||||
.header__m img {
|
||||
float: left;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin: 0 5px 0 0; }
|
||||
.header__m a.current {
|
||||
color: #b94a48; }
|
||||
.header__m .icon__list {
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
@ -1080,4 +1133,8 @@ a {
|
||||
.header__m .module__list li {
|
||||
background-color: #fff; }
|
||||
.module__content.ft__center {
|
||||
text-align: left; } }
|
||||
text-align: left; }
|
||||
.comments__avatar {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
left: -14px; } }
|
||||
|
@ -212,6 +212,8 @@ a {
|
||||
color: #fff;
|
||||
padding: 0 15px;
|
||||
display: inline-block;
|
||||
|
||||
&.current,
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background-color: rgba($purple-dark, 0.8);
|
||||
@ -437,7 +439,6 @@ a {
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
|
||||
transition: all .3s;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);
|
||||
@ -465,6 +466,7 @@ a {
|
||||
background: rgba(217, 237, 247, 0.6);
|
||||
color: $black;
|
||||
padding-right: 15px;
|
||||
|
||||
a {
|
||||
font-weight: 700;
|
||||
color: $black;
|
||||
@ -482,6 +484,7 @@ a {
|
||||
border-radius: 0 0 5px 5px;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
padding: 15px 15px 15px 45px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__avatar {
|
||||
@ -493,7 +496,7 @@ a {
|
||||
border: 2px solid #fff;
|
||||
border-radius: 35px;
|
||||
left: -29px;
|
||||
top: 15px;
|
||||
top: -23px;
|
||||
transition: all .8s ease;
|
||||
}
|
||||
|
||||
@ -548,6 +551,66 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
.icon__up {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
right: 30px;
|
||||
color: #fff;
|
||||
background-color: rgba($purple, 0.8);
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
line-height: 28px;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
text-align: center;
|
||||
|
||||
&:hover {
|
||||
background-color: $purple-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.content .b3-solo-list {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.b3-solo-list {
|
||||
margin: 0 !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.b3-solo-list-h1 {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.b3-solo-list-h2 {
|
||||
margin: 0 !important;
|
||||
a {
|
||||
padding-left: 30px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.b3-solo-list-h3 {
|
||||
margin: 0 !important;
|
||||
a {
|
||||
padding-left: 45px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.b3-solo-list-h4 {
|
||||
margin: 0 !important;
|
||||
a {
|
||||
padding-left: 60px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.b3-solo-list-h5 {
|
||||
margin: 0 !important;
|
||||
a {
|
||||
padding-left: 75px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.header__nav {
|
||||
display: none;
|
||||
@ -619,6 +682,17 @@ a {
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
|
||||
img {
|
||||
float: left;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
a.current {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.icon__list {
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
@ -639,4 +713,10 @@ a {
|
||||
.module__content.ft__center {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.comments__avatar {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
left: -14px;
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<div class="icon__up" onclick="Util.goTop()"></div>
|
||||
<footer class="footer">
|
||||
© ${year}
|
||||
${footerContent}
|
||||
|
@ -19,7 +19,7 @@
|
||||
* @fileoverview util and every page should be used.
|
||||
*
|
||||
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
|
||||
* @version 0.1.0.0, Feb 17, 2017
|
||||
* @version 0.1.0.0, Sep 2, 2018
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,34 +28,27 @@
|
||||
*/
|
||||
var Skin = {
|
||||
_initCommon: function ($goTop) {
|
||||
$('body').on('click', '.content-reset img', function () {
|
||||
window.open(this.src)
|
||||
})
|
||||
|
||||
var $banner = $('header .banner'),
|
||||
$navbar = $('header .navbar')
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() > 125) {
|
||||
$goTop.show()
|
||||
} else {
|
||||
$goTop.hide()
|
||||
}
|
||||
|
||||
if ($(window).width() < 701) {
|
||||
return false
|
||||
}
|
||||
|
||||
if ($(window).scrollTop() > $banner.height()) {
|
||||
$navbar.addClass('pin')
|
||||
$('.main-wrap').parent().css('margin-top', '86px')
|
||||
} else {
|
||||
$navbar.removeClass('pin')
|
||||
$('.main-wrap').parent().css('margin-top', '0')
|
||||
}
|
||||
})
|
||||
},
|
||||
init: function () {
|
||||
$('body').on('click', '.content-reset img', function () {
|
||||
window.open(this.src)
|
||||
})
|
||||
|
||||
this._initCommon($('.icon__up'))
|
||||
|
||||
$('.header__nav a, .header__m a').each(function () {
|
||||
if (this.href === location.href) {
|
||||
this.className = 'current'
|
||||
}
|
||||
})
|
||||
|
||||
if (!('IntersectionObserver' in window)) {
|
||||
$('.item').addClass('item--active')
|
||||
return false
|
||||
@ -73,7 +66,8 @@ var Skin = {
|
||||
? entrie.intersectionRatio !== 0 : entrie.isIntersecting) {
|
||||
$(entrie.target).addClass('item--active')
|
||||
} else {
|
||||
if ($(entrie.target).closest('.side').length === 1) {
|
||||
if ($(entrie.target).closest('.side').length === 1 ||
|
||||
$(entrie.target).closest('.article-list').hasClass('content')) {
|
||||
return
|
||||
}
|
||||
$(entrie.target).removeClass('item--active')
|
||||
@ -84,89 +78,16 @@ var Skin = {
|
||||
window.imageIntersectionObserver.observe(this)
|
||||
})
|
||||
}
|
||||
|
||||
this._initCommon($('.icon-up'))
|
||||
|
||||
$('.navbar nav a').each(function () {
|
||||
if (this.href === location.href) {
|
||||
this.className = 'current'
|
||||
}
|
||||
})
|
||||
|
||||
$('.responsive .list a').each(function () {
|
||||
if (this.href === location.href) {
|
||||
$(this).parent().addClass('current')
|
||||
}
|
||||
})
|
||||
|
||||
$('.responsive .icon-list').click(function () {
|
||||
$('.responsive .list').slideToggle()
|
||||
})
|
||||
},
|
||||
_initArticleCommon: function (tocLabel, siteViewLabel) {
|
||||
// TOC
|
||||
_initArticleCommon: function () {
|
||||
if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) {
|
||||
// add color to sidebar menu
|
||||
$('aside').addClass('has-toc')
|
||||
|
||||
// append toc to sidebar menu
|
||||
var articleTocHTML = '<ul class="fn-clear"><li class="current" data-tab="toc">' +
|
||||
tocLabel
|
||||
+ '</li><li data-tab="site">' + siteViewLabel +
|
||||
'</li></ul><section></section>'
|
||||
$('aside').prepend(articleTocHTML)
|
||||
var $sectionF = $('aside section:first').html($('.b3-solo-list')),
|
||||
$sectionL = $('aside section:last')
|
||||
$sectionF.height($(window).height() - 154).
|
||||
css({'overflow': 'auto', 'width': $('aside').width() + 'px'})
|
||||
$sectionL.hide()
|
||||
// 切换 tab
|
||||
$('aside > ul > li').click(function () {
|
||||
if ($(this).data('tab') === 'toc') {
|
||||
$sectionL.animate({
|
||||
'opacity': '0',
|
||||
'top': '-50px',
|
||||
}, 300, function () {
|
||||
$sectionF.show().css('top', '-50px')
|
||||
$sectionF.animate({
|
||||
'opacity': '1',
|
||||
'top': '0',
|
||||
}, 300).show()
|
||||
})
|
||||
} else {
|
||||
$sectionF.animate({
|
||||
'opacity': '0',
|
||||
'top': '-50px',
|
||||
}, 300, function () {
|
||||
$sectionF.hide().css('top', '-50px')
|
||||
$sectionL.animate({
|
||||
'opacity': '1',
|
||||
'top': '0',
|
||||
}, 300).show()
|
||||
}).hide()
|
||||
}
|
||||
$('aside > ul > li').removeClass('current')
|
||||
$(this).addClass('current')
|
||||
})
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() > 125) {
|
||||
$('aside section:eq(0)').css({
|
||||
position: 'fixed',
|
||||
top: '51px',
|
||||
backgroundColor: '#fff',
|
||||
})
|
||||
} else {
|
||||
$('aside section:eq(0)').css({
|
||||
position: 'inherit',
|
||||
borderLeft: 0,
|
||||
})
|
||||
}
|
||||
})
|
||||
$('.side').
|
||||
prepend('<div class="module"><div class="module__list"></div></div>')
|
||||
$('.side .module:eq(0) .module__list').html($('.b3-solo-list'))
|
||||
}
|
||||
},
|
||||
initArticle: function (tocLabel, siteViewLabel) {
|
||||
this._initArticleCommon(tocLabel, siteViewLabel)
|
||||
initArticle: function () {
|
||||
this._initArticleCommon()
|
||||
|
||||
setTimeout(function () {
|
||||
if ($('#externalRelevantArticlesWrap li').length === 0) {
|
||||
|
@ -122,7 +122,7 @@
|
||||
};
|
||||
(function () {
|
||||
page.load()
|
||||
Skin.initArticle("${tocLabel}", "${siteViewLabel}")
|
||||
Skin.initArticle()
|
||||
// emotions
|
||||
page.replaceCommentsEm('#comments .content-reset')
|
||||
<#nested>
|
||||
|
Loading…
x
Reference in New Issue
Block a user