-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
120 lines (114 loc) · 4.67 KB
/
index.html
File metadata and controls
120 lines (114 loc) · 4.67 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lineup Genie</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Heebo&family=Lato:wght@300;400&family=Roboto+Slab:wght@300;400&display=swap"
rel="stylesheet">
</head>
<body>
<header>
<h1>Manage Team</h1>
</header>
<div id="datasetValidation"></div>
<br>
<div id="buttonFieldTop">
<button id="addPlayerBtn">Add Player</button>
<button id="defaultData">Load Default Team Data</button>
</div>
<div id="contentRow1">
<div id="managePlayersDiv"></div>
<div class="textBlob">
<h3>Constraints</h3>
<ul>
<li>Active roster must be at least 9 players.</li>
<li>All lineups <span class='bold'>must</span> have an assigned catcher or a utility player.</li>
<li>A 9-man lineup requires either one C or Util in Pos 1, and RCF must be omitted.</li>
<li>For lineups of 10 or more, each position except C, Util and DH must be assigned in Pos 1 <span
class='bold'>once</span>.
<br>Any remaining players must be C (1 max), DH or Util:
<ul>
<li>10-man: up to 1 Util</li>
<li>11-man: up to 2 Utils</li>
<li>12-man: up to 3 Utils</li>
<li>13 or more: up to 4 Utils</li>
</ul>
</li>
<li>Any roster with C assigned and no Utils will generate an empty sparse table.</li>
</ul>
</div>
</div>
<br>
<div id="buttonFieldBottom">
<button id="generateLineupBtn">Generate Lineup</button>
<span id="errorDialog">Lineup error. Check constraints</span>
</div>
<br><br>
<div id="contentRow2">
<div id="manageInactiveDiv">
<table id="inactiveTable">
<tr>
<th colspan="2">Inactive</th>
</tr>
<tr>
<th>Player</th>
<th>Activate</th>
</tr>
<tbody id="inactiveTBody"></tbody>
</table>
</div>
</div>
<div id="editModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2>Edit Player</h2>
<hr>
<div id="editName">
<label class="nameLabel" for="editFName">First Name</label>
<input type="text" id="editFName">
<label class="nameLabel" for="editLName">Last Name</label>
<input type="text" id="editLName">
</div>
<div id="editSkills"></div>
<button id="editSaveBtn" class="modalButton">Save</button>
<button id="deletePlayerBtn" class="modalButton">Delete Player</button><br>
<span id="editErrorText" class="error-message" style="display: none;"></span>
</div>
</div>
<div id="addModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2>Add Player</h2>
<hr>
<div id="addName">
<label class="nameLabel" for="addFName">First Name</label>
<input type="text" id="addFName" placeholder="First Name" required>
<label class="nameLabel" for="addLName">Last Name</label>
<input type="text" id="addLName" placeholder="Last Name" required>
</div>
<div id="addPosDiv">
<label class="pos1Label" for="addPosDiv">Main Position</label>
</div>
<div id="addSkills"></div>
<div id="addSaveDiv">
<button id="addSaveBtn" class="modalButton">Save Player</button>
<span id="addErrorText" class="error-message" style="display: none;"></span>
</div>
</div>
</div>
<footer>
<p>© 2023 Andrew Kane</p>
<p>Background photo by <a
href="https://unsplash.com/@franciscomorales?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Jose
Francisco Morales</a> on <a
href="https://unsplash.com/photos/hKzmPs8Axh8?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
</p>
</footer>
<script src="manage.js" type="module"></script>
</body>
</html>