-
Notifications
You must be signed in to change notification settings - Fork 0
/
confirmParticipation.html
210 lines (173 loc) · 7.49 KB
/
confirmParticipation.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Saliya Bandara" link-url="" />
<meta name="description"
content="The IEEE student branch of UCSC proudly celebrates IEEE Day' 22 by stepping into the future iteration of the internet with the highlighted theme “Metaverse”.">
<meta name="keywords" content="Hackathon, Competition, University, Mobile App, Application">
<meta name="image" content="https://saliya.ml/ucscieee/assets/img/slider/ieeeday.jpg">
<!-- Schema.org for Google -->
<meta itemprop="name" content="IEEE Day' 22">
<meta itemprop="description"
content="The IEEE student branch of UCSC proudly celebrates IEEE Day' 22 by stepping into the future iteration of the internet with the highlighted theme “Metaverse”.">
<meta itemprop="image" content="https://saliya.ml/ucscieee/assets/img/slider/ieeeday.jpg">
<!-- Twitter -->
<meta name="twitter:site" content="">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="IEEE Day' 22">
<meta name="twitter:description"
content="The IEEE student branch of UCSC proudly celebrates IEEE Day' 22 by stepping into the future iteration of the internet with the highlighted theme “Metaverse”.">
<meta name="twitter:image:src" content="https://saliya.ml/ucscieee/assets/img/slider/ieeeday.jpg">
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="IEEE Day' 22">
<meta name="og:description"
content="The IEEE student branch of UCSC proudly celebrates IEEE Day' 22 by stepping into the future iteration of the internet with the highlighted theme “Metaverse”.">
<meta name="og:image" content="https://saliya.ml/ucscieee/assets/img/slider/ieeeday.jpg">
<meta name="og:url" content="https://ieeeday.ucscieee.com/">
<meta name="og:site_name" content="IEEE Day' 22">
<meta name="fb:app_id" content="">
<meta name="og:type" content="website">
<link rel="icon" href="./assets/img/favicon.ico?ver=1.03">
<link rel="stylesheet" href="./assets/css/normalize.css">
<link rel="stylesheet" href="./assets/css/common.css?ver=1.21">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<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=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
<title>IEEE Day' 22</title>
</head>
<body>
<style>
.main {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.main .mainInner {
width: 50vh;
text-align: center;
padding: 1rem;
/* border-radius: 5px;
border: 1px solid #ccc; */
}
.main .mainInner .title {
font-size: 2.5vw;
padding-bottom: 1.2rem;
}
.main .mainInner i {
font-size: 20vw;
}
.main .mainInner .false i {
color: red;
}
.main .mainInner .true i {
color: green;
}
@media (orientation: portrait) {
.main .mainInner {
width: 80vh;
padding: 2rem;
}
.main .mainInner .title {
font-size: 2rem;
}
.main .mainInner i {
font-size: 40vw;
}
}
</style>
<div class="main">
<div class="mainInner">
<div class="confirm true" style="display: none;">
<div class="title">Thank You. Your participation status has been saved</div>
<div class="icon">
<!-- <box-icon color="green" name='check-circle' size='lg' animation='tada'></box-icon> -->
<i class='bx bx-check-circle bx-tada'></i>
</div>
</div>
<div class="confirm false" style="display: none;">
<div class="title">Something Went Wrong. Please try again later</div>
<div class="icon">
<i class='bx bx-error-circle bx-tada'></i>
</div>
</div>
<div class="confirm error" style="display: none;"></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>
<script>
function getUrlParams() {
var params = {};
window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (str, key, value) {
params[key] = value;
});
return params;
}
function alertUser(type, desc) {
var $div = $("<div>", {
class: "custom-alert " + type + "-alert"
});
$div.append("<div class='alert-text'>" + desc + "</div\>")
var count = $(".custom-alert").length;
$(".custom-alert").fadeOut(function () {
$(this).remove();
});
$div.hide().delay(count * 200).appendTo("body").fadeIn(function () {
setTimeout(function () {
$div.fadeOut(function () {
$div.remove();
});
}, 3000);
});
}
// document ready
$(document).ready(function () {
// get url params userId and confirmation
var params = getUrlParams();
var userId = params.userId;
var confirmation = params.confirmation;
console.log(confirmation, userId);
// set get prams to confirmParticipation
var url = `https://saliya.ml/ieeeday/confirmParticipation?userId=${userId}&confirmation=${confirmation}`;
$.ajax({
// url: './ieeeday/',
url: url,
type: 'post',
crossDomain: true,
data: {
},
dataType: 'json',
success: function (response) {
if (response['status'] == 200) {
alertUser("success", response['desc']);
$('.confirm.true').show();
setTimeout(function () {
// $('.registrationDiv .closeBtn').click();
// history.go(-1);
// window.close();
window.location.replace("https://ieeeday.ucscieee.com/");
}, 3000);
} else if (response['status'] == 403) {
// show .confirm.true div
$('.confirm.false').show();
}
else {
$('.confirm.false').show();
alertUser("warning", response['desc'])
}
},
error: function (ajaxContext) {
$('.confirm.false').show();
alertUser("danger", "Something Went Wrong")
}
});
});
</script>
</body>
</html>