-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
398 lines (367 loc) · 13.9 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE HTML>
<!--
Massively by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131413029-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-131413029-1');
</script>
<title>BitNaughts</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="shortcut icon" type="image/x-icon" href="assets/bnico.ico">
<link rel="stylesheet" href="assets/css/main.css" />
<noscript>
<link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
<script src="assets/js/typed.min.js" type="text/javascript"></script>
<script>
class TextScramble {
constructor(el) {
this.el = el
this.chars = '!<>-_\\/[]{}—=+*^?#________'
this.update = this.update.bind(this)
}
setText(newText) {
const oldText = this.el.innerText
const length = Math.max(oldText.length, newText.length)
const promise = new Promise((resolve) => this.resolve = resolve)
this.queue = []
for (let i = 0; i < length; i++) {
const from = oldText[i] || ''
const to = newText[i] || ''
const start = Math.floor(Math.random() * 40)
const end = start + Math.floor(Math.random() * 40)
this.queue.push({ from, to, start, end })
}
cancelAnimationFrame(this.frameRequest)
this.frame = 0
this.update()
return promise
}
update() {
let output = ''
let complete = 0
for (let i = 0, n = this.queue.length; i < n; i++) {
let { from, to, start, end, char } = this.queue[i]
if (this.frame >= end) {
complete++
output += to
} else if (this.frame >= start) {
if (!char || Math.random() < 0.28) {
char = this.randomChar()
this.queue[i].char = char
}
output += `<span class="dud">${char}</span>`
} else {
output += from
}
}
this.el.innerHTML = output
if (complete === this.queue.length) {
this.resolve()
} else {
this.frameRequest = requestAnimationFrame(this.update)
this.frame++
}
}
randomChar() {
return this.chars[Math.floor(Math.random() * this.chars.length)]
}
}
function nextClick() {
document.getElementById("next").click();
}
document.addEventListener('DOMContentLoaded', function () {
const phrases = [' Code Gamified ', ' Free To Play ', ' Code To Win ', ' Open Sourced ', ' Java Syntax ']
const el = document.getElementById("buzzWords")
const fx = new TextScramble(el)
let counter = 0
const next = () => {
fx.setText(phrases[counter]).then(() => {
setTimeout(next, 1500)
})
counter = (counter + 1) % phrases.length
}
next()
Date.prototype.today = function () {
return (((this.getMonth() + 1) < 10) ? "0" : "") + (this.getMonth() + 1) + "/" + ((this.getDate() < 10) ? "0" : "") + this.getDate() + "/" + (this.getFullYear() - 54);
}
// For the time now
Date.prototype.timeNow = function () {
return ((this.getHours() < 10) ? "0" : "") + this.getHours() + ":" + ((this.getMinutes() < 10) ? "0" : "") + this.getMinutes() + ":" + ((this.getSeconds() < 10) ? "0" : "") + this.getSeconds();
}
new Typed('#loader', {
strings: ['^1\n^1\n`Initializing connection...`^' + parseInt(Math.random() * 1000) + '\n`Fetching from server...`^' + parseInt(Math.random() * 1000) + '\n`Decrypting packets...`^' + parseInt(Math.random() * 250) + '\n`Enter passkey: `^' + parseInt(Math.random() * 250) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 100) + '*^' + parseInt(Math.random() * 500) + '\n`Populating content...`^' + parseInt(Math.random() * 1000) + '\n`Days since invasion: 0 (' + new Date().today() + ')`^' + parseInt(Math.random() * 200) + '\n`Press SPACEBAR to continue `^' + parseInt(Math.random() * 1000)],
typeSpeed: 15,
backSpeed: 0,
showCursor: true,
loop: false
});
// new Typed('#buzzWords', {
// strings: ['Distributed-AI', 'Free-to-Play', 'Code-to-Win', 'Retro Sci-fi'],
// typeSpeed: 50,
// backSpeed: 0,
// smartBackspace: true, // this is a default
// loop: true
// });
setTimeout(nextClick, 5000);
});
</script>
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper" class="fade-in">
<!-- Intro -->
<div id="intro">
<!-- <h1>BitNaughts</h1> -->
<pre>
<div style="position:absolute">
<h2>BitNaughts</h2>
</div>
<code style = "height:24em; text-align: left;">
<span id="loader"></span>
</code>
</pre>
<ul class="actions">
<li><a href="#header" id="next" class="button icon solo fa-arrow-down scrolly">Continue</a></li>
</ul>
</div>
<!-- Header -->
<header id="header">
<a href="index.html" class="logo">BitNaughts</a>
</header>
<!-- Nav -->
<nav id="nav">
<ul class="links">
<li class="active"><a href="#">Home</a></li>
<li><a href="play">Play Demo</a></li>
<li><a href="#">Download (soon)</a></li>
<!-- <li><a href="#">Learn (soon)</a></li> -->
<!-- <li><a href="alpha">Wiki</a></li> -->
<!-- <li><a href="alpha">Portal</a></li> -->
<!-- <li><a href="#">Info()</a></li> -->
</ul>
<ul class="icons">
<li><a href="https://github.com/bitnaughts" class="icon fa-github"><span class="label">GitHub</span></a></li>
<!-- <li><a href="https://twitter.com/bitnaughts" class="icon fa-twitter"><span class="label">Twitter</span></a></li> -->
<!-- <li><a href="https://codefied.substack.com/" class="icon fa-bookmark"><span class="label">Substack</span></a></li> -->
<li><a href="mailto:[email protected]" class="icon fa-envelope"><span class="label">Email</span></a></li>
<!-- <li><div class="icon fa-ellipsis-v"></div></li>
<li><a href="portal.html" class="icon fa-user-circle"><span class="label">Log-in</span></a></li> -->
</ul>
</nav>
<!-- Main -->
<div id="main">
<!-- Featured Post -->
<article class="post featured">
<header>
<h2>BitNaughts is
<br>
<div id="buzzWords" style="font-family: 'Courier New', monospace;">Retro Sci-fi</div>
</h2>
</header>
<p style="font-family: 'Courier New', monospace; text-align: center;">
Construct your object-oriented space-ship;<br>
Learn programming to code your systems;<br>
Save the Earth from Martian invasion;<br>
</p>
<!-- <a href="#" class="image main"><img src="images/pic01.jpg" alt="" /></a> -->
<ul class="actions special">
<li><a href="play" class="button large">Play Demo</a></li>
<li><a href="#" class="button large">Download (soon)</a></li>
<!-- <li><a href="#" class="button large">Learn (soon)</a></li> -->
</ul>
</article>
<!-- Posts -->
<section class="posts">
<!-- <article>
<header>
<span class="date">July, 2020</span>
<h2><a href="#">Microsoft Hackathon '20<br />
"HackADuo"</a></h2>
</header>
<a href="#" class="image fit"><img src="images/fighter.png" alt="" /></a>
<p style="font-family: 'Courier New', monospace;">Plug-and-play ship modules have enabled rapid prototyping. See the archive of saved ship designs.</p>
<ul class="actions special">
<li><a href="#" class="button">Learn</a></li>
</ul>
</article>
<article>
<header>
<span class="date">July, 2021</span>
<h2><a href="#">Martians<br />
have invaded!</a></h2>
</header>
<a href="#" class="image fit"><img src="images/martian.png" alt="" /></a>
<p style="font-family: 'Courier New', monospace;">Global economies unite to coordinate defensive efforts. Power lines are down. You are our only hope!</p>
<ul class="actions special">
<li><a href="play" class="button">Play Campaign</a></li>
</ul>
</article>
<article>
<header>
<span class="date">September, 2022</span>
<h2><a href="#">Modular ships<br />
have arrived!</a></h2>
</header>
<a href="#" class="image fit"><img src="images/fighter.png" alt="" /></a>
<p style="font-family: 'Courier New', monospace;">Plug-and-play ship modules have enabled rapid prototyping. See the archive of saved ship designs.</p>
<ul class="actions special">
<li><a href="#" class="button">Learn</a></li>
</ul>
</article>
<article>
<header>
<span class="date">September, 2023</span>
<h2><a href="#">Martians<br />
have invaded!</a></h2>
</header>
<a href="#" class="image fit"><img src="images/martian.png" alt="" /></a>
<p style="font-family: 'Courier New', monospace;">Global economies unite to coordinate defensive efforts. Power lines are down. You are our only hope!</p>
<ul class="actions special">
<li><a href="play" class="button">Play Campaign</a></li>
</ul>
</article> -->
<!--
<article>
<header>
<span class="date">April 22, 2017</span>
<h2><a href="#">Primis eget<br />
imperdiet lorem</a></h2>
</header>
<a href="#" class="image fit"><img src="images/pic03.jpg" alt="" /></a>
<p>Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor
imperdiet dolor mattis sagittis magna etiam.</p>
<ul class="actions special">
<li><a href="#" class="button">Full Story</a></li>
</ul>
</article>
<article>
<header>
<span class="date">April 18, 2017</span>
<h2><a href="#">Ante mattis<br />
interdum dolor</a></h2>
</header>
<a href="#" class="image fit"><img src="images/pic04.jpg" alt="" /></a>
<p>Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor
imperdiet dolor mattis sagittis magna etiam.</p>
<ul class="actions special">
<li><a href="#" class="button">Full Story</a></li>
</ul>
</article>
<article>
<header>
<span class="date">April 14, 2017</span>
<h2><a href="#">Tempus sed<br />
nulla imperdiet</a></h2>
</header>
<a href="#" class="image fit"><img src="images/pic05.jpg" alt="" /></a>
<p>Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor
imperdiet dolor mattis sagittis magna etiam.</p>
<ul class="actions special">
<li><a href="#" class="button">Full Story</a></li>
</ul>
</article>
<article>
<header>
<span class="date">April 11, 2017</span>
<h2><a href="#">Odio magna<br />
sed consectetur</a></h2>
</header>
<a href="#" class="image fit"><img src="images/pic06.jpg" alt="" /></a>
<p>Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor
imperdiet dolor mattis sagittis magna etiam.</p>
<ul class="actions special">
<li><a href="#" class="button">Full Story</a></li>
</ul>
</article>
<article>
<header>
<span class="date">April 7, 2017</span>
<h2><a href="#">Augue lorem<br />
primis vestibulum</a></h2>
</header>
<a href="#" class="image fit"><img src="images/pic07.jpg" alt="" /></a>
<p>Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor
imperdiet dolor mattis sagittis magna etiam.</p>
<ul class="actions special">
<li><a href="#" class="button">Full Story</a></li>
</ul>
</article>
</section> -->
<!-- Footer -->
<!-- <footer>
<div class="pagination">
--<a href="#" class="previous">Prev</a>--
<a href="#" class="page active">1</a>
<a href="#" class="page">2</a>
<a href="#" class="page">3</a>
<span class="extra">…</span>
<a href="#" class="page">8</a>
<a href="#" class="page">9</a>
<a href="#" class="page">10</a>
<a href="#" class="next">Next</a>
</div>
</footer> -->
</div>
<!-- Footer -->
<footer id="footer">
<!-- <section>
<form method="post" action="#">
<div class="fields">
<div class="field">
<label for="name">Name</label>
<input type="text" name="name" id="name" />
</div>
<div class="field">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
</div>
<ul class="actions">
<li><input type="submit" value="MailList.Add()" /></li>
</ul>
</form>
</section> -->
<!-- <section class="split contact">
<section>
<h3>Email</h3>
<p><a href="#">[email protected]</a></p>
</section>
<section>
<h3>Links</h3>
<ul class="icons alt">
<li><a href="https://github.com/bitnaughts" class="icon alt fa-github"><span class="label">GitHub</span></a></li>
<li><a href="https://twitter.com/bitnaughts" class="icon alt fa-twitter"><span class="label">Twitter</span></a></li>
<li><a href="https://codefied.substack.com/" class="icon alt fa-bookmark"><span class="label">Substack</span></a></li>
<li><a href="mailto:[email protected]" class="icon alt fa-envelope"><span class="label">Email</span></a></li>
</ul>
</section>
</section> -->
</footer>
<!-- Copyright -->
<div id="copyright">
<ul>
<li>© 2023 BitNaughts</li>
<li>Design: <a href="https://html5up.net">HTML5 UP</a></li>
</ul>
</div>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>