-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
260 lines (178 loc) · 8.81 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
<!--
BS Nomic Automation System main webpage
Anthony Wilson
2022-4-7
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Nomic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<link rel="stylesheet" type="text/css" href="./global-styles.css">
<link rel="stylesheet" type="text/css" href="./input-styles.css">
<link rel="stylesheet" type="text/css" href="./specific-styles.css">
<meta name="author" content="Anthony Wilson">
<meta name="description" content="Website for Nomic Season 4">
<link rel="icon" type="image/png" href="./Resources/Favicon128x128.png" sizes="128x128">
<meta property="og:title" content="Nomic Season 4">
<meta property="og:type" content="website">
<meta property="og:url" content="https://AnthonyW2.github.io/Nomic">
<meta property="og:image" content="./Resources/OGImage.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="256">
<meta property="og:image:height" content="256">
<meta property="og:description" content="Website for Nomic Season 4">
</head>
<body onload="StartJS()">
<!-- Navigation Bar -->
<div id="nav-bar">
<a id="nav-link-site-logo" class="nav-link" href="./">BS Nomic</a>
<a id="nav-link-rules" class="nav-link" href="./Rules">Rules</a>
<a id="nav-link-players" class="nav-link" href="./Players">Players</a>
<a id="nav-link-docs" class="nav-link" href="./docs.html">
<span id="nav-link-docs-text-1">Documentation</span>
<span id="nav-link-docs-text-2">Docs</span>
</a>
<a id="nav-link-propositions" class="nav-link" href="./Propositions">
<span id="nav-link-propositions-text-1">Propositions</span>
<span id="nav-link-propositions-text-2">Props</span>
</a>
<!--a id="nav-link-world" class="nav-link" href="./World">World</a-->
<input type="text" id="nav-search" placeholder="Search" title="Search for something" onfocus="openSearchMenu()" onfocusout="closeSearchMenu()" onkeyup="updateSearch()">
<div id="search-menu" hidden></div>
<button id="nav-menu-btn" title="Open/Close the overflow menu" onclick="toggleOverflowMenu()" menuopen="false">
<div id="nav-menu-btn-icon">
<div id="nav-menu-btn-icon-bar-1" class="nav-menu-btn-icon-bar"></div>
<div id="nav-menu-btn-icon-bar-2" class="nav-menu-btn-icon-bar"></div>
<div id="nav-menu-btn-icon-bar-3" class="nav-menu-btn-icon-bar"></div>
</div>
</button>
</div>
<!-- Overflow Menu -->
<div id="overflow-menu" hidden>
<div id="settings-color-theme-title" class="overflow-menu-subtitle">Colour Theme:</div>
<select id="settings-color-theme-select" onchange="updateColorTheme()"></select>
<div id="settings-font-theme-title" class="overflow-menu-subtitle">Font Theme:</div>
<select id="settings-font-theme-select" onchange="updateFontTheme()">
<option value="0">Default</option>
<option value="1">Serif</option>
<option value="2">Sans-Serif</option>
<option value="3">Comic Sans</option>
</select>
<!--<a id="settings-link-leave-feedback" class="settings-menu-subtitle inherit-color" href="">Leave Feedback</a>-->
<!--<a id="settings-link-docs" class="settings-menu-subtitle inherit-color" href="">Documentation</a>-->
<!--<a id="settings-link-about" class="settings-menu-subtitle inherit-color" href="">About</a>-->
</div>
<div id="dimmer" onclick="toggleOverflowMenu()" hidden></div>
<!-- Page Content -->
<div class="page-content-container">
<h1>Blue Sheep Nomic Season 4</h1>
<p>
This is the website for a series of Nomic games which goes by the name "Blue Sheep Nomic", or "BS Nomic" for short.<br>
<br>
Season 4 started on February 6th, 2023, and is currently active.<br>
<br>
This site is closely tied into a custom Discord bot - <a href="https://github.com/AnthonyW2/Nomic-Bot">Nomic Bot</a> - built specifically for the varying mechanics of BS Nomic.<br>
</p>
<br>
<h2>Past Seasons</h2>
<p>
During seasons 1 & 2 a Google Docs document was used to track all game information, hence why no information about those seasons exists on this website.<br>
Season 3 was the first season to use a website, which can be found here: <a href="Season%203">BS Nomic Season 3</a>.
</p>
<br>
<p>
<a href="./Propositions" class="heading-link">Propositions</a>
<br>
Number of propositions: <span id="proposition-count">NA</span><br>
Number of active propositions: <span id="active-proposition-count">NA</span><br>
<h3>Active Propositions:</h3>
<div id="active-propositions-container">NA</div>
</p>
<br>
<p>
<a href="./Players" class="heading-link">Players</a>
<br>
<div id="players-list">
Loading players...
</div>
</p>
<br>
<p>
<a href="./Rules" class="heading-link">Rules</a>
<br>
Number of rules: <span id="rule-count">NA</span><br>
Largest global ID: <span id="largest-rule-id">NA</span><br>
<!--Deleted rules: <span id="rule-count">NA</span><br> -->
</p>
<br>
</div>
<script>
const root = ".";
</script>
<script src="./main.js"></script>
<script src="./menu.js"></script>
<script src="./themes.js"></script>
<script src="./search.js"></script>
<script src="./Rules/rule-class.js"></script>
<script>
body.addEventListener("ruleload", e => {
document.getElementById("rule-count").innerHTML = rules.list.length;
document.getElementById("largest-rule-id").innerHTML = rules.list[rules.list.length-1].id;
});
body.addEventListener("playerload", e => {
var playerListElement = document.getElementById("players-list");
playerListElement.innerHTML = "";
for(var p = 0;p < players.length;p ++){
var playerLink = document.createElement("a");
playerLink.href = "./Players/?p="+p;
playerLink.innerHTML = players[p].name;
if(players[p].winner){
playerLink.innerHTML += " 👑";
}
const iconRadius = 14;
var playerIconSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg");
playerIconSVG.classList.add("player-icon-svg");
playerIconSVG.setAttribute("width",iconRadius+4);
playerIconSVG.setAttribute("height",iconRadius+4);
var playerIcon = document.createElementNS("http://www.w3.org/2000/svg", "circle");
playerIcon.classList.add("player-icon-circle");
playerIcon.setAttribute("cx",iconRadius/2 + 2);
playerIcon.setAttribute("cy",iconRadius/2 + 2);
playerIcon.setAttribute("r",iconRadius/2);
playerIcon.setAttribute("fill",players[p].iconcolor);
playerIconSVG.appendChild(playerIcon);
playerLink.appendChild(playerIconSVG);
playerListElement.appendChild(playerLink);
playerListElement.appendChild(document.createElement("br"));
}
populateActivePropositions();
});
body.addEventListener("propositionload", e => {
populateActivePropositions();
});
var populateActivePropositions = () => {
//Check if both the propositions and players lists are available
if(!players || !propositions){
return;
}
document.getElementById("proposition-count").innerHTML = propositions.length;
var activePropContainer = document.getElementById("active-propositions-container");
activePropContainer.innerHTML = "";
var active = 0;
for(var p = 0;p < propositions.length;p ++){
if(!propositions[p].majority){
active ++;
activePropContainer.innerHTML += players[propositions[p].author].name + " - <a href=\"" + propositions[p].link + "\" target=\"_blank\">discord.com</a><br>";
}
}
if(active == 0){
activePropContainer.innerHTML = "NA";
}
document.getElementById("active-proposition-count").innerHTML = active;
}
</script>
</body>
</html>