⬆️ vditor

This commit is contained in:
Van
2019-11-05 12:08:07 +08:00
parent 21c902d4c8
commit e55e26fdb7
70 changed files with 45 additions and 69 deletions

File diff suppressed because one or more lines are too long

0
next/css/fonts/icomoon.eot Executable file → Normal file
View File

0
next/css/fonts/icomoon.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

0
next/css/fonts/icomoon.ttf Executable file → Normal file
View File

0
next/css/fonts/icomoon.woff Executable file → Normal file
View File

0
next/css/fonts/selection.json Executable file → Normal file
View File

2
next/js/next.min.js vendored
View File

@@ -1 +1 @@
var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},function(){i.find("section:first").animate({opacity:1})}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},function(){0<$(".article__toc li").length&&1e3<$(window).width()&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500)})},initArticle:function(){0<$(".article__toc li").length&&1e3<$(window).width()&&($(".sidebar-toggle").addClass("has-toc"),this.initToc())},initToc:function(){var s=$(".vditor-reset [id^=b3_solo_h]"),c=$(".article__toc");$(window).scroll(function(i){if(0===$(".article__toc li").length)return!1;var t=[];s.each(function(i){t.push({id:this.id,offsetTop:this.offsetTop})});for(var e=$(window).scrollTop(),n=0,a=t.length;n<a;n++)if(e<t[n].offsetTop+200){c.find("li").removeClass("current");var o=0<n?n-1:0;c.find('a[href="#'+t[o].id+'"]').parent().addClass("current");break}e>=t[t.length-1].offsetTop+200&&(c.find("li").removeClass("current"),c.find("li:last").addClass("current"))}),$(window).scroll()}};NexT.init();
var NexT={init:function(){$(".sidebar-toggle").click((function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},(function(){i.find("section:first").animate({opacity:1})})))})),$(".site-nav-toggle").click((function(){$(".site-nav").slideToggle()})),$(document).ready((function(){setTimeout((function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},(function(){$(".site-title").css("opacity",1).animate({top:0},(function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},(function(){$(".article__toc li").length>0&&$(window).width()>1e3&&$(".sidebar-toggle").click()}))}))})),$(".logo-line-after i").animate({right:"0"})}),500)}))},initArticle:function(){$(".article__toc li").length>0&&$(window).width()>1e3&&($(".sidebar-toggle").addClass("has-toc"),this.initToc())},initToc:function(){var i=$(".vditor-reset [id^=b3_solo_h]"),t=$(".article__toc");$(window).scroll((function(e){if(0===$(".article__toc li").length)return!1;var n=[];i.each((function(i){n.push({id:this.id,offsetTop:this.offsetTop})}));for(var a=$(window).scrollTop(),o=0,s=n.length;o<s;o++)if(a<n[o].offsetTop+200){t.find("li").removeClass("current");var c=o>0?o-1:0;t.find('a[href="#'+n[c].id+'"]').parent().addClass("current");break}a>=n[n.length-1].offsetTop+200&&(t.find("li").removeClass("current"),t.find("li:last").addClass("current"))})),$(window).scroll()}};NexT.init();