-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpopup.html
141 lines (134 loc) · 6.03 KB
/
popup.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
<!DOCTYPE html>
<html>
<head>
<title>Web Time Tracker</title>
<link rel="stylesheet" href="bootstrap-4.5.3-dist\css\bootstrap.min.css">
<link rel="stylesheet" href="custom.css">
<script src="jquery-3.5.1.min.js"></script>
<script src="bootstrap-4.5.3-dist\js\bootstrap.min.js"></script>
<script src="Chart.min.js"></script>
</head>
<body style="min-width: 400px;min-height: 350px;">
<div class="container">
<h4 class="mt-2 text-center"><img src="icons/icon48.png" height="35" class="navbar-brand"> Web-Time-Tracker</h4>
</div>
<div class=" small ">
<ul class="nav nav-pills" id="tabs" role="tablist">
<li class="nav-item ml-auto">
<a href="#todayPanel" class="nav-link active" id="todayTab" data-toggle="pill" role="tab">
Today's Stats
</a>
</li>
<li class="nav-item">
<a href="#dailyReport" class="nav-link " id="dailyTab" data-toggle="pill" role="tab" >
Daily Report
</a>
</li>
<li class="nav-item mr-auto">
<a href="#oneWeek" class="nav-link " id="weekTab" data-toggle="pill" role="tab" >
Recent Summary
</a>
</li>
</ul>
<div class="tab-content" id="tabContent">
<div class="tab-pane fade show active" id="todayPanel" role="tabpanel">
<div class="container text-center">
<canvas id="pie-chart" width="100%" height="100%" class="my-1"></canvas>
<div class="row">
<div class="col align-self-center">
<button class="btn my-3 " id="detailBtn" data-toggle="collapse" data-target="#webListDiv"><span class="small font-weight-bold">See Detailed View</span></button>
</div>
<div class="col">
<div class="card mb-2">
<div class="card-header font-weight-bold py-1">Total Time Spent</div>
<div class="card-body py-1"><span id="totalTimeToday"></span></div>
</div>
</div>
</div>
<div class="collapse " id="webListDiv">
<table class="table table-hover " >
<thead style="background-color:#a0c1b8">
<tr>
<th scope="col">#</th>
<th scope="col">Website</th>
<th scope="col">Time Spent</th>
</tr>
</thead>
<tbody id="webList" >
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade " id="dailyReport" role="tabpanel">
<div class="container">
<div class="row mt-2">
<div class="col-8">
<div class="form-group">
<label for="dateValue">Select a Date:</label>
<input type="date" class="form-control form-control-sm" id="dateValue">
</div>
</div>
<div class="col align-self-center">
<button class="btn" id="dateSubmit"> Submit </button>
</div>
</div>
<div class="alert alert-danger d-none" id="tryAgain">
<!-- Invalid date! Please try again. -->
</div>
<canvas id="differentDayChart" width="100%" height="100%" class="my-1"></canvas>
</div>
<div class="container">
<div class="row d-none" id="statsRow">
<div class="col align-self-center">
<button class="btn my-3 " id="detailBtn2" data-toggle="collapse" data-target="#webListDiv2"><span class="small font-weight-bold">See Detailed View</span></button>
</div>
<div class="col">
<div class="card mb-2">
<div class="card-header font-weight-bold py-1">Total Time Spent</div>
<div class="card-body py-1"><span id="totalTimeThatDay"></span></div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="collapse " id="webListDiv2">
<table class="table table-hover text-center " >
<thead style="background-color:#a0c1b8">
<tr>
<th scope="col">#</th>
<th scope="col">Website</th>
<th scope="col">Time Spent</th>
</tr>
</thead>
<tbody id="webList2" >
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade " id="oneWeek" role="tabpanel">
<canvas id="pastWeek" width="100%" height="100%" class="my-3"></canvas>
<div class="container">
<div class="row mb-2">
<div class="col">
<div class="card">
<div class="card-header bg-warning text-center font-weight-bold">Weekly Average</div>
<div class="card-body text-center" id="weekAvg"></div>
</div>
</div>
<div class="col">
<div class="card">
<div class="card-header bg-danger text-light text-center font-weight-bold">Maximum Time </div>
<div class="card-body text-center" id="weekMax"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="popup.js"></script>
</body>
</html>