-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (87 loc) · 5.9 KB
/
index.html
File metadata and controls
96 lines (87 loc) · 5.9 KB
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
<html>
<head>
<meta name='viewport' content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script src="js/script.js"></script>
<link rel="stylesheet" href="css/style.css" >
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/images/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<title>GiffGaff Data Usage Calulator</title>
</head>
<body>
<div class='container'>
<h1>Simple Data Usage Calculator</h1>
<p>Data Remaining can be negative when using the reserve</p>
<p>Numbers are stored in cookies to save you inputting every time</p>
<div id='resultset' class='row gap-3 g-3 overuse'>
<div class='col-sm results'>
<strong>Time without Data</strong><br />
<strong><span id='data_days_short'></span></strong> days,
<strong><span id='data_hours_short'></strong>, hours and
<strong><span id='data_mins_short'></strong> minutes<br /><br />
Runs out on <strong><span id='data_runsout_on'></span></strong><br />
</div>
<div class='col-sm results'>
<strong>Data</strong><br />
Renews on <strong><span id='data_renews_on'></span></strong><br /> <br />
Actual data Remaining <strong><span id='actual_data_remaining'></span></strong>GB
</div>
<div class='col-sm results'>
<strong>Usage</strong><br />
Current daily <strong><span id='used_per_day'></span></strong>MB<br />
Target daily <strong><span id='target_per_day'></span></strong>MB<br />
Remaining daily <strong><span id='remaining_per_day'></span></strong>MB
</div>
<div class='col-sm results'>
<strong>Info</strong><br />
Time Remaining at current usage: <br /><strong><span id='days_remaining'></span></strong> days,
<strong><span id='hours_remaining'></span></strong>, hours and
<strong><span id='mins_remaining'></span></strong> minutes<br />
Time Until Renew: <br /><strong><span id='end_days_remaining'></span></strong> days,
<strong><span id='end_hours_remaining'></span></strong>, hours and
<strong><span id='end_mins_remaining'></span></strong> minutes<br />
</div>
</div>
<div class='form row gap-3 g-3'>
<form id='dataUsageForm' method='post'>
<input type='hidden' name='post-submitted'/>
<div class='form-group'>
<div class='row'>
<div class='col-sm-12 col-md-2 '>
<label for='using-reserve'>Using Reserve?</label><br />
<input class='form-check-input' type='checkbox' name='using-reserve' id='using-reserve' />
</div>
<div class=' col-sm-12 col-md-4 '>
<label for='remaining'>Data Remaining (GB)</label>
<input autofocus class='form-control' type='text' name='remaining' id='remaining' value='' placeholder='Data Remaining (GB)' required/>
</div>
<div class='col-sm-12 col-md-6 '>
<label for='renew-date'>Data Renewal (Just the day part of the date)</label>
<input min="1" max="31" step="1" class='form-control' type='number' name='renew-date' id='renew-date' value='' placeholder='Renewal date' required/>
</div>
</div>
</div>
<div class='form-group'>
<div class='row'>
<div class='col-sm'>
<label for='allowance'>Data Allowance (GB)</label>
<input min="1" step="1" class='form-control' type='number' name='allowance' id='allowance' value='' placeholder='Data Allowance (GB)' required/>
</div>
<div class='col-sm'>
<label for='reserve'>Data Reserve (GB)</label>
<input min="0" step="1" class='form-control' type='number' name='reserve' id='reserve' value='' placeholder='Data Reserve (GB)' required/>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<p id="log"></p>
</div>
</div>
</body>
</html>