-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
65 lines (59 loc) · 2.98 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<head>
<meta name="description" content="Will Folsom, full stack engineer. Currently working at Capitalize. Move your mouse around the page or rotate your device to move the card.">
<meta name="keywords" content="will folsom, will, folsom, lead, full stack, software engineer, software, developer, creative, css transform, 3D business card, javascript, stars">
<meta name="og:title" property="og:title" content="Will Folsom">
<meta name="og:description" property="og:description" content="Will Folsom, Full Stack Engineer">
<meta name="robots" content="index, follow">
<meta name="author" content="Will Folsom">
<title>Will Folsom</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?&family=Work+Sans:wght@500&display=swap">
</head>
<body>
<h1>Will Folsom</h1>
<h2>Full Stack Engineer</h2>
<h3>Currently Working at Capitalize</h3>
<h3>Move your mouse around the page or rotate your device to move the card</h3>
<div id="starsSmall"></div>
<div id="starsMedium"></div>
<div class="card">
<div class="card-content">
<div class="name">
<div class="z105 blue">w</div><div class="z95 red">i</div><div class="z90 green">l</div><div class="z100 blue">l </div>
<div class="z100 red">f</div><div class="z95 blue">o</div><div class="z110 red">l</div><div class="z105 green">s</div><div class="z95 blue">o</div><div class="z100 red">m</div>
</div>
<p>Full Stack Engineer</p>
<ul>
<li><a href="https://www.linkedin.com/in/willfolsom/" target="_blank">LinkedIn</a></li>
<li><a href="https://github.com/willfolsom/" target="_blank">GitHub</a></li>
<li><a href="https://www.instagram.com/will.folsom/" target="_blank">Insta</a></li>
</ul>
</div>
</div>
</body>
<script>
let card = document.querySelector('.card');
if (!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) {
document.addEventListener('mousemove', function(e) {
let xAxis = ((window.innerWidth / 2 - e.pageX) / 20) * -1;
let yAxis = (window.innerHeight / 2 - e.pageY) / 20;
card.style.transform = `rotateY(${xAxis}deg) rotateX(${yAxis}deg)`;
});
} else {
let init = false;
let betaOffset = 0, gammaOffset = 0;
let beta = 0, gamma = 0;
function handleOrientation(event) {
if (!init) {
betaOffset = event.beta;
gammaOffset = event.gamma;
init = true;
}
beta = (event.beta - betaOffset) * -1;
gamma = (event.gamma - gammaOffset) * .5;
card.style.transform = `rotateY(${gamma}deg) rotateX(${beta}deg)`;
}
window.addEventListener('deviceorientation', handleOrientation);
}
</script>