-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.min.js
3 lines (1 loc) · 2.62 KB
/
script.min.js
1
2
(function(e){"use strict";e(window).on("load",function(){e(".preloader").fadeOut(100)});var t=e("html, body");e(".nav-link, .page-scroll").on("click",function(){if(location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var n=e(this.hash),n=n.length?n:e("[name="+this.hash.slice(1)+"]");if(n.length)return t.animate({scrollTop:n.offset().top-70},1500,"easeInOutExpo"),!1}}),jQuery.extend(jQuery.easing,{easeInOutExpo:function(e,t,n,s,o){return t===0?n:t===o?n+s:(t/=o/2)<1?s/2*Math.pow(2,10*(t-1))+n:s/2*(-Math.pow(2,-10*--t)+2)+n}}),e(".nav-link").on("click",function(){setTimeout(function(){e(".navbar-collapse").collapse("hide")},1500)}),e("article").each(function(){let t=e(this);t.readingTime({readingTimeTarget:t.find(".eta"),remotePath:t.attr("data-file"),remoteTarget:t.attr("data-target")})}),particlesJS("particles-js",{particles:{number:{value:50,density:{enable:!0,value_area:1100}},color:{value:"#55165E"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5},image:{src:"img/github.svg",width:100,height:100}},opacity:{value:.6,random:!1,anim:{enable:!1,speed:10,opacity_min:.1038961038961039,sync:!1}},size:{value:3,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:150,color:"#333333",opacity:.4,width:1},move:{enable:!0,speed:6,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"repulse"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:400,line_linked:{opacity:1}},bubble:{distance:400,size:40,duration:2,opacity:8,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0}),e(".tab-content").find(".tab-pane").each(function(){var s=e(this).closest(".code-tabs").find(".nav-tabs"),o=e(this).attr("title");s.append('<li class="nav-item"><a class="nav-link" href="#">'+o+"</a></li>")}),e(".code-tabs ul.nav-tabs").each(function(){e(this).find("li:first").addClass("active")}),e(".code-tabs .tab-content").each(function(){e(this).find("div:first").addClass("active")}),e(".nav-tabs a").click(function(t){t.preventDefault();var n=e(this).parent(),o=n.index(),s=e(this).closest(".code-tabs"),i=s.find(".tab-pane").eq(o);s.find(".active").removeClass("active"),n.addClass("active"),i.addClass("active")}),e(".collapse").on("shown.bs.collapse",function(){e(this).parent().find(".ti-plus").removeClass("ti-plus").addClass("ti-minus")}).on("hidden.bs.collapse",function(){e(this).parent().find(".ti-minus").removeClass("ti-minus").addClass("ti-plus")})})(jQuery)