-
Notifications
You must be signed in to change notification settings - Fork 1
/
registration.html
225 lines (193 loc) · 7.47 KB
/
registration.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hackathon Registration</title>
<style>
a{
color: black;
border: none;
border-radius: 10px;
cursor: pointer;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: Arial, sans-serif;
background-color: #004c6d;
transition: opacity 0.5s ease; /* Transition for fade effect */
background: linear-gradient(to bottom, #0d1a26, #092a3b); /* Dark gradient background */
}
.fade-out {
opacity: 0; /* Fade-out effect */
}
.form-container {
background-color: #fff;
border: 2px solid #ddd;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 400px;
text-align: center;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #ffeb3b; /* Bright yellow for labels */
font-weight: bold;
}
.form-group input,
.form-group select {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
}
.submit-btn {
background-color: #ffeb3b;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.submit-btn:hover {
background-color: #ffeb3b;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: Arial, sans-serif;
background-color: #004c6d;
transition: opacity 0.5s ease; /* Transition for fade effect */
background: linear-gradient(to bottom, #0d1a26, #092a3b); /* Dark gradient background */
}
.fade-out {
opacity: 0; /* Fade-out effect */
}
.form-container {
background-color: #004c6d;
border: 2px solid #004c6d;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 400px;
text-align: center;
}
.form-container h2 {
margin-bottom: 15px;
color: #ffeb3b;
}
.form-group {
margin-bottom: 15px;
text-align: left;
}
.form-group label {
display: block;
margin-bottom: 5px;
}
.form-group input,
.form-group select {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 5px;
}
.submit-btn {
background-color: #ffeb3b;
color: black;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.submit-btn:hover {
background-color: #ffeb3b;
}
</style>
</head>
<body>
<div class="form-container" id="formContainer">
<h2>Hackathon Registration</h2>
<form id="registrationForm">
<div class="form-group">
<label for="name">Full Name</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-group">
<label for="email">Email Address</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" required>
</div>
<div class="form-group">
<label for="institute">Institute</label>
<select id="institute" name="institute" required>
<option value="Osmania University Hyderabad">Osmania University Hyderabad</option>
<option value="JNTU Hyderabad">JNTU Hyderabad</option>
<option value="CBIT Hyderabad Gandipet Telangana">CBIT Hyderabad Gandipet Telangana</option>
<option value="Vasavi Hyderabad">Vasavi Hyderabad</option>
<option value="VNR">VNR</option>
<option value="BVRIT">BVRIT</option>
<option value="Gokaraju Rangaraju">Gokaraju Rangaraju</option>
<option value="GNIT">GNIT</option>
<option value="VBIT">VBIT</option>
<option value="CMR">CMR</option>
<option value="Aeronautical Engineering College">Aeronautical Engineering College</option>
</select>
</div>
<div class="form-group">
<label for="team">Team Name</label>
<input type="text" id="team" name="team" required>
</div>
<div class="form-group">
<label for="role">Role in Team</label>
<select id="role" name="role" required>
<option value="leader">Team Leader</option>
<option value="member">Team Member</option>
</select>
</div>
<a href="payment.html" >Pay Registration fee</a>
<button type="button" class="submit-btn" onclick="submitForm()">Register</button>
</form>
</div>
<script>
const teams = JSON.parse(localStorage.getItem('teams') || '{}');
function submitForm() {
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const phone = document.getElementById('phone').value;
const institute = document.getElementById('institute').value;
const team = document.getElementById('team').value;
const role = document.getElementById('role').value;
if (!teams[team]) teams[team] = { leader: null, members: [] };
if (teams[team].members.length + (teams[team].leader ? 1 : 0) >= 5) {
alert(`The team "${team}" already has 5 members.`);
return;
}
if (role === 'leader') {
if (teams[team].leader) {
alert(`The team "${team}" already has a leader.`);
return;
}
teams[team].leader = { name, email, phone, institute };
} else {
teams[team].members.push({ name, email, phone, institute });
}
localStorage.setItem('teams', JSON.stringify(teams));
// Fade out effect before navigation
document.body.classList.add('fade-out');
setTimeout(() => {
window.location.href = 'team-details.html?team=' + encodeURIComponent(team);
}, 500); // Delay the navigation for the fade-out effect
}
</script>
</body>
</html>