-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.html
78 lines (68 loc) · 3.11 KB
/
commands.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
<!doctype html>
<html lang="en-us" class="has-background-dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Europa - Commands</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel = "stylesheet" type = "text/css" href = "styles.css"/>
<link rel="icon" href="images/SummerEuropaPFPSmall.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(() => $("#nav-bar").load("nav.html"))
$.get(
"https://opensheet.elk.sh/1H5oCUOvKSN5AAo_tQvr7ElhDIJxhuYVpaJCbbyFeA0E/Commands",
commands => {
commands.sort((a,b) => (a.description > b.description) ? 1 : -1)
commands.forEach(command => {
const commandType = command.type.includes('game') ? 'game' : 'regular'
if (command.type.includes('moderator')) command.name += '\u2800<span class="tag is-warning is-rounded">Mod Command</span>'
if (command.type.includes('context')) command.name += '\u2800<span class="tag is-link is-rounded">Context Command</span>'
document.getElementById(`${commandType}-commands`).innerHTML += `<tr><td>${command.name}</td><td>${command.description}</td></tr>`
})
}
)
function showGameCommands() {
document.getElementById('menu-game-commands').setAttribute('class', 'is-active')
document.getElementById('menu-regular-commands').setAttribute('class', 'is-inactive')
document.getElementById('game-commands').style.display = 'contents'
document.getElementById('regular-commands').style.display = 'none'
}
function showRegCommands() {
document.getElementById('menu-game-commands').setAttribute('class', 'is-inactive')
document.getElementById('menu-regular-commands').setAttribute('class', 'is-active')
document.getElementById('game-commands').style.display = 'none'
document.getElementById('regular-commands').style.display = 'contents'
}
</script>
</head>
<body>
<div id="nav-bar"></div>
<div class="container">
<h1 class="title is-2 has-text-light">Commands<hr></h1>
<div class="tabs is-toggle is-fullwidth is-medium" style="margin-bottom: 0.5rem;">
<ul>
<li id="menu-game-commands" class="is-active"><a onclick="showGameCommands()">Game Commands</a></li>
<li id="menu-regular-commands"><a onclick="showRegCommands()">Regular Commands</a></li>
</ul>
</div>
<table class="table is-fullwidth">
<thead>
<tr>
<th style="width:30%">Command</th>
<th>Description</th>
</tr>
</thead>
<tbody id="game-commands" style="display:contents"></tbody>
<tbody id="regular-commands" style="display: none;"></tbody>
</table>
</div>
<footer class="footer has-background-dark">
<div class="content has-text-centered has-text-white">
<p id="contact">
Got a concern, suggestion, or request? Join the <a class="has-text-link" href="https://discordapp.com/invite/YtwzVSp">Europa Support Server</a>.
</p>
</div>
</footer>
</body>
</html>