-
Notifications
You must be signed in to change notification settings - Fork 0
/
animations.js
139 lines (113 loc) · 3.14 KB
/
animations.js
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
var introAnimation = function() {
var typingAnimation = $.Deferred();
var exposingAnimation = $.Deferred();
var statusBarAnimation = $.Deferred();
var coderAnimation = $.Deferred();
var explorerAnimation = $.Deferred();
var panelsAnimation = $.Deferred();
setTimeout(function() {
slickTyping();
typingAnimation.resolve();
}, 25);
setTimeout(function() {
slickExpose();
exposingAnimation.resolve();
}, 3000);
setTimeout(function() {
slickStatusBar();
statusBarAnimation.resolve();
}, 3000);
setTimeout(function() {
$('#coder').animate({'marginRight': '170'}, {
duration: 1000,
});
$('#coder').css('display', 'flex');
// $('.intro-des').css('display', 'flex');
$('body').css('background-color', '#4B0082');
coderAnimation.resolve();
}, 4000);
setTimeout(function() {
$('#golfer').animate({'marginLeft': '220'}, {
duration: 1000,
});
$('#golfer').css('display', 'flex');
$('body').css('background-color', '#2E8B57');
//$('body').css('background-color', '#D2691E');
$('#box1').css('background-color', 'transparent');
$('#box2').css('background-color', 'transparent');
//$('#box').css('display', 'flex');
//$('.intro-des').css('display', 'flex');
explorerAnimation.resolve();
}, 5000);
setTimeout(function() {
// $('.box').animate({'top': '170'}, {
// duration: 1000,
// });
// $('.intro-des').animate({'top': '470'}, {
// duration: 1000,
// });
$('#box1').animate({'marginRight': '170'}, {
duration: 1000,
});
$('#box2').animate({'marginLeft': '170'}, {
duration: 1000,
});
$('#box3').animate({'top': '270'}, {
duration: 1000,
});
$('.box').css('display', 'flex');
$('.intro-des').css('display', 'none');
// $('#coder').text("+");
// $('#coder').animate({'marginLeft': '270'}, {
// duration: 1000,
// });
// $('#golfer').text("");
// $('#golfer').css('display', 'none');
$('body').css('background-color', '#D2691E');
$('.github-corner').css('display', 'flex');
$('.personal').css('display', 'flex');
$('.college').css('display', 'flex');
$('.created-with').css('display', 'flex');
$('#cd-timeline').css('display', 'table');
panelsAnimation.resolve();
}, 7000);
return $.Deferred(function (def) {
$.when(typingAnimation)
.done(exposingAnimation)
.done(statusBarAnimation)
.done(coderAnimation)
.done(explorerAnimation)
.done(panelsAnimation);
});
};
function slickTyping() {
$(".intro-text").typed({
strings: ["•••", "Hi! I'm Raymel."],
typeSpeed: 75
});
}
function slickExpose() {
$('.container').animate({'bottom': '500'}, {
duration: 1000,
});
}
function slickStatusBar() {
var width = 0;
var id = setInterval(frame, 15);
function frame() {
if (width >= 100) {
clearInterval(id);
$('.slick-progressbar').css('width', '0%');
$('.footer').css('height', '40px');
} else {
width += 1;
$('.slick-progressbar').css('width', width + '%');
}
}
}
// function showMyRepos() {
// $(".mah-github-repos").loadRepositories("raymelon");
// $('.mah-github-repos').animate({'top': '150'}, {
// duration: 1000,
// });
// }