-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
476 lines (452 loc) · 14.6 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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" type="image/png" href="axz-black.png">
<title>Allen & Anthony's Portfolio</title>
<link href="https://fonts.googleapis.com/css?family=Indie+Flower" rel="stylesheet">
<meta name="description" content="Allen and Anthony's webside development portfolio. Contact information and project examples are included.">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132847876-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-132847876-1');
</script>
<meta name = "viewport" content = "width= device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel = "stylesheet" href = "main.css">
<script src = "anime.js" type = "text/javascript">
</script>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
</head>
<body>
<div id="intro-screen" >
<ul class="intro-letters">
<li class="special-intro-letter"><img src="axz-white-left.png" style="object-position: 0;"></li>
<li class="v">L</li>
<li class="v">&</li>
<li class="v">A</li>
<li class="v">N</li>
<li class="special-intro-letter"><img src="axz-white-right.png" style="object-position: 100%"></li>
<li class="l">H</li>
<li class="l">O</li>
<li class="l">U</li>
</ul>
<!--<p class="intro-slogan">Discover. Dream. Dare.</p>-->
</div>
<div class = "particle">
<div id="particles-js"></div>
<script src="particles.js"></script>
<script src="app.js"></script>
</div>
<div class = "navigation-bar">
<div class = "logo">
<a href = "index.html">
<img src = "axz-black.png" alt = "Logo" height = "60px">
<!--<img src = "vl-logo-white.png" alt = "Logo" height = "40px" href = "verdantleaf.php">-->
</a>
</div>
<!--<a href="about.html" class = "about">
about
</a>-->
<div class = "contact" >
<a href = "#0"onclick="smoothScroll(document.getElementById('scroll-target'))">
<div class = "contact-hover">
<div class = contact-hover-insideA>
contact
</div>
<div class = "contact-hover-inside">
contact
</div>
</div>
</a>
</div>
</div>
<div class = "container-sectionA">
<div class = "section-A" >
<div class = "middleA">
<hr class = "line">
<div class = "hello">
hello
</div>
</div>
<div class = "middleB">
</div>
</div>
</div>
<div class = "container-sectionB">
<div class = "sectionB">
<img src = "dallas-skyline.jpg" alt = "the Dallas skyline" class = "dallas" >
<div class = "dallas-word-group">
<div class = "dallas-text">
featured projects
</div>
<hr class = "line2">
</div>
</div>
</div>
<div class = "container-sectionC" data-box>
<div class = "f1">
<ul>
<li class = "summary"><a class = "effect-box" href = "https://verdantleaf.org"target = "_blank">
an avant-garde article publishing site with a vibrant color scheme </a></li>
<br><br>
<li class = "summary"><a class = "effect-box" href = "https://verdantlife.org"target = "_blank">
a sharp, fresh nutrition website promoting healthier lifestyles</a></li>
<br><br>
<li class = "summary"><a class = "effect-box" href = "https://apalebluedot.world"target = "_blank">
a creative and interactive site about the Earth and our place in the cosmos</a></li>
<br><br>
<li class = "summary"><a class = "effect-box" href = "https://uta.edu/zhoulab"target = "_blank">
a functional and fresh college research group site</a></li>
</ul>
</div>
</div>
<div class = "bottom2">
</div>
<div class = "contact-section">
<div id="scroll-target"></div>
<div class = "contact-section-text">
email us
</div>
<div class = "email" onmouseover="changeBackground('#c4f2e4', '#abbcd6', '#3d5151', 1)" onmouseout="changeBackground('#1a1a1a', 'white', '#47e9b4', 0)">
ufoaz1@gmail.com
</div>
<script>
var timelin = anime.timeline();
timelin.add({
targets: [".middleA"],
offset: 3200,
duration: 2500,
opacity: [0,1],
easing: 'easeOutQuart'
})
var sentence = "Allen and Anthony Zhou design sites that pair functionality with panache.";
var letters = sentence.split("");
var num = 0;
for (var j = 0; j < sentence.split(" ").length; j++) {
var wordDiv = document.createElement("div");
wordClas = "w" + j;
wordDiv.setAttribute('class', wordClas);
wordDiv.style.display = "inline-block";
document.querySelector('.middleB').appendChild(wordDiv);
while (num < letters.length){
var letter = letters[num];
var clas = "l" + num;
if (letter == " ") {
letter = " ";
}
var div = document.createElement("div");
div.innerHTML = "" + letter;
div.setAttribute('class', clas);
div.style.display = "inline-block";
document.querySelector("." + wordClas).appendChild(div);
clas = "." + clas;
timelin.add({
targets: clas,
offset: '-=2470',
duration: 2500,
opacity: [0,1],
easing: 'easeOutQuart'
})
num+= 1;
if (letter == " "){
break;
}
}
}
timelin.add({
targets: [".container-sectionB"],
offset: '-=1500',
duration: 2500,
easing: 'easeOutQuart',
opacity: [0,1]
});
$(document).ready(function() {
$("body").mousemove(function(e) {
var x = e.pageX / window.innerWidth;
(x = x * -10), (y = e.pageY / window.innerHeight);
(y = y * -10), (box = $("[data-box]"));
TweenMax.to(box, 0.3, {
x: x,
y: y,
ease: Power0.easeNone
});
});
});
//dots
//https://codepen.io/falldowngoboone/pen/PwzPYv
// dots is an array of Dot objects,
// mouse is an object used to track the X and Y position
// of the mouse, set with a mousemove event listener below
var dots = [],
mouse = {
x: 0,
y: 0
};
// The Dot object used to scaffold the dots
var Dot = function() {
this.x = 0;
this.y = 0;
this.node = (function(){
var n = document.createElement("div");
n.className = "trail";
document.body.appendChild(n);
return n;
}());
};
// The Dot.prototype.draw() method sets the position of
// the object's <div> node
Dot.prototype.draw = function() {
this.node.style.left = this.x + "px";
this.node.style.top = this.y + "px";
};
// Creates the Dot objects, populates the dots array
for (var i = 0; i < 4; i++) {
var d = new Dot();
dots.push(d);
}
// This is the screen redraw function
function draw() {
// Make sure the mouse position is set everytime
// draw() is called.
var x = mouse.x,
y = mouse.y;
// This loop is where all the 90s magic happens
dots.forEach(function(dot, index, dots) {
var nextDot = dots[index + 1] || dots[0];
dot.x = x;
dot.y = y;
dot.draw();
x += (nextDot.x - dot.x) * .6;
y += (nextDot.y - dot.y) * .6;
});
}
addEventListener("mousemove", function(event) {
//event.preventDefault();
mouse.x = event.pageX;
mouse.y = event.pageY;
});
// animate() calls draw() then recursively calls itself
// everytime the screen repaints via requestAnimationFrame().
function animate() {
draw();
requestAnimationFrame(animate);
}
// And get it started by calling animate().
animate();
</script>
<script>
//parallax
document.onscroll = function() {
var sectionA = document.querySelector(".container-sectionB");
if(window.scrollY> sectionA.getBoundingClientRect().top){
document.querySelector('.section-A').style = "margin-top: 0;";
document.querySelector('.section-A').style.position = "relative";
}
if (window.scrollY< sectionA.getBoundingClientRect().top){
document.querySelector('.section-A').style = "margin-top: 12%;";
document.querySelector('.section-A').style.position = "fixed";
}
var sectionC = document.querySelector(".container-sectionC");
if(bool > 0 && window.scrollY> sectionC.getBoundingClientRect().top){
bool = -1;
anime({
targets: [".container-sectionC"],
duration: 4500,
opacity: 1,
easing: 'easeOutQuart'
});
}
}
var bool = 1;
anime({
targets: [".container-sectionC"],
opacity:0
});
</script>
<script>
//email hover animation
function changeBackground(color, colorName, emailColor, i) {
document.getElementsByClassName("contact-section")[0].style = 'transition: 2s;';
document.getElementsByClassName("contact-section")[0].style.backgroundColor =color;
document.getElementsByClassName("contact-section")[0].style.filter ="brightness(80%)";
document.getElementsByClassName("contact-section-text")[0].style = 'transition: 2s;';
document.getElementsByClassName("contact-section-text")[0].style.color = colorName;
document.getElementsByClassName("email")[0].style = 'transition: 2s;';
document.getElementsByClassName("email")[0].style.color = emailColor;
if (i == 1){
document.querySelector(".contact a").style.color = "#494e56";
document.getElementsByClassName("logo")[0].style = "filter: invert(30%);";
}
else {
document.querySelector(".contact a").style.color = "#ffffff";
document.getElementsByClassName("logo")[0].style = "filter: invert(100%);";
}
}
</script>
<script>
//opening animation
var timeline = anime.timeline();
timeline.add({
targets: '.intro-letters li',
rotate: ['90','0'],
translateY: ['1000%','0'],
duration: 1000,
easing: 'easeOutQuart'
}).add({
targets: '.v',
translateX: '700%',
opacity: 0,
duration: 1000,
offset: 1500,
easing: 'easeOutQuart'
}).add({
targets: '.l',
translateX: '-700%',
opacity: 0,
duration: 1000,
offset: 1500,
easing: 'easeOutQuart'
}).add({
targets: '.special-intro-letter:first-child',
translateX: '220%',
offset: 1500,
duration: 1000,
easing: 'easeOutQuart'
}).add({
targets: document.querySelectorAll('.special-intro-letter')[1],
translateX: '-130%',
offset: 1500,
duration: 1000,
easing: 'easeOutQuart'
})
/*.add({
targets: '#intro-screen',
backgroundColor: 'rgb(255,255,255)',
duration: 1000,
offset: 2500,
easing: 'easeOutQuart'
})*/.add({
targets: '#intro-screen',
opacity: 0,
offset: 3000,
duration: 1500,
easing: 'easeOutQuart'
});
timeline.complete = function() {
document.getElementById("intro-screen").style.display = "none";
}
</script>
<script>
//line growing animation
anime({
targets: ['hr.line'],
width: '30%',
easing: 'easeInOutQuad',
direction: 'alternate',
loop: true,
autoplay: true
});
anime({
targets: [ "hr.line2"],
width: '100%',
easing: 'easeInOutQuad',
direction: 'alternate',
loop: true,
autoplay: true
});
</script>
<script>
//hello changing into different languages
var translations = ["hello", "你好", "ciao", "hola", "hallo"];
//, "bonjour", "namaste"
function translate(index) {
var h = document.getElementsByClassName('hello')[0];
h.innerText = translations[index];
var hello = anime.timeline();
hello.add({
targets: h,
opacity: [0,1],
duration: 500,
easing: 'easeOutQuad'
}).add({
targets:h,
opacity: 0,
duration: 500,
offset: 500,
easing: 'easeOutQuad'
});
hello.complete = function() {
if (index<translations.length-1)
{translate(++index);}
else translate(0);
}
}
translate(0);
</script>
<script>
//background color change (white to black)
window.onscroll = function() {
var bottom = document.querySelector(".container-sectionB");
//console.log(window.scrollY);
if(window.scrollY> bottom.getBoundingClientRect().top) {
document.getElementsByClassName('logo')[0].style = "filter:invert(100%); transition: 1s;";
anime({
targets:document.body,
backgroundColor: 'rgb(0,0,0)',
duration: 500,
easing: 'easeOutQuad'
});
anime({
targets:[".about", ".contact a"],
color: 'rgb(255,255,255)',
duration: 500,
easing: 'easeOutQuad'
});
}
if(window.scrollY< bottom.getBoundingClientRect().top) {
document.getElementsByClassName('logo')[0].style = "filter:invert(0%); transition: 1s;";
anime({
targets:document.body,
backgroundColor: 'rgb(255,255,255)',
duration: 500,
easing: 'easeOutQuad'
});
anime({
targets:[".about", ".contact a"],
color: 'rgb(0,0,0)',
duration: 500,
easing: 'easeOutQuad'
});
}
}
</script>
<script>
//autoscroll
window.smoothScroll = function(target) {
var scrollContainer = target;
do { //find scroll container
scrollContainer = scrollContainer.parentNode;
if (!scrollContainer) return;
scrollContainer.scrollTop += 1;
} while (scrollContainer.scrollTop == 0);
var targetY = 0;
do { //find the top of target relatively to the container
if (target == scrollContainer) break;
targetY += target.offsetTop;
} while (target = target.offsetParent);
scroll = function(c, a, b, i) {
i++; if (i > 50) return;
c.scrollTop = a + (b - a) / 50 * i;
setTimeout(function(){ scroll(c, a, b, i); }, 20);
}
// start scrolling
scroll(scrollContainer, scrollContainer.scrollTop, targetY, 0);
}
</script>
</body>
</html>