This commit is contained in:
Van
2019-03-16 18:28:32 +08:00
parent 32d9065772
commit 7368e5b747
167 changed files with 592 additions and 560 deletions

View File

@@ -89,7 +89,7 @@
</a>
</#list>
</div>
<div class="content-reset">
<div class="vditor-reset">
${article.articleContent}
<#if "" != article.articleSign.signHTML?trim>
<div>

View File

@@ -36,7 +36,7 @@
</#if>
</div>
</div>
<div class="content-reset">
<div class="vditor-reset">
${comment.commentContent}
</div>
<div class="item__meta fn__clear">

File diff suppressed because one or more lines are too long

View File

@@ -19,10 +19,9 @@
* skin style
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.2, Mar 1, 2019
* @version 0.1.0.3, Mar 16, 2019
*/
@import "../../../scss/reset";
@import "../../../scss/reset-content";
@import "../../../scss/function";
@import "../../../scss/tooltipped";
@import "../../../scss/comment";
@@ -65,7 +64,7 @@ a:active, a:focus, a:hover {
background-color: $red;
}
.content-reset {
.vditor-reset {
font-size: 14px;
.b3-solo-list {
display: none;
@@ -517,9 +516,16 @@ a:active, a:focus, a:hover {
position: fixed;
top: 100px;
max-width: 200px;
border-left: 1px solid $gray-lighter;
overflow: auto;
height: 70vh;
padding-left: 3px;
&::-webkit-scrollbar {
display: none;
}
.b3-solo-list {
border-left: 1px solid $gray-lighter;
margin: 0;
font-size: 14px;
line-height: 24px;

View File

@@ -92,12 +92,11 @@
var Label = {
'markedAvailable': ${markedAvailable?c},
"hljsStyle": "atom-one-light",
"langLabel": "${langLabel}",
'skinDirName': "${skinDirName}",
}
Util.initSW()
Util.parseMarkdown()
Util.killIE()
Util.previewImg()
Util.init()
</script>
${plugins}

View File

@@ -69,7 +69,7 @@ var Skin = {
})
},
_initToc: function () {
if ($('.content-reset .b3-solo-list li').length === 0 || $(window).width() < 746) {
if ($('.vditor-reset .b3-solo-list li').length === 0 || $(window).width() < 746) {
$('.post__toc .b3-solo-list').remove()
return
}
@@ -83,6 +83,8 @@ var Skin = {
$('.post__toc').hide()
}
})
$(window).scroll()
},
_initShare: function () {
var $this = $('.post__share')

View File

@@ -1 +1 @@
var Skin={init:function(){new Headroom($("header")[0],{tolerance:0,offset:70,classes:{initial:"header",pinned:"header--down",unpinned:"header--up",top:"header",notTop:"header",bottom:"header",notBottom:"header"}}).init(),Util.initPjax(function(){0===$(".post__fix").length?$("body").addClass("body--gray"):$("body").removeClass("body--gray"),$(".header__nav a").each(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})}),$(".header__nav a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})},_initToc:function(){0===$(".content-reset .b3-solo-list li").length||$(window).width()<746?$(".post__toc .b3-solo-list").remove():($(".post__toc").html($(".b3-solo-list")).css("left",$(".post").offset().left+$(".post").outerWidth()),$(window).scroll(function(){72<$(window).scrollTop()?$(".post__toc").show():$(".post__toc").hide()}))},_initShare:function(){var t=$(".post__share"),e=t.find(".post__code"),o=e.data("url"),i=e.data("avatar"),n=encodeURIComponent(e.data("title")+" - "+e.data("blogtitle")),a=encodeURIComponent(o),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+a+"&pic="+i,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+a+"&sharesource=qzone&title="+n+"&pics="+i,s.twitter="https://twitter.com/intent/tweet?status="+n+" "+a,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===e.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){e.qrcode({width:128,height:128,text:o})}}):e.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})},initArticle:function(){new Headroom($(".post__fix")[0],{tolerance:0,offset:48,classes:{initial:"post__fix",pinned:"post__fix--pinned",unpinned:"post__fix--unpinned",top:"post__fix",notTop:"post__fix",bottom:"post__fix",notBottom:"post__fix"}}).init(),Skin._initShare(),Skin._initToc()}};Skin.init();
var Skin={init:function(){new Headroom($("header")[0],{tolerance:0,offset:70,classes:{initial:"header",pinned:"header--down",unpinned:"header--up",top:"header",notTop:"header",bottom:"header",notBottom:"header"}}).init(),Util.initPjax(function(){0===$(".post__fix").length?$("body").addClass("body--gray"):$("body").removeClass("body--gray"),$(".header__nav a").each(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})}),$(".header__nav a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a").removeClass("current"),this.href===location.href&&(this.className="current")})},_initToc:function(){0===$(".vditor-reset .b3-solo-list li").length||$(window).width()<746?$(".post__toc .b3-solo-list").remove():($(".post__toc").html($(".b3-solo-list")).css("left",$(".post").offset().left+$(".post").outerWidth()),$(window).scroll(function(){72<$(window).scrollTop()?$(".post__toc").show():$(".post__toc").hide()}),$(window).scroll())},_initShare:function(){var t=$(".post__share"),e=t.find(".post__code"),o=e.data("url"),i=e.data("avatar"),n=encodeURIComponent(e.data("title")+" - "+e.data("blogtitle")),a=encodeURIComponent(o),s={};s.weibo="http://v.t.sina.com.cn/share/share.php?title="+n+"&url="+a+"&pic="+i,s.qqz="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+a+"&sharesource=qzone&title="+n+"&pics="+i,s.twitter="https://twitter.com/intent/tweet?status="+n+" "+a,t.find("span").click(function(){var t=$(this).data("type");if(t)return"wechat"===t?(0===e.find("canvas").length?$.ajax({method:"GET",url:latkeConfig.staticServePath+"/js/lib/jquery.qrcode.min.js",dataType:"script",cache:!0,success:function(){e.qrcode({width:128,height:128,text:o})}}):e.find("canvas").slideToggle(),!1):void window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})},initArticle:function(){new Headroom($(".post__fix")[0],{tolerance:0,offset:48,classes:{initial:"post__fix",pinned:"post__fix--pinned",unpinned:"post__fix--unpinned",top:"post__fix",notTop:"post__fix",bottom:"post__fix",notBottom:"post__fix"}}).init(),Skin._initShare(),Skin._initToc()}};Skin.init();

View File

@@ -33,7 +33,7 @@
<main id="pjax" class="fn__flex-1">
<#if pjax><!---- pjax {#pjax} start ----></#if>
<div class="post wrapper wrapper--miner">
<div class="content-reset">
<div class="vditor-reset">
${page.pageContent}
</div>
</div>