-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
86 lines (76 loc) · 1.47 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
<style>
@import url(https://fonts.googleapis.com/css?family=Prompt:900);
html {
font-family: 'Prompt', sans-serif;
background-color: #000;
color: #fff;
font-size: 5vw;
}
container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
height: 100vh;
}
#outer {
text-align: center;
}
#inner {
display: inline-block;
}
#app {
margin-left: 20px;
letter-spacing: 0.25em;
text-transform: uppercase;
}
</style>
<script>
window.onload = function() {
pyjs();
};
function pyjs() {
const items = [
'Python',
'unikernels',
'FTW'
]
const app = document.getElementById('app')
let count = 0
let index = 0
let typingEffect = () => {
let text = items[index]
if (count < text.length) {
setTimeout(() => {
app.innerHTML += text[count]
count++
typingEffect()
}, Math.floor(Math.random(10) * 100))
} else {
count = 0;
index = (index + 1 < items.length) ? index + 1 : 0
setTimeout(() => {
app.innerHTML = ''
typingEffect()
}, 1500)
}
}
typingEffect()
}
</script>
<container>
<div id="outer">
<div id="inner">
<img src="/python.png"/>
</div>
</div>
<div id="app"></div>
</container>