-
Notifications
You must be signed in to change notification settings - Fork 2
/
create.html
322 lines (288 loc) · 10.6 KB
/
create.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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html>
<head>
<style>
* {
margin: 0;
box-sizing: border-box;
}
body {
background: #EEE;
font-family: 'Archivo', sans-serif;
color: #000;
}
.column {
display: flex;
flex-direction: column;
justify-content: space-around;
}
.row {
display: flex;
flex-direction: row;
justify-content: space-around;
}
.space-row {
display: flex;
flex-flow: row wrap;
justify-content: space-evenly;
}
.center-row {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
}
.header {
background-color: #00519E;
color: #fff;
font-size: 24pt;
margin: 0pt;
padding: 15pt 5pt;
font-family: "Calibri";
}
.input {
color: black;
font-size: 14pt;
width: 100%;
font-family: "Calibri";
height: 30px;
}
.plain-text {
color: black;
font-size: 24pt;
font-family: "Calibri";
text-align: center;
width: fit-content;
border-radius: 5px;
padding: 5px;
}
.settings-text {
color: black;
font-size: 24pt;
font-family: "Calibri";
}
.confirmation-button {
margin: 10pt 0;
background-color: #14AD54;
font-size: 24pt;
font-weight: bold;
cursor: pointer;
}
.dropdown {
margin-left: 20pt;
align-items: center;
align-self: center;
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropbtn {
background-color: #FFF;
width: 200px;
height: 20px;
font-size: 16px;
border: none;
cursor: pointer;
}
.option {
font-family: "Calibri";
font-size: 20pt;
}
.dropdown-content a:hover {
background-color: #ddd;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: darkgrey;
}
.button {
font-size: 24pt;
border: 2px solid #00519E;
padding-left: 10pt;
padding-right: 10pt;
margin: 10pt 0;
width: 50pt;
cursor: pointer;
}
.footer {
justify-content: space-around;
display: flex;
position: fixed;
left: 0;
bottom: 0;
height: 6%;
width: 100%;
background-color: #00519E;
color: white;
align-content: center;
}
.help-button {
align-self: center;
font-size: 16pt;
border-radius: 5px;
cursor: pointer;
padding: 5px;
}
.modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
overflow: auto;
transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
}
.modal-content {
margin: 15% auto;
padding: 20px;
width: 80%;
border: 1px solid #888;
background-color: white;
border-radius: 15px;
color: black;
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
.show-modal {
opacity: 1;
visibility: visible;
transform: scale(1.0);
transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
}
</style>
<script>
</script>
</head>
<body>
<div class="column">
<h1 class="header">Groepenzoeker</h1>
<div class="row">
<div class="column"
style="border: 1px solid #000; width: 33.3%; align-items: center; height: 70px; cursor: pointer;"
onclick="location.href='profile.html';">
<p class="plain-text" style="font-weight: bold;">My Profile</p>
</div>
<div class="column"
style="border: 1px solid #000; width: 33.3%; align-items: center; height: 70px; cursor: pointer;"
onclick="location.href='finder.html';">
<p class="plain-text" style="font-weight: bold;">Finder</p>
</div>
<div class="column"
style="border: 1px solid #000; width: 33.3%; align-items: center; height: 70px; cursor: pointer;"
onclick="location.href='groups.html';">
<p class="plain-text" style="font-weight: bold; background-color: #14AD54;">My Groups</p>
</div>
</div>
<div class="row">
<div class="column" style="width:50%; margin: 0pt 60pt">
<button class="button" onclick="location.href='groups.html'">←</button>
<p class="settings-text" style="font-weight: bold;">Create Group:</p>
<p class="settings-text">Name:</p>
<input class="input" type="text" id="g_name">
<p class="settings-text">Categories:</p>
<div class="dropdown">
<button class="dropbtn">...</button>
<div class="dropdown-content">
<select multiple>
<option class="option">Computer Science</option>
<option class="option">Math</option>
<option class="option">Biology</option>
<option class="option">Chemistry</option>
<option class="option">Law</option>
<option class="option">Engineering</option>
<option class="option">...</option>
</select>
</div>
</div>
<p class="settings-text">Member limit:</p>
<input class="input" type="number" id="m_limit">
<p class="settings-text">Looking for members:</p>
<input class="input" type="checkbox" id="looking" style="width: 20px; height:20px; margin-left: 20pt">
<button class="confirmation-button" onclick="doSave()">Create group</button>
</div>
<div class="column" style="width:50%; margin: 0pt 60pt">
<p class="settings-text" style="margin-bottom: 0px;">Member list:</p>
<div class="row" style="border: 1px solid #000; height:90%; margin-right: 10pt"></div>
<button class="confirmation-button" style="margin-top: 50px; align-self:center;">Add members</button>
</div>
</div>
<div class="footer">
<button class="help-button">Help</button>
<button class="help-button" onclick="location.href='index.html';">Log Out</button>
<div class="modal">
<div class="modal-content">
<span class="close">×</span>
<p class="settings-text" style="font-size: 18pt">
<span style="font-weight: bold">Group creation helpdesk:</span>
<br>Welcome to the group creation menu. Here you can create the group of your dreams and set the
settings to your liking.
<br><span style="font-weight: bold">Name:</span>
<br>Here you can choose any name that you would like your group to have
<br><span style="font-weight: bold">Categories:</span>
<br>Choose from multiple categories you want your group to be associated with.
<br>To make more than one selection hold <span style="font-weight: bold">CTRL</span> while
making
your selections.
<br><span style="font-weight: bold">Member limit:</span>
<br>Set the maximum amount of members for your group. Has to be a number.
<br><span style="font-weight: bold">Looking for members:</span>
<br>Mark the tickbox if you are looking for members and want your group to be visible in the
groupfinder.
<br><span style="font-weight: bold">Add members:</span>
<br>Open a menu with a list of people you know that you can add to your group on creation or
even
after in the settings.
</p>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
nameInput = document.getElementById('g_name');
function doSave() {
if (nameInput.value.length > 0) {
var currentValue = JSON.parse(localStorage.getItem("HCIGroups"));
if (!currentValue)
currentValue = [];
currentValue.push(nameInput.value);
localStorage.setItem("HCIGroups", JSON.stringify(currentValue));
var admins = JSON.parse(localStorage.getItem("HCIAdmin"));
if (!admins)
admins = [];
admins.push(nameInput.value);
localStorage.setItem("HCIAdmin", JSON.stringify(admins));
window.location.href = "chat.html?Title=" + nameInput.value + "&Icon=emoji_food_beverage";
} else {
alert("Please enter a name at least one character long");
}
}
function toggleModal() {
document.querySelector(".modal").classList.toggle("show-modal");
}
document.querySelector(".help-button").addEventListener("click", toggleModal);
document.querySelector(".close").addEventListener("click", toggleModal);
document.querySelector(".modal").addEventListener("click", toggleModal);
</script>