mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-06 11:15:37 -06:00
v3
This commit is contained in:
BIN
js/.DS_Store
vendored
BIN
js/.DS_Store
vendored
Binary file not shown.
@@ -1 +1 @@
|
||||
"use strict";$(document).ready(function(){function t(){$(".section").each(function(){var t=$('#dot-nav a[href="#'+$(this).attr("id")+'"]').data("number"),e=$(this).offset().top,n=$(window).height()/2,o=$(window).scrollTop(),i=e-n<o,r=e+$(this).height()-n>o;i&&r?$("#dot-nav a").eq(t).addClass("is-selected"):$("#dot-nav a").eq(t).removeClass("is-selected")})}function e(t){$("body, html").animate({scrollTop:t.offset().top+50},500)}function n(){var t=window.innerWidth>768,e=s.offsetTop-s.offsetTop/4,n=window.scrollY>e,i=d.classList.contains("open");t&&n?a.classList.add("active"):t&&i?o():a.classList.remove("active")}function o(){l.classList.toggle("active"),d.classList.toggle("open"),document.body.classList.toggle("noScroll")}function i(){this.parentElement.classList.add("is-active","is-completed")}function r(){this.parentElement.classList.remove("is-active","is-completed")}function c(){f.style.height="",f.style.height=Math.min(f.scrollHeight,v)+"px"}t(),window.addEventListener("scroll",t),$(".scroll-down").on("click",function(t){t.preventDefault(),e($(this.hash))}),$("#dot-nav a").on("click",function(t){t.preventDefault(),e($(this.hash))}),$("#overlay a").on("click",function(t){t.preventDefault(),e($(this.hash)),$("#toggle").click()});var a=document.querySelector("#dot-nav"),s=document.querySelector("#about-section"),l=document.querySelector("#toggle"),d=document.querySelector("#overlay");window.addEventListener("scroll",n),window.addEventListener("resize",n),l.addEventListener("click",o);var u={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return u.Android()||u.BlackBerry()||u.iOS()||u.Opera()||u.Windows()}};u.any()||skrollr.init({render:function(t){},smoothScrolling:!1,forceHeight:!1});var h=document.querySelectorAll(".contact-input");h.forEach(function(t){return t.addEventListener("focus",i)}),h.forEach(function(t){return t.addEventListener("blur",r)});var f=document.querySelector("#message"),v=300;f.addEventListener("input",c)});
|
||||
$(function(){function e(){l.classList.add("wave"),setTimeout(function(){l.classList.remove("wave")},2e3)}const t=new Date,o=t.getHours(),n=o>=19||o<=7,c=document.querySelector("body"),s=document.getElementById("toggle"),i=document.getElementById("switch");n&&(i.checked=!0,c.classList.add("night")),s.addEventListener("click",function(){const e=i.checked;e?c.classList.remove("night"):c.classList.add("night")});const r=document.querySelector(".intro").offsetHeight,a=document.getElementById("top-button"),d=$("#top-button");window.addEventListener("scroll",function(){window.scrollY>r?d.fadeIn():d.fadeOut()},!1),a.addEventListener("click",function(){$("html, body").animate({scrollTop:0},500)});const l=document.querySelector(".emoji.wave-hand");setTimeout(function(){e()},1e3),l.addEventListener("mouseover",function(){l.classList.add("wave")}),l.addEventListener("mouseout",function(){l.classList.remove("wave")}),window.sr=ScrollReveal({reset:!1,duration:600,easing:"cubic-bezier(.694,0,.335,1)",scale:1,viewFactor:.3}),sr.reveal(".background"),sr.reveal(".skills"),sr.reveal(".experience",{viewFactor:.2}),sr.reveal(".featured-projects",{viewFactor:.1}),sr.reveal(".other-projects",{viewFactor:.05})});
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";particlesJS("particles-js",{particles:{number:{value:50,density:{enable:!0,value_area:700}},color:{value:"#ffffff"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5},image:{src:"img/github.svg",width:100,height:100}},opacity:{value:.75,random:!1,anim:{enable:!1,speed:.25,opacity_min:.1,sync:!1}},size:{value:3,random:!0,anim:{enable:!1,speed:50,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:100,color:"#ffffff",opacity:.7,width:.5},move:{enable:!0,speed:3,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:700,rotateY:1400}}},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:100,duration:.3},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0});
|
||||
Reference in New Issue
Block a user