mirror of
https://github.com/Xevion/old.xevion.github.io.git
synced 2025-12-05 23:15:31 -06:00
hire me
This commit is contained in:
@@ -2,7 +2,7 @@ $(function() {
|
||||
|
||||
const d = new Date();
|
||||
const hours = d.getHours();
|
||||
const nighttime = (hours >= 19) || (hours <= 7); // 7pm <= hours <= 7am
|
||||
const nighttime = (hours >= 19) || (hours <= 7); // between 7pm and 7am
|
||||
const body = document.querySelector('body');
|
||||
const toggle = document.getElementById('toggle');
|
||||
const input = document.getElementById('switch');
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
// background-color: $yellow;
|
||||
|
||||
&__light {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&__ring {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
animation: pulsate 2s ease-out;
|
||||
animation-iteration-count: infinite;
|
||||
opacity: .0;
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
&__led {
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
background: $green;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = gulp => {
|
||||
useEslintrc: true
|
||||
}))
|
||||
.pipe(eslint.format())
|
||||
.pipe(uglify())
|
||||
// .pipe(uglify())
|
||||
.pipe(gulp.dest(destPath))
|
||||
.pipe(gulp.dest('js'));
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
78
js/main.js
78
js/main.js
@@ -1 +1,77 @@
|
||||
$(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})});
|
||||
$(function() {
|
||||
|
||||
const d = new Date();
|
||||
const hours = d.getHours();
|
||||
const nighttime = (hours >= 19) || (hours <= 7); // 7pm <= hours <= 7am
|
||||
const body = document.querySelector('body');
|
||||
const toggle = document.getElementById('toggle');
|
||||
const input = document.getElementById('switch');
|
||||
|
||||
if (nighttime) {
|
||||
input.checked = true;
|
||||
body.classList.add('night');
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', function() {
|
||||
const isChecked = input.checked;
|
||||
if (isChecked) {
|
||||
body.classList.remove('night');
|
||||
} else {
|
||||
body.classList.add('night');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
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);
|
||||
|
||||
topButton.addEventListener('click', function() {
|
||||
$('html, body').animate({scrollTop: 0}, 500);
|
||||
});
|
||||
|
||||
|
||||
|
||||
const hand = document.querySelector('.emoji.wave-hand');
|
||||
|
||||
function waveOnLoad() {
|
||||
hand.classList.add('wave');
|
||||
setTimeout(function() {
|
||||
hand.classList.remove('wave');
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
setTimeout(function() { waveOnLoad(); }, 1000);
|
||||
|
||||
hand.addEventListener('mouseover', function() {
|
||||
hand.classList.add('wave');
|
||||
});
|
||||
|
||||
hand.addEventListener('mouseout', function() {
|
||||
hand.classList.remove('wave');
|
||||
});
|
||||
|
||||
|
||||
window.sr = ScrollReveal({
|
||||
reset: false,
|
||||
duration: 600,
|
||||
easing: 'cubic-bezier(.694,0,.335,1)',
|
||||
scale: 1,
|
||||
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});
|
||||
|
||||
});
|
||||
|
||||
20
package-lock.json
generated
20
package-lock.json
generated
@@ -501,9 +501,9 @@
|
||||
}
|
||||
},
|
||||
"browser-sync": {
|
||||
"version": "2.20.0",
|
||||
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.20.0.tgz",
|
||||
"integrity": "sha512-PjF3EHLzgax11AuKfTzgx4wUe7ksT2VSWxdq5FssvytxGSdIqJWvV3unM0+lnI0BxGt/8sGLZEIlgx7Dn2S0LQ==",
|
||||
"version": "2.21.0",
|
||||
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.21.0.tgz",
|
||||
"integrity": "sha1-kc3jqEUvIvNV6+cXyhs8Hb+coJY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browser-sync-ui": "1.0.1",
|
||||
@@ -514,6 +514,8 @@
|
||||
"easy-extender": "2.3.2",
|
||||
"eazy-logger": "3.0.2",
|
||||
"emitter-steward": "1.0.0",
|
||||
"etag": "1.8.1",
|
||||
"fresh": "0.5.2",
|
||||
"fs-extra": "3.0.1",
|
||||
"http-proxy": "1.15.2",
|
||||
"immutable": "3.8.1",
|
||||
@@ -2865,9 +2867,9 @@
|
||||
}
|
||||
},
|
||||
"fresh": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz",
|
||||
"integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=",
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
|
||||
"dev": true
|
||||
},
|
||||
"fs-exists-sync": {
|
||||
@@ -7993,6 +7995,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"fresh": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz",
|
||||
"integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=",
|
||||
"dev": true
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"author": "Brittany Chiang",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.20.0",
|
||||
"browser-sync": "^2.21.0",
|
||||
"eslint-config-starry": "7.0.0",
|
||||
"eslint-plugin-starry": "5.0.0",
|
||||
"gulp": "3.9.1",
|
||||
|
||||
BIN
resume.pdf
BIN
resume.pdf
Binary file not shown.
Reference in New Issue
Block a user