This commit is contained in:
parent
9d275b5b07
commit
14e5f7ce3c
@ -61,7 +61,7 @@ var Yilia = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.side footer').after('<div class="toc"><a href="javascript:$(\'.side .toc\').hide()" class="close">X</a></div>');
|
$('.side footer').after('<div class="toc"><a onclick="$(\'.side .toc\').hide();" href="javascript:void(0)" class="close">X</a></div>');
|
||||||
|
|
||||||
$('.side .toc a').after($('.b3-solo-list'));
|
$('.side .toc a').after($('.b3-solo-list'));
|
||||||
|
|
||||||
|
2
skins/yilia/js/yilia.min.js
vendored
2
skins/yilia/js/yilia.min.js
vendored
@ -13,4 +13,4 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){$("article").length>0&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/7&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(),1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){if(0===$(".b3-solo-list li").length)return!1;$(".side footer").after('<div class="toc"><a href="javascript:$(\'.side .toc\').hide()" class="close">X</a></div>'),$(".side .toc a").after($(".b3-solo-list")),$(".side .toc-btn").show()},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(4*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,e=$(".post-content img:eq(0)").attr("src"),s={};s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init();
|
var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){$("article").length>0&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/7&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(),1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){if(0===$(".b3-solo-list li").length)return!1;$(".side footer").after('<div class="toc"><a onclick="$(\'.side .toc\').hide();" href="javascript:void(0)" class="close">X</a></div>'),$(".side .toc a").after($(".b3-solo-list")),$(".side .toc-btn").show()},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(4*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,e=$(".post-content img:eq(0)").attr("src"),s={};s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=648,height=618")})}};Yilia.init();
|
@ -1,6 +1,6 @@
|
|||||||
<div class="side">
|
<div class="side">
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<a href="javascript:$('.side .toc').show()" class="toc-btn">${tocLabel}</a>
|
<a onclick="$('.side .toc').show()" href="javascript:void(0)" class="toc-btn">${tocLabel}</a>
|
||||||
</div>
|
</div>
|
||||||
<header class="content">
|
<header class="content">
|
||||||
<a href="${servePath}">
|
<a href="${servePath}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user