mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-06 09:15:37 -06:00
I got a job!
This commit is contained in:
38
js/main.js
38
js/main.js
@@ -1,7 +1,7 @@
|
||||
$(function() {
|
||||
const d = new Date();
|
||||
const hours = d.getHours();
|
||||
const night = (hours >= 19) || (hours <= 7); // between 7pm and 7am
|
||||
const night = hours >= 19 || hours <= 7; // between 7pm and 7am
|
||||
const body = document.querySelector('body');
|
||||
const toggle = document.getElementById('toggle');
|
||||
const input = document.getElementById('switch');
|
||||
@@ -20,22 +20,24 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
console.log('added a line here');
|
||||
|
||||
const introHeight = document.querySelector('.intro').offsetHeight;
|
||||
const topButton = document.getElementById('top-button');
|
||||
const $topButton = $('#top-button');
|
||||
|
||||
window.addEventListener('scroll', function() {
|
||||
if (window.scrollY > introHeight) {
|
||||
$topButton.fadeIn();
|
||||
} else {
|
||||
$topButton.fadeOut();
|
||||
}
|
||||
}, false);
|
||||
window.addEventListener(
|
||||
'scroll',
|
||||
function() {
|
||||
if (window.scrollY > introHeight) {
|
||||
$topButton.fadeIn();
|
||||
} else {
|
||||
$topButton.fadeOut();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
topButton.addEventListener('click', function() {
|
||||
$('html, body').animate({scrollTop: 0}, 500);
|
||||
$('html, body').animate({ scrollTop: 0 }, 500);
|
||||
});
|
||||
|
||||
const hand = document.querySelector('.emoji.wave-hand');
|
||||
@@ -47,7 +49,9 @@ $(function() {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
setTimeout(function() { waveOnLoad(); }, 1000);
|
||||
setTimeout(function() {
|
||||
waveOnLoad();
|
||||
}, 1000);
|
||||
|
||||
hand.addEventListener('mouseover', function() {
|
||||
hand.classList.add('wave');
|
||||
@@ -57,19 +61,17 @@ $(function() {
|
||||
hand.classList.remove('wave');
|
||||
});
|
||||
|
||||
|
||||
window.sr = ScrollReveal({
|
||||
reset: false,
|
||||
duration: 600,
|
||||
easing: 'cubic-bezier(.694,0,.335,1)',
|
||||
scale: 1,
|
||||
viewFactor: 0.3
|
||||
viewFactor: 0.3,
|
||||
});
|
||||
|
||||
sr.reveal('.background');
|
||||
sr.reveal('.skills');
|
||||
sr.reveal('.experience', {viewFactor: 0.2});
|
||||
sr.reveal('.featured-projects', {viewFactor: 0.1});
|
||||
sr.reveal('.other-projects', {viewFactor: 0.05});
|
||||
|
||||
sr.reveal('.experience', { viewFactor: 0.2 });
|
||||
sr.reveal('.featured-projects', { viewFactor: 0.1 });
|
||||
sr.reveal('.other-projects', { viewFactor: 0.05 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user