This commit is contained in:
1
Bubble/js/TweenMax.min.js
vendored
Normal file
1
Bubble/js/TweenMax.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
Bubble/js/circleMagic.min.js
vendored
Normal file
1
Bubble/js/circleMagic.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -28,7 +28,6 @@
|
||||
*/
|
||||
var Skin = {
|
||||
init: function () {
|
||||
Util.initPjax()
|
||||
$('#headerDown').click(function () {
|
||||
$('html, body').animate({scrollTop: $(window).height()}, 300)
|
||||
})
|
||||
|
2
Bubble/js/common.min.js
vendored
2
Bubble/js/common.min.js
vendored
@@ -1 +1 @@
|
||||
var Skin={init:function(){Util.initPjax()},initArticle:function(){page.share();var l=$(".vditor-reset [id^=b3_solo_h]"),s=$(".article__toc"),c=$(".article__progress");1===s.length&&(876<$(window).width()?$(".post__toc").css("left",$(".article .item__content").offset().left+$(".article .item__content").outerWidth()-80):$(".post__toc a").click(function(){$(".post__toc").hide()})),s.find("a").click(function(t){var o=$(this).attr("href");return window.location.hash=o,$(window).scrollTop($(o).offset().top-60),t.preventDefault(),t.stopPropagation(),!1}),$(window).unbind("scroll").scroll(function(t){if(0===c.length)return!1;if(c.attr("value",parseInt($(window).scrollTop())).attr("max",parseInt($("body").outerHeight()-$(window).height())),236<$(window).scrollTop()?$(".article__top").css("top",0):$(".article__top").css("top",-61),0===$(".article__toc li").length)return!1;876<$(window).width()&&(975<$(window).scrollTop()&&$(window).scrollTop()<$(".article").outerHeight()+100?$(".post__toc").show():$(".post__toc").hide());var o=[];l.each(function(t){o.push({id:this.id,offsetTop:$(this).offset().top})});for(var i=$(window).scrollTop(),e=0,r=o.length;e<r;e++)if(i<o[e].offsetTop-61){s.find("li").removeClass("current");var n=0<e?e-1:0;s.find('a[href="#'+o[n].id+'"]').parent().addClass("current");break}i>=o[o.length-1].offsetTop-61&&(s.find("li").removeClass("current"),s.find("li:last").addClass("current"))}),$(window).scroll()}};Skin.init();
|
||||
var Skin={init:function(){$("#headerDown").click(function(){$("html, body").animate({scrollTop:$(window).height()},300)}),$(window).scroll(function(e){$(".fn__progress").attr("value",parseInt($(window).scrollTop())).attr("max",parseInt($("body").outerHeight()-$(window).height())),$(window).scrollTop()>$(window).height()/2-20?($(".side__menu").addClass("side__menu--edge"),$(".side__top").removeClass("side__top--bottom")):($(".side__menu").removeClass("side__menu--edge"),$(".side__top").addClass("side__top--bottom"))}),$(".side__menu").click(function(){$(".side__main").addClass("side__main--show").show()}),$(".side__bg, .side__close").click(function(){$(".side__main").removeClass("side__main--show"),setTimeout(function(){$(".side__main").hide()},1e3)}),$(".side__top").click(function(){$(this).hasClass("side__top--bottom")?Util.goBottom():Util.goTop()});var e=0,i=$(".header__h1").text();document.addEventListener("visibilitychange",function(){e&&clearTimeout(e),e=document.hidden?setTimeout(function(){document.title="(◍´꒳`◍) - "+i},500):(document.title="(*´∇`*) 欢迎回来!",setTimeout(function(){document.title=i},1e3))},!1),$(window).scroll(),new Ribbons({colorSaturation:"60%",colorBrightness:"50%",colorAlpha:.5,colorCycleSpeed:5,verticalPosition:"random",horizontalSpeed:200,ribbonCount:3,strokeSize:0,parallaxAmount:-.2,animateSections:!0}),1!==$("#comments").length&&$(".header").circleMagic({clearOffset:.3,color:"rgba(255,255,255, .2)",density:.2,radius:15})},initArticle:function(){page.share(),initCanvas("articleTop");var a=$(".vditor-reset [id^=b3_solo_h]"),r=$(".article__toc");r.find("a").click(function(e){var i=$(this).attr("href");return window.location.hash=i,$(window).scrollTop($(i).offset().top),e.preventDefault(),e.stopPropagation(),!1}),$(window).scroll(function(e){if(0===$(".article__toc li").length)return!1;var i=[];a.each(function(e){i.push({id:this.id,offsetTop:$(this).offset().top})});for(var o=$(window).scrollTop(),t=0,n=i.length;t<n;t++)if(o<i[t].offsetTop){r.find("li").removeClass("current");var s=0<t?t-1:0;r.find('a[href="#'+i[s].id+'"]').parent().addClass("current");break}o>=i[i.length-1].offsetTop&&(r.find("li").removeClass("current"),r.find("li:last").addClass("current"))})}};$(document).ready(function(){Skin.init()});
|
Reference in New Issue
Block a user