forked from fossasia/open-event-wsgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
424 lines (391 loc) · 15.4 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
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<!DOCTYPE html>
<html>
<head>
<title>Webapp Generator</title>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css">
<link href="css/main.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="js/form.js"></script>
<script src="js/validation.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/socket.io-stream.js"></script>
<style>
.error {
font-weight: normal;
}
/* made changes-1 added from here */
label.error{
color:red;
display:block;
}
ul>label.error{
position: absolute;
}
/* made changes-1 till here */
html {
height: 100%;
}
body {
position: relative;
min-height: 100%;
padding-bottom: 40px;
}
.custom-navbar {
padding: 10px 15px;
border-bottom: 1px solid #bfbfbf;
z-index: -1;
}
.custom-navtitle {
display: inline-block;
margin: 0px;
font-size: 20px;
color: black;
}
h3.custom-navtitle {
position: relative;
}
.custom-menubutton {
position: absolute;
top:0px;
right: 40px;
cursor: pointer;
padding: 10px;
height:50px;
width: 50px;
display: flex;
justify-content: center;
align-items: center;
}
.custom-menubutton:hover {
background-color:#F0EEEE;
}
.custom-menu-cont {
position: relative;
}
.custom-menu-cont.hidden {
display: none;
}
.custom-menu-cont-shown {
display: inline-block;
}
.custom-menu {
min-height: 350px;
width: 327px;
position: absolute;
border: 1px solid #bfbfbf;
border-top: none;
right: 40px;
top: 0px;
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.176);
background-color: white;
padding:28px;
}
.arrow-up {
width: 7px;
height: 7px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 7px solid white;
position: absolute;
right:17px;
top:-7px;
}
.custom-menu-cont {
z-index: 3;
}
.custom-menu-item {
border: 1px solid white;
display: inline-block;
width: 87px;
padding: 10px 0;
text-align: center;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.custom-menu-item a {
color: #737373;
text-decoration: none;
outline: none;
}
.custom-menu-item img {
display: block;
margin: 0 auto 5px auto;
height: auto;
width: auto;
max-height: 50px;
max-width: 60px;
}
.custom-menu-item p {
height:28px;
margin:0px;
}
.custom-menu-item:hover {
border:1px solid #e7e7e7;
}
.custom-menubutton-color {
background-color: #e7e7e7;
}
.custom-icon {
height:50px;
display: flex;
justify-content: center;
align-items: center;
}
#deployment {
position: absolute;
text-align: center;
width: 100%;
padding: 10px;
bottom: 0px;
border-top: 1px solid #bfbfbf;
background-color: #f9f9f9;
}
@media(max-width: 768px){
.custom-navtitle, .custom-menubutton {
font-size: 15px;
}
.custom-arrow {
right: 40px;
}
}
#message {
display: none;
color: green;
}
@media(max-width: 400px){
.custom-menu {
width: 250px;
}
}
</style>
</head>
<body>
<div class="custom-navbar">
<a href='.' class="custom-navtitle">
<strong>Open Event Webapp Generator</strong>
</a>
<div class="custom-menubutton">
<i class="glyphicon glyphicon-th" style="font-size:20px;"></i>
</div>
</div>
<div class="custom-menu-cont hidden">
<div class="custom-menu">
<div class="arrow-up"></div>
<div>
<div class="custom-menu-item">
<a href="http://github.com/fossasia/open-event-webapp" target="_blank">
<div class="custom-icon"><img src="./icons/code.png"></div>
<p class="custom-title">Code</p></a>
</div>
<div class="custom-menu-item">
<a href="http://github.com/fossasia/open-event-webapp/issues" target="_blank">
<div class="custom-icon"><img src="./icons/bug.png"></div>
<p class="custom-title">Bug Report</p></a>
</div>
<div class="custom-menu-item">
<a href="http://blog.fossasia.org" target="_blank">
<div class="custom-icon"><img src="./icons/blog.png"></div>
<p class="custom-title">Blogs</p></a>
</div>
<hr style="margin-bottom: 10px; margin-top: 10px;">
<div class="custom-menu-item">
<a href="https://eventyay.com/" target="_blank">
<div class="custom-icon"><img src="./icons/eventyay.png"></div>
<p class="custom-title">Eventyay</p></a>
</div>
<div class="custom-menu-item">
<a href="https://susper.com/" target="_blank">
<div class="custom-icon"><img src="./icons/susper.png" style="width: 60px;height: 16px;"></div>
<p class="custom-title">Susper</p></a>
</div>
<div class="custom-menu-item">
<a href="https://chat.susi.ai/" target="_blank">
<div class="custom-icon"><img src="./icons/susi.png"></div>
<p class="custom-title">Susi</p></a>
</div>
<div class="custom-menu-item">
<a href="https://fossasia.org/" target="_blank">
<div class="custom-icon"><img src="./icons/fossasia.png"></div>
<p class="custom-title">FOSSASIA</p></a>
</div>
<div class="custom-menu-item">
<a href="https://loklak.org/" target="_blank">
<div class="custom-icon"><img src="./icons/loklak.png"></div>
<p class="custom-title">loklak</p></a>
</div>
<div class="custom-menu-item">
<a href="https://phimp.me/" target="_blank">
<div class="custom-icon"><img src="./icons/phimp.png"></div>
<p class="custom-title">Phimp.me</p></a>
</div>
<div class="custom-menu-item">
<a href="https://pslab.fossasia.org" target="_blank">
<div class="custom-icon"><img src="./icons/Pslab.png"></div>
<p class="custom-title">PS Lab</p></a>
</div>
<hr style="margin: 10px">
<div style="display: flex;justify-content: center;align-items: center; margin: 0 0 -20px 0">
More on <a href="https://labs.fossasia.org/" target="_blank" style="text-decoration: none;color: #737373">labs.fossasia.org</a>
</div>
</div>
</div>
</div>
<div class="container">
<form class="form-group generator_form" enctype="multipart/form-data" id="form" method="post" name="form" role="form">
<div class="form-group col-md-offset-4 col-xs-offset-2 col-xs-8 col-md-4 form-div-board" style="margin-bottom: 0;">
<label for="name">Email</label>
<div class="input-group margin-bottom-sm">
<span class="input-group-addon"><i class="fa fa-envelope-o fa-fw"></i></span>
<input autofocus="" class="form-control" id="email" name="email" required="true" type="email" >
</div>
<br>
<label for="theme">Choose your theme</label>
<select class="form-control" id="theme" name="theme">
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
<br>
<!--<input id="theme" name="theme" type="hidden" value="light">-->
<!--
<label for="name">App's Name</label>
<input type="text" class="form-control" id="name" name="name" required="true">
<br>
-->
<label>Choose Session Style</label>
<!-- changes-2 removed from here -->
<!-- <ul style="list-style-type:none">
<li id="single"><input name="session" required="" type="radio" value="single"> Single</li>
<li id="expandable"><input name="session" type="radio" value="expand"> Expandable</li>
</ul> -->
<!-- changes-2 removed till here -->
<!-- changes-2 added from here -->
<ul style="list-style-type:none; position: relative;">
<li>
<input name="session" required="" type="radio" value="single" id="single">
<label for="single">Single</label>
</li>
<li>
<input name="session" type="radio" value="expand" id="expandable">
<label for="expandable">Expandable</label>
</li>
</ul>
<!-- Map Integration-->
<label>Choose Map Integration</label>
<ul style="list-style-type:none; position: relative;">
<li>
<input id="google" name="map" type="radio" value="googleMap">
<label for="google">Google Map</label>
</li>
<li>
<input id="open_street" name="map" type="radio" value="openStreetMap">
<label for="open_street">Open Street Map</label>
</li>
</ul>
<!-- changes-2 added till here -->
<label>Choose Your Data Source</label>
<ul style="list-style-type:none">
<!--<li><input type="radio" name="datasource" value="mockjson"> Default mock API </input></li>-->
<li id="uploadJSON">
<input name="datasource" id="jsonupload" type="radio" value="jsonupload">
<label for="uploadJSON">Upload your own JSON files</label>
</li>
<li id="endpointAPI">
<input name="datasource" id="eventapi" type="radio" value="eventapi">
<label for="endpointAPI">API Endpoint</label>
</li>
</ul>
<section id="eventapi-input" style="display:none;">
<label style="font-weight: 400;" for="apiendpoint">Link to Open Event API Endpoint</label>
<input class="form-control" id="apiendpoint" name="apiendpoint" required="true" type="url" autocomplete="on">
</section>
<section id="jsonupload-input" style="display:none;">
<label style="font-weight: 400;" for="siofu_input">Zip file containing resources for the event</label>
<input accept="application/zip" class="form-control" id="siofu_input" name="singlefileUpload" required="true" type="file">
<div id="message">
<p>File has been successfully uploaded</p>
</div>
<div hidden="" id="upload-info">
<div class="row">
<div class="col-sm-6 col-xs-7">
<p><strong id="upload-filename"></strong> <small class="text-muted"><span id="upload-filesize"></span></small></p>
</div>
<div class="col-sm-5 col-xs-3 progressbar">
<div class="upload-progress progress">
<div class="progress-bar progress-bar-info" id="upload-progress-bar" role="progressbar" style="width:0%; height: 20px;">
<!-- <span id="upload-progress-val">0%</span> -->
</div>
</div>
</div>
<div class="col-sm-1 col-xs-2" style="padding: 0 10px">
<button aria-label="Close" class="close" data-dismiss="modal" id="cancelUpload" type="button"><span aria-hidden="true">×</span></button>
</div>
</div>
</div>
</section><!--<label title="Wether to download assets into website folder or link to external sources"-->
<!--for="theme">How to link audio/images</label>-->
<!--<select class="form-control" id="assetmode" name="assetmode" style="-webkit-appearance: menulist;">-->
<!--<option title="Download images and audio files into website folder" value="download">Downloaded locally with website</option>-->
<!--<option value="link">Linked to external locations</option>-->
<!--</select>-->
<input name="assetmode" type="hidden" value="download">
<section>
<input id="upload-ftp" title="Upload via FTP" type="checkbox">
<label for="upload-ftp">Upload via FTP</label>
<div id="upload-ftp-details" style="display: none">
<input class="form-control" style="width: 49.2%; display: inline" id="ftp-host" placeholder="host" type="text"> <input class="form-control" style="width: 49.2%; display: inline" id="ftp-port" placeholder="port" type="text"> <input class="form-control" id="ftp-user" placeholder="username" style="width: 49.2%; display: inline" type="text"> <input class="form-control" id="ftp-pass" placeholder="password" style="width: 49.2%; display: inline" type="password"> <input class="form-control" id="ftp-path" placeholder="/path/to/deploy/folder" type="text">
</div>
</section>
<section>
<input id="enable-google-analytics" title="Enable Google Analytics" type="checkbox">
<label for="enable-google-analytics">Enable Google Analytics</label>
<div id="ganalytics-id-container" style="display: none">
<input class="form-control" style="width: 49.2%; display: inline" id="ganalytics-id" placeholder="Google Analytics ID" type="text">
</div>
</section>
<section>
<input id="enable-google-calendar" title="Enable Google Calendar" type="checkbox"> <label for="enable-google-calendar">Enable Google Calendar</label>
<div id="gcalendar-id-container" style="display: none">
<input class="form-control" style="width: 100%; display: inline" id="gcalendar-key" placeholder="Google Calendar API Key" type="text">
<input class="form-control" style="width: 100%; display: inline; margin-top: 5px" id="gcalendar-id" placeholder="Google Calendar Client ID" type="text">
</div>
</section>
<section>
<div class="generator-progress progress" style="display:none;">
<div class="progress-bar" id="generator-progress-bar" role="progressbar" style="width:0%; height: 20px;">
<span id="generator-progress-val">0%</span>
</div>
</div>
</section>
<center>
<div id="status" style="margin-bottom:10px;"></div><a id="aLog" style="cursor:pointer;">-Logs-</a>
<pre id="buildLog" style="display:none;">
</pre><br>
<button class="download btn btn-default" id="btnGenerate" style="margin-top:7px" title="Upload zip or use API mode to enable" type="button" value="Validate">GENERATE WEBAPP</button> <button class="download btn btn-default" id="btnLive" type="button">PREVIEW</button> <button class="download btn btn-default" id="btnDownload" type="button">DOWNLOAD</button> <a class="btn btn-default" id="deploy" style="display:none">DEPLOY</a>
</center>
</div>
</form>
</div>
<div id="deployment">
<span> <strong>Version: </strong></span>
<span> <a id="deploy-link"> </a> </span>
</div>
</body>
<script>
$(document).ready(function() {
const urlParams = new URLSearchParams(window.location.search);
const email = urlParams.get('email');
const apiendpoint = urlParams.get('api');
if (email && apiendpoint) {
$('#email').val(email);
$('#apiendpoint').val(apiendpoint);
$('#btnGenerate').trigger('click');
}
});
</script>
</html>