-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
90 lines (80 loc) · 1.97 KB
/
index.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
//blinking animation
const blinkingAnimation = () => {
new TypeIt('#blinking', {
lifeLike: false,
speed: 0,
})
.type('.')
.pause(435)
.type('.')
.pause(441)
.type('.')
.pause(438)
.go();
};
//preloader
const loader = document.getElementById('preloader');
window.addEventListener('load', function () {
blinkingAnimation();
loader.style.display = 'none';
});
// https://codepen.io/AllThingsSmitty/pen/JJavZN
//heading animations
new TypeIt('#heading-schedule', {
speed: 125,
waitUntilVisible: true,
})
.type('cat <span class="text-white">SCHEDULE</span>.txt')
.go();
new TypeIt('#heading-tracks', {
speed: 125,
waitUntilVisible: true,
})
.type('ls ')
.pause(162)
.type('-a ')
.pause(154)
.type('<span class="text-white">TRACKS</span>')
.pause(217)
.type('txt')
.pause(139)
.move(-3)
.type('.')
.pause(284)
.move(3, { instant: true })
.go();
// new TypeIt('#heading-prizes', {
// speed: 150,
// waitUntilVisible: true,
// })
// .type('vi <span class="text-white">PRIZE</span>.yml')
// .go();
new TypeIt('#heading-sponsors', {
speed: 125,
waitUntilVisible: true,
})
.type('tar -xvzf<span class="text-white"> SPONSORS</span>.t')
.pause(468)
.type('ar.gz', { instant: true })
.go();
new TypeIt('#heading-rules', {
speed: 125,
waitUntilVisible: true,
})
.type('./<span class="text-white">FAQ</span>')
.go();
//devfolio
// create a script element
const script = document.createElement('script');
script.src = 'https://apply.devfolio.co/v2/sdk.js';
script.async = true;
script.defer = true;
// add the script to the body of the document
document.body.appendChild(script);
// remove the script from the body of the document on unmount
window.addEventListener('beforeunload', () => {
document.body.removeChild(script);
});
// change devolio button size
// let button = document.querySelector(".devfolio-button-iframe");
// button.style = "padding: 0px; border: 0px; margin: 0px; height: 44px; width: 312px;"