-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (68 loc) · 2.83 KB
/
Copy pathindex.html
File metadata and controls
81 lines (68 loc) · 2.83 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="static/css/styles.css">
<title>ScriptGuesser – Main Menu</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-4.0.0.js" integrity="sha256-9fsHeVnKBvqh3FB2HYu7g2xseAZ5MlN6Kz/qnkASV8U=" crossorigin="anonymous"></script>
<script src="static/js/script_utils.js"></script>
<div class="container-fluid bg-dark min-vh-100 min-vw-100 d-flex flex-column text-white">
<nav class="navbar bg-primary navbar-dark fixed-top">
<div class="container-fluid flex-nowrap">
<ul class="navbar-nav flex-row gap-3">
<li class="nav-item">
<a class="nav-link active" href="index.html">Main Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="play.html">Play</a>
</li>
<li class="nav-item">
<a class="nav-link" href="learn.html">Learn</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">About</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="about/qa.html">Q&A</a></li>
<li><a class="dropdown-item" href="about/documentation.html">Documentation</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div class="row align-items-center justify-content-center text-center flex-grow-1">
<div class="col">
<h1 id="welcome-label" class="display-3 p-5">Welcome to ScriptGuesser!</h1>
<a id="play-button" class="btn btn-outline-success btn-lg" style="width: 300px;" href="play.html">PLAY</a>
</div>
</div>
</div>
<script>
const timer = ms => new Promise(res => setTimeout(res, ms))
var translateCache = {}
async function loopPlayButton() {
var showInlatin = true;
while (true) {
var label = "Welcome";
if (!showInlatin) {
var randomScript = Object.keys(allScripts)[Math.floor(Math.random() * Object.keys(allScripts).length)];
if (randomScript in translateCache) {
label = translateCache[randomScript];
} else {
label = translateSentence(allScripts[randomScript].code, "Welcome");
translateCache[randomScript] = label;
}
}
showInlatin = !showInlatin;
$("#welcome-label")[0].textContent = label + " to ScriptGuesser!";
await timer(2000);
}
}
loopPlayButton();
</script>
</body>
</html>