-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKartik.js
112 lines (103 loc) · 2.27 KB
/
Kartik.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
window.onresize = function ()
{
document.getElementById('coverpage').style.height='100vh';
document.getElementById('coverpage').style.width='100vw';
}
/*
var arr1 = [" ","Hey guys !!!! I am Kartik Venkataraman ..", "It's really good to see you here :)"];
var i = 0;
var j = 0;
var inc = 1;
var k = 0;
var temp = [];
intro.innerHTML = arr1[0];
j = arr1[0].length;
for(k =0;k<arr1[0].length;k++)
{
temp.push(arr1[0][k]);
}
function change()
{
var div = document.getElementById("intro");
if(inc>0)
{
if(j<arr1[i].length)
temp.push(arr1[i][j]);
}
else
{
temp.splice(j,1);
}
var temp1 = temp.join("");
intro.innerHTML = temp1+"|";
if(j == arr1[i].length)
inc = inc*-1;
j = j+inc;
if(j<0 && inc == -1)
{
j = 0;
inc = 1;
i = (i+1)%arr1.length;
}
}
setInterval(change,200);
*/
//for the i love html animation
var arr = ["C++","Python","Algorithms","HTML","CSS","Javascript","PHP","Laravel"];
var i = 0;
var j = 0;
var inc = 1;
var k = 0;
var temp = [];
abcd.innerHTML = arr[0];
j = arr[0].length;
for(k =0;k<arr[0].length;k++)
{
temp.push(arr[0][k]);
}
function change()
{
var div = document.getElementById("abcd");
if(inc>0)
{
if(j<arr[i].length)
temp.push(arr[i][j]);
}
else
{
temp.splice(j,1);
}
var temp1 = temp.join("");
abcd.innerHTML = temp1+"|";
if(j == arr[i].length)
inc = inc*-1;
j = j+inc;
if(j<0 && inc == -1)
{
j = 0;
inc = 1;
i = (i+1)%arr.length;
}
}
setInterval(change,200);
var flag=true;
function fun()
{
if(flag)
{
document.getElementById("pic1").style.transform="translate(150px,0px)";
document.getElementById("pic2").style.transform="translate(130px,55px)";
document.getElementById("pic3").style.transform="translate(100px,100px)";
document.getElementById("pic4").style.transform="translate(55px,130px)";
document.getElementById("pic5").style.transform="translate(0px,150px)";
}
else
{
document.getElementById("pic1").style.transform="translate(0px,0px)";
document.getElementById("pic2").style.transform="translate(0px,0px)";
document.getElementById("pic3").style.transform="translate(0px,0px)";
document.getElementById("pic4").style.transform="translate(0px,0px)";
document.getElementById("pic5").style.transform="translate(0px,0px)";
}
flag=!flag;
}