-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.html.ejs
More file actions
156 lines (125 loc) · 3.72 KB
/
index.html.ejs
File metadata and controls
156 lines (125 loc) · 3.72 KB
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
<!DOCTYPE html>
<html lang='en-US'>
<head>
<title>Gitopia</title>
<link rel="manifest" href="/manifest.json" />
<meta name="Description" content="Permanent Versioning for your Code">
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script async defer data-domain="gitopia.org" src="https://plausible.io/js/plausible.hash.js"></script>
<!--Replace with your tailwind.css once created-->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet">
<link rel="preload" href="/main.js" as="text/javascript">
<!-- Define your gradient here - use online tools to find a gradient matching your branding-->
<style>
</style>
<!-- <style>
html,
body {
overflow: hidden;
width: 100vw;
height: 100vh;
margin: 0;
}
@media (max-width: 767px) {
html,
body {
overflow: visible;
}
}
</style> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/railscasts.min.css">
<link rel="author" href="humans.txt">
</head>
<body class="landing-body" style="font-family: 'Source Sans Pro', sans-serif;">
<div class=root>
<div class="content-skeleton"></div>
</div>
<script nomodule type=text/javascript>
document.body.innerHTML = "Please use modern browser. (I checked to work only latest chrome)"
</script>
<script type=module>
// relative path from root
const IS_LOCALHOST = location.href.indexOf("localhost") > -1
const USE_SW = !IS_LOCALHOST
;(async () => {
try {
// SW
if (USE_SW) {
console.time("loading:sw")
// start sw handling
// start sw check
console.timeEnd("loading:sw")
}
// Plugin namespace
window.NEPlugins = {}
console.time("loading:main")
await import(/* webpackIgnore: true */ "./main.js")
console.timeEnd("loading:main")
} catch (e) {
console.log(e)
// TODO: Show restore guide
}
})()
</script>
<script>
function setupTypewriter(t) {
var HTML = t.innerHTML;
t.innerHTML = "";
var cursorPosition = 0,
tag = "",
writingTag = false,
tagOpen = false,
typeSpeed = 10,
tempTypeSpeed = 0;
var type = function () {
if (writingTag === true) {
tag += HTML[cursorPosition];
}
if (HTML[cursorPosition] === "<") {
tempTypeSpeed = 0;
if (tagOpen) {
tagOpen = false;
writingTag = true;
} else {
tag = "";
tagOpen = true;
writingTag = true;
tag += HTML[cursorPosition];
}
}
if (!writingTag && tagOpen) {
tag.innerHTML += HTML[cursorPosition];
}
if (!writingTag && !tagOpen) {
if (HTML[cursorPosition] === " ") {
tempTypeSpeed = 0;
}
else {
tempTypeSpeed = (Math.random() * typeSpeed) + 50;
}
t.innerHTML += HTML[cursorPosition];
}
if (writingTag === true && HTML[cursorPosition] === ">") {
tempTypeSpeed = (Math.random() * typeSpeed) + 50;
writingTag = false;
if (tagOpen) {
var newSpan = document.createElement("span");
t.appendChild(newSpan);
newSpan.innerHTML = tag;
tag = newSpan.firstChild;
}
}
cursorPosition += 1;
if (cursorPosition < HTML.length - 1) {
setTimeout(type, tempTypeSpeed);
}
};
return {
type: type
};
}
</script>
</body>
</html>