-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
297 lines (288 loc) · 12.8 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
<!doctype html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-S40TBM524R"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-S40TBM524R");
</script>
<!-- Hotjar Tracking Code for https://teambalancing.com/ -->
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 3704613, hjsv: 6 };
a = o.getElementsByTagName("head")[0];
r = o.createElement("script");
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, "https://static.hotjar.com/c/hotjar-", ".js?sv=");
</script>
<script
data-name="BMC-Widget"
data-cfasync="false"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="alexjurik"
data-description="Support me on Buy me a coffee!"
data-message="Thanks for your support. I will try my best to make this mini product better."
data-color="#5F7FFF"
data-position="Right"
data-x_margin="18"
data-y_margin="72"
></script>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta
name="description"
content="Are you tired of random team generators? This is the one that could help you create balanced teams."
/>
<meta
name="keywords"
content="team,teams,generator,generate,balance,balanced,sport,football,basketball,voleyball,random team generator,
random teams generator,random team creator,random generator for teams,random group maker,team generator,
team balancing,team balancing app,team balancing online,team balancing online free,team balancing generator,
randomizer for teams,random team picker,random team generator online,random team generator,random team,генератор,
генератор команд,генератор команд онлайн,генератор команд онлайн безплатно,баланс команд,баланс команд онлайн
"
/>
<meta name="author" content="Alexander Jurik" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#CFE2FF" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#031633" />
<title>Team Balancing App</title>
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4976619542933106"
crossorigin="anonymous"
></script>
</head>
<body style="padding-top: 5rem; padding-bottom: 5rem">
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark border-bottom border-body">
<div class="container-fluid">
<a class="navbar-brand" href="#">Team balancer</a>
<div class="d-flex align-items-center">
<a
class="nav-item me-2"
target="_blank"
href="https://github.com/AlexJurik/team-generator"
aria-label="Open project's Github directory"
>
<i role="button" class="bi bi-github" style="color: #fff" aria-label="Open project's Github directory"></i>
</a>
<div class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
style="color: #fff"
href="#"
id="themeDropdown"
data-bs-toggle="dropdown"
aria-expanded="false"
aria-label="Open theme dropdown"
>
<i class="bi bi-gear" style="color: #fff"></i>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="themeDropdown">
<li>
<a class="dropdown-item" href="#" id="darkModeBtn" area-label="Dark theme">Dark mode</a>
</li>
<li>
<a class="dropdown-item" href="#" id="lightModeBtn" area-label="Light theme">Light mode</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
<main role="main" class="container">
<div class="row">
<div class="accordion" id="steps">
<!-- PLAYERS -->
<div class="accordion-item">
<h2 class="accordion-header">
<button
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#playersSelectStep"
aria-expanded="true"
aria-controls="playersSelectStep"
aria-label="#1 Enter team players"
>
#1 Enter team players
</button>
</h2>
<div id="playersSelectStep" class="accordion-collapse collapse show" data-bs-parent="#steps">
<div class="accordion-body">
<input accept=".xlsx" class="form-control" id="excelFileInput" type="file" style="display: none" />
<div class="alert alert-primary d-flex justify-content-between align-items-center" role="alert">
<div>
<i class="bi bi-info-circle-fill"></i>
<span class="ms-2"
>You can enter players manually or import an Excel file filled out according to a sample.</span
>
</div>
</div>
<div class="d-flex justify-content-end mb-3 gap-3">
<button class="btn btn-outline-primary" id="importExcelTriggerBtn" aria-label="Import">
Import <i class="bi bi-upload ms-2"></i>
</button>
<button class="btn btn-outline-secondary" id="showExampleBtn" aria-label="Show sample">
<span id="showExampleBtnTitle">Show sample</span> <i class="bi bi-table ms-2"></i>
</button>
<button class="btn btn-outline-danger" id="resetBtn" aria-label="Reset">
Reset <i class="bi bi-arrow-repeat ms-2"></i>
</button>
</div>
<div class="row mt-3 mb-3" id="excelSample" style="display: none">
<div class="col-12">
<iframe
src="https://onedrive.live.com/embed?resid=FB9B48A050419EA7%2123918&authkey=!AHvIm76IalSMafw&em=2&wdAllowInteractivity=False&ActiveCell='Sheet1'!A1&wdHideHeaders=True&wdDownloadButton=True&wdInConfigurator=True&wdInConfigurator=True"
style="width: 100%; height: 500px"
frameborder="0"
scrolling="no"
title="PlayersExcelSample"
></iframe>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th scope="col"><input type="checkbox" id="selectAllPlayersCheckbox" /></th>
<th scope="col">Name</th>
<th scope="col">Category</th>
<th scope="col">Goalkeeper</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody id="playersTableBody" class="table-group-divider">
<tr>
<form id="addPlayerForm" class="needs-validation">
<td></td>
<td>
<input
name="name"
required
class="form-control"
type="text"
placeholder="Type name*"
autocomplete="name"
/>
</td>
<td>
<input
id="coefficientInput"
name="coefficient"
required
class="form-control"
type="number"
placeholder="Type player category*"
/>
</td>
<td>
<input
name="goalkeeper"
class="form-control"
type="number"
placeholder="Type goalkeeper category"
/>
</td>
<td>
<button class="btn btn-primary" type="submit" aria-label="Add row">
<i class="bi bi-plus"></i>
</button>
</td>
</form>
</tr>
</tbody>
</table>
</div>
<b>TOTAL:</b> <span id="totalPlayers">0</span>
<div class="d-grid">
<button class="btn btn-primary mt-3" id="nextStepBtn" type="button" aria-label="Next">Next</button>
</div>
</div>
</div>
</div>
<!-- AMOUNT -->
<div class="accordion-item">
<h2 class="accordion-header">
<button
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#amountOfTeamsStep"
aria-expanded="false"
aria-controls="amountOfTeamsStep"
aria-label="#2 Enter amount of teams"
>
#2 Enter amount of teams
</button>
</h2>
<div id="amountOfTeamsStep" class="accordion-collapse collapse" data-bs-parent="#steps">
<div class="accordion-body">
<div class="alert alert-primary" role="alert">
<i class="bi bi-info-circle-fill"></i
><span class="ms-2"
>Type amount of teams you want to generate and proceed to the result by clicking Generate
button</span
>
</div>
<div class="mb-3">
<label for="amountOfTeamsInput" class="form-label">Amount of teams</label>
<input type="number" class="form-control" id="amountOfTeamsInput" placeholder="3" value="3" />
<div class="d-grid">
<button
class="btn btn-primary mt-3"
id="generateTeamsBtn"
type="submit"
aria-label="Generate teams"
>
Generate Teams
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="d-flex d-none mt-5" id="teamResultTitle">
<h2>Result</h2>
<button class="btn btn-secondary ms-3" id="randomizeBtn" type="button" aria-label="Randomize">
Randomize <i class="bi bi-shuffle"></i>
</button>
</div>
<div id="teamResultContainerDiv"></div>
</main>
<footer class="navbar navbar-dark bg-dark fixed-bottom border-top border-body">
<div class="container-fluid">
<span class="navbar-text"
>©2023 <a target="_blank" href="https://bento.me/alex-jurik">Alexander Jurik</a></span
>
<a href="https://github.com/AlexJurik/team-generator/blob/main/CHANGELOG.md" target="_blank" class="navbar-text"
>Version: 2.0.1</a
>
<span class="navbar-text"><a href="mailto:[email protected]">Contact</a></span>
</div>
</footer>
<script type="module" src="js/init.js"></script>
<script type="module" src="js/players-section.js"></script>
<script type="module" src="js/result-section.js"></script>
<script type="module" src="js/theme.js"></script>
<script type="module" src="js/handlers.js"></script>
</body>
</html>