-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
98 lines (94 loc) · 4.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Driver Log Generator</title>
<link rel="stylesheet" href="site/css/bootstrap.min.css">
<link rel="stylesheet" href="site/css/site.css">
</head>
<body>
<div class="col-xl-10 col-lg-11 mx-auto p-4 py-md-5">
<header class="d-flex align-items-center pb-3 mb-md-5 mb-4 border-bottom">
<span class="fs-4">Driver Log Generator</span>
</header>
<main>
<div class="row gx-5">
<div class="col-xl-4 col-lg-5 col-md-6 col-sm-8 mb-lg-0 mb-4">
<form>
<h3 class="mb-3">Setup</h3>
<div class="row mb-4 pb-lg-5 pb-4 border-bottom">
<div class="col-sm-6 mb-sm-0 mb-3">
<label class="form-label">Start status</label>
<select class="form-select" id="slctStartStatus">
<option value="1">Off-duty</option>
<option value="2">Sleeper berth</option>
<option value="3">Driving</option>
<option value="4">On-duty</option>
</select>
</div>
<div class="col-sm-6 mb-sm-0 mb-3">
<label class="form-label">Date</label>
<input type="date" max="" class="form-control" id="inLogDate">
</div>
</div>
<h3 class="mb-3">Event</h3>
<div class="row mb-3">
<div class="col-sm-6 mb-sm-0 mb-3">
<label class="form-label">Status</label>
<select class="form-select" id="slctLogStatus">
<option value="1">Off-duty</option>
<option value="2">Sleeper berth</option>
<option value="3">Driving</option>
<option value="4">On-duty</option>
</select>
</div>
<div class="col-sm-6 mb-sm-0 mb-3">
<label class="form-label">Time</label>
<input type="time" class="form-control" id="inLogTime">
</div>
</div>
<button type="button" class="btn btn-primary" disabled id="btnAdd">Add</button>
<button type="button" class="btn btn-danger" id="btnReset">Reset</button>
</form>
</div>
<div class="col-xl-8 col-lg-7">
<div class="mb-4">
<canvas id="log"></canvas>
</div>
<table class="table" id="tblLog">
<thead>
<tr>
<th>#</th>
<th>Time</th>
<th>Status</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</main>
<footer class="pt-5 my-5 text-muted border-top">
Created by Logan Dawson
</footer>
</div>
<script src="site/js/jquery-3.6.1.min.js"></script>
<script src="site/js/bootstrap.bundle.min.js"></script>
<script src="site/js/jspdf.umd.min.js"></script>
<script src="js/eLog.js" type="text/javascript"></script>
<script type="text/javascript">
const c = document.getElementById("log");
/** @type {CanvasRenderingContext2D} */
const ctx = c.getContext("2d");
let log = new eLog(ctx, {
data: [],
options: {
startStatus: 1
}
});
</script>
<script src="site/js/site.js"></script>
</body>
</html>