-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
307 lines (276 loc) · 10.4 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Hi, I’m Tim Lucas</title>
<meta name="description" content="Designer, developer, creative leader, and entrepreneur">
<link rel="icon" href="/images/favicon.png" type="image/png">
<meta property="og:site_name" content="Tim Lucas">
<meta property="og:title" content="Hi, I’m Tim Lucas" />
<meta property="og:type" content="website">
<meta property="og:locale" content="en_AU">
<meta property="og:image" content="https://toolmantim.com/images/opengraph.png">
<meta property="og:image:alt" content="The words 'Hi, I'm Tim' with Tim's face in place of the letter 'i', and a small lightning bolt illustration">
<meta property="og:url" content="https://toolmantim.com">
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Hi, I'm Tim Lucas">
<meta name="twitter:image" content="https://toolmantim.com/images/opengraph.png">
<meta name="twitter:site" content="@toolmantim">
<meta name="twitter:creator" content="@toolmantim">
<link href="https://mastodon.au/@toolmantim" rel="me">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Epilogue:wght@400&family=Inter:wght@900&display=swap" rel="stylesheet">
<!--
_
_ \'-_,#
_\'--','`|
\`---` / There's always money in the banana stand ;)
`----'`
-->
<style>
@keyframes bolt-of-intrigue {
from { transform: translateY(0px); }
to { transform: translateY(5px); }
}
@keyframes head-wobble-gobble-gobble {
from { transform: rotate(5deg) scale(1.0); }
to { transform: rotate(3deg) scale(1.04); }
}
:root {
--page-font-color: black;
--page-bg-color: #f5f5f5;
font-family: Inter, sans-serif;
background-color: var(--page-bg-color);
color: var(--page-font-color);
}
*::selection {
background-color: #89DCFF;
}
html, body, h1, header, nav, ol, li { margin: 0; padding: 0; }
html, body, article { width: 100%; height: 100%; }
a { color: #0064ff; text-decoration-style: wavy; text-decoration-thickness: 3px; text-decoration-color: #89DCFF; text-underline-offset: 5px; }
a:hover { color: #EA563D; text-decoration-color: #FFCE51; }
a img { border: none; }
del { text-decoration-color: #EA563D; text-decoration-thickness: 3px; }
.inner {
padding: 120px 20px;
max-width: 50rem;
margin-left: auto;
margin-right: auto;
}
.PageTitle {
font-size: 96px;
font-weight: 900;
line-height: 0;
font-style: italic;
margin-bottom: 60px;
}
.PageTitle__Tim {
font-size: 200px;
text-transform: uppercase;
margin-left: -45px;
display: block;
}
.PageTitle__Tim__Head {
display: inline-block;
width: 120px;
height: 220px;
top: 30px;
background: url(images/head.png);
background-size: 100%;
text-indent: -1000px;
overflow: hidden;
margin-right: -20px;
position: relative;
transform: rotate(5deg);
cursor: pointer;
-webkit-tap-highlight-color: transparent;
will-change: transform; /* workaround top white line rendering bug in mobile safari */
}
.PageTitle__Tim__Head.utterings-of-madness {
animation: head-wobble-gobble-gobble 75ms infinite linear alternate;
}
.Lightning {
all: unset;
display: block;
background-image: url("images/lightning.svg");
width: 75px;
height: 75px;
animation: alternate bolt-of-intrigue 1s cubic-bezier(0.55, 0, 0.45, 1) infinite;
margin: 40px 0 40px 0;
margin-left: -10px;
transform: skew(0, 0);
/* transition: transform 160ms cubic-bezier(0.68, -0.6, 0.32, 1.6); */
-webkit-tap-highlight-color: transparent;
}
.Lightning:hover, .Lightning--active {
animation: none;
transform: skew(-40deg, 20deg);
}
.PeanutButterJellyTime {
position: fixed;
bottom: 0px;
/* Quickly dissapear down */
transition: transform 80ms linear;
transform: translateY(100%);
}
.PeanutButterJellyTime--visible {
transform: translateY(0%);
/* Quickly bounce up */
transition-duration: 250ms;
transition-timing-function: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}
.Words {
font-size: 24px;
font-weight: 400;
font-family: Epilogue, sans-serif;
line-height: 37px;
color: #222;
}
@media screen and (min-width: 1200px) {
.PageTitle {
margin-left: -150px;
}
.Lightning {
margin-left: -28px;
}
.Words {
font-size: 28px;
line-height: 42px;
}
}
@media screen and (max-width: 500px) {
.inner {
padding-top: 100px;
}
.PageTitle {
font-size: 76px;
}
.PageTitle__Tim {
font-size: 150px;
margin-top: -10px;
margin-left: -35px;
}
.PageTitle__Tim__Head {
margin-right: -20px;
transform: scale(0.9) rotate(5deg);
width: calc(120px * 0.8);
height: calc(220px * 0.8);
}
.Words {
line-height: 32px;
}
}
</style>
<script>
document.addEventListener("DOMContentLoaded", () => {
if (!window.speechSynthesis) return;
// Calculate this once
const screenWidth = document.documentElement.clientWidth;
// Util
const randomElement = (array) =>
array[Math.floor(Math.random() * array.length)];
// Consts and vars
var facePokes = 0;
const hypotheticalLimitToHowManyTimesYouCanBePokedInTheFace = 15;
const ouchies = [
"Ow, that hurt!",
"Ow!",
"That tickles",
"Ouchies",
"What what what",
"Stop it",
"If you break you buy",
"What did I say?",
"Don't make me mad.",
"Ouch"
];
const voices = speechSynthesis.getVoices();
const utterance = new SpeechSynthesisUtterance("");
const humanHeadNotDOMHead = document.querySelector(".PageTitle__Tim__Head");
let pbjs;
let lastPbj;
humanHeadNotDOMHead.addEventListener("mousedown", (event) => {
event.preventDefault();
speechSynthesis.cancel();
facePokes += 1;
let peanutButterJellyTime =
facePokes >= hypotheticalLimitToHowManyTimesYouCanBePokedInTheFace;
if (peanutButterJellyTime) {
utterance.text = "Peanut butter jelly time!";
} else {
utterance.text = randomElement(ouchies);
}
utterance.lang = "en-AU";
utterance.voice = randomElement(voices);
speechSynthesis.speak(utterance);
humanHeadNotDOMHead.classList.add("utterings-of-madness");
utterance.addEventListener("end", () => {
humanHeadNotDOMHead.classList.remove("utterings-of-madness");
if (lastPbj) {
lastPbj.classList.remove("PeanutButterJellyTime--visible");
}
});
if (peanutButterJellyTime) {
// Fixed array of two pbjs so we can avoid creating DOM nodes during
// play, and have two onscreen (one disappearing while the new one
// appears)
if (!pbjs) {
pbjs = Array(2)
.fill()
.map(() => {
const pbj = document.createElement("img");
pbj.src = "images/pbj.gif";
pbj.alt = "Peanut Butter Jelly Time!";
pbj.width = 33;
pbj.height = 35;
pbj.classList.add("PeanutButterJellyTime");
document.body.appendChild(pbj);
return pbj;
});
}
if (lastPbj) {
lastPbj.classList.remove("PeanutButterJellyTime--visible");
}
const thisPbj = lastPbj == pbjs[0] ? pbjs[1] : pbjs[0];
thisPbj.style.left = Math.random() * (screenWidth - 33) + "px";
requestAnimationFrame(() =>
thisPbj.classList.add("PeanutButterJellyTime--visible")
);
lastPbj = thisPbj;
}
});
}, false);
document.addEventListener("DOMContentLoaded", () => {
const lightning = document.querySelector(".Lightning");
lightning.addEventListener("click", () => {
lightning.classList.add("Lightning--active");
setTimeout(() => {
lightning.classList.remove("Lightning--active");
}, 300);
});
}, false);
</script>
</head>
<body>
<div class="Rainbow"></div>
<div class="inner">
<h1 class="PageTitle">Hi, I’m<br><span class="PageTitle__Tim">T<i class="PageTitle__Tim__Head">i</i>m</span></h1>
<hr class="Lightning" />
<div class="Words">
<p>I’m a designer, developer, creative leader, and entrepreneur who has been building internet things for over 25 years. I love collaborating with great people and bringing new ideas to life — whether it be companies, identities, sites, apps, co-working spaces, conferences, collabs, or side projects ✨</p>
<p>Away from the screen I like heading out of Melbourne to <del>rock climb</del> mountain bike, spend time with my partner and kids, take photos, and get plenty of sunshine ☀️</p>
<p>You can find me on the <a href="https://mastodon.au/@toolmantim">🐘 elephant site</a>, the <a href="https://read.cv/toolmantim">📃 readme site</a>, the <a href="https://github.com/toolmantim">⚙️ software site</a>, and <a href="mailto:t@THISDOMAIN">✉️ email</a>.</p>
</div>
</div>
<script>
(function(links) {
for (var i = 0; i < links.length; i++)
links[i].href = links[i].href.replace("THISDOMAIN", window.location.host);
})(document.getElementsByTagName("a"));
</script>
</body>
</html>