forked from nyugoh/todo-pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
180 lines (160 loc) · 7.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>To-do App - PWA</title>
<!-- Bootstrap styling styles -->
<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
<link href="./assets/css/gijgo.min.css" rel="stylesheet" type="text/css" />
<!-- manifest here -->
<link rel="manifest" href="manifest.json">
<!-- Favicon link, seen on the title bar -->
<link rel="shortcut icon" href="./assets/images/favicon.ico" type="image/x-icon">
<!-- Github octicons for icons -->
<link rel="stylesheet" href="./assets/css/octicon.css">
<link rel="stylesheet" href="./assets/css/styles.css">
</head>
<body>
<!-- App shell begins here -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" style="background-color: #e3f2fd;">
<div class="container">
<a class="navbar-brand" href="#">Awesome TODO PWA</a>
<ul class="my-2 my-lg-0">
<button type="button" data-toggle="modal" data-target="#addTaskModal" class="btn btn-outline-success my-2 my-sm-0" >Add </button>
</ul>
</div>
</nav>
<div class="container mt-5 pt-5">
<h2 class=" text-center"><span class="text-primary" id="currentDate"></span> <span class="pl-3" id="currenttime">00:00:00</span></h2>
<div class="col-12 margin-top">
<table class="table">
<thead>
<tr>
<th scope="col">Task</th>
<th scope="col">Priority</th>
<th scope="col">Status</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="tasks"></tbody>
</table>
</div>
</div>
<!-- App shell ends here -->
<!-- Add to-do modal -->
<!-- Modal -->
<div class="modal fade" id="addTaskModal" tabindex="-1" role="dialog" aria-labelledby="addTaskModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form id="addTask">
<div class="modal-header">
<h5 class="modal-title" id="addTaskModalLabel">Add Task</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="task">Task</label>
<input type="text" class="form-control" id="task" aria-describedby="taskHelp" placeholder="Enter task">
</div>
<div class="form-group">
<label for="description">Description</label>
<input type="text" class="form-control" id="description" aria-describedby="descriptionHelp" placeholder="Enter description">
</div>
<div class="form-group">
<label for="prioritySelect">Priority</label>
<select class="form-control" id="prioritySelect">
<option value="0">Low</option>
<option value="1" selected>Normal</option>
<option value="2">High</option>
<option value="3">Urgent</option>
</select>
</div>
<div class="form-group">
<label for="datepicker">Deadline</label>
<input id="datepicker"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<input type="submit" class="btn btn-primary" value="Add">
</div>
</form>
</div>
</div>
</div>
<!-- Modal ends here -->
<!-- Add to-do modal -->
<!-- Modal -->
<div class="modal fade" id="editTaskModal" tabindex="-1" role="dialog" aria-labelledby="editTaskModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form id="editTaskForm">
<div class="modal-header">
<h5 class="modal-title" id="editTaskModalLabel">Edit Task</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="editTask">Task</label>
<input type="hidden" id="taskId">
<input type="text" class="form-control" id="editTask" aria-describedby="taskHelp" placeholder="Enter task">
</div>
<div class="form-group">
<label for="editDescription">Description</label>
<input type="text" class="form-control" id="editDescription" aria-describedby="descriptionHelp" placeholder="Enter description">
</div>
<div class="form-group">
<label for="prioritySelect">Priority</label>
<select class="form-control" id="editPrioritySelect">
<option value="0">Low</option>
<option value="1" selected>Normal</option>
<option value="2">High</option>
<option value="3">Urgent</option>
</select>
</div>
<div class="form-group">
<label for="editDatePicker">Deadline</label>
<input id="editDatePicker"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<input type="submit" class="btn btn-success" value="Edit">
</div>
</form>
</div>
</div>
</div>
<!-- Modal ends here -->
<!-- All the required files begin here -->
<!-- Import Bootstrap files -->
<script src="./assets/js/jquery-3.3.1.slim.min.js"></script>
<script src="./assets/js/popper.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/gijgo.min.js" type="text/javascript"></script>
<!--Import Moment.js CDN here-->
<script src = "./assets/js/moment.min.js"></script>
<!-- Import the main.js script here -->
<script src="./assets/js/main.js"></script>
<!-- End of all our reuquired files -->
<!-- register service worker
check if the browser supports service workers, and if it does, register the service worker-->
<script>
if ('serviceWorker' in navigator)
{
window.addEventListener('load', function() {
navigator.serviceWorker.register('sw.js')
.then(function() { console.log("Service Worker Registered :)"); });
}
);
}
</script>
<!-- end of service worker -->
</body>
</html>