-
Notifications
You must be signed in to change notification settings - Fork 2
/
home.html
93 lines (88 loc) · 4.41 KB
/
home.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Praesentia</title>
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.6/build/pure-min.css"
integrity="sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5" crossorigin="anonymous">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
<h1>Praesentia</h1>
<p>Simple Python-based web application to allow UGM students to fill their
QR presence list without having another device in hand.</p>
<p>
<small><strong>Important!</strong> Submitting this form will log you out of your SIMASTER mobile
app. Please logout and re-login after using Praesentia.</small>
<form class="pure-form pure-form-stacked">
<fieldset>
<label for="username">UGM ID:</label>
<input type="text" id="username" class="pure-input-1" placeholder="john.doe1998">
<span class="pure-form-message">without "@mail.ugm.ac.id" suffix</span>
<label for="password">Password:</label>
<input type="password" class="pure-input-1" id="password">
<label class="pure-checkbox">
<input type="checkbox" id="hurry">
huRRy! mode <small>(randomize lat/long)</small>
</label>
<div id="coordinateInputs">
<div class="pure-g">
<div class="pure-u-1-2 pure-g">
<label for="latitude">Latitude:</label>
<input type="number" id="latitude" class="pure-u-23-24" placeholder="132.12120">
</div>
<div class="pure-u-1-2 pure-g">
<label for="longitude">Longitude:</label>
<input type="number" id="longitude" class="pure-u-1" placeholder="-118.1021291">
</div>
</div>
<small><button type="button" id="getLocation" class="pure-button pure-button-secondary">Get
location from GPS</button>
</small>
</div>
<div id="qrContainer">
<div id="qrInput">
<label>QR Image:</label>
<input type="file" accept="image/*" id="qrImageFile">
</div>
<label>
<small>
<strong>ProTip!</strong> You can scan your QR code image from your clipboard, just
<kbd>ctrl</kbd>+<kbd>v</kbd>
it here.
</small>
</label>
</div>
<br>
<label><span id="hasQrData">✓</span> QR Data: <code id="qrData">-</code></label><br>
<div class="pure-g">
<div class="pure-u" style="margin-right: 1rem;">
<button type="button" class="pure-button pure-button-primary" id="btnSubmit">Submit</button>
</div>
<div class="pure-u">
<label class="pure-checkbox" for="rememberMe">
<input type="checkbox" id="rememberMe">
Remember me
</label>
</div>
</div>
</fieldset>
</form>
<p>Don't worry, your data will be safe. This app doesn't even have a database.
<br>Still concerned? Just host Praesentia yourself.
It's open source, see it on <a href="https://github.com/ttycelery/praesentia">GitHub</a>.
</p>
<footer>
<small>Praesentia v1.0.0</small>
</footer>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='qr-scanner.umd.min.js') }}"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="{{ url_for('static', filename='praesentia.js') }}"></script>
</body>
</html>