-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
252 lines (247 loc) · 9.92 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/icons/contacts.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Store contacts information using Indexed DB."
/>
<title>Contacts Book</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="/style.css" />
<script
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"
></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
</script> -->
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"
></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/dist/pouchdb.min.js"></script>
</head>
<body>
<div class="app">
<a
target="_blank"
href="https://github.com/manvendra22/contacts-book"
class="git-link"
>
<img src="./icons/github.svg" alt="github-logo" class="icon-git" />
</a>
<div class="topbar">
<div class="mb-3">
<input
type="text"
placeholder="Search contacts"
class="search-bar"
name="search-input"
/>
</div>
<div class="mb-3">
<button class="button button-primary" id="addContactBtn">
Add Contact
</button>
</div>
</div>
<div id="listContainer" class="content">
<!-- <div class="list-item">
<div class="top text-capitalize">
<div>
<div class="main-text">John Doe</div>
<div class="sub-text">Developer, Google</div>
</div>
<img src="/icons/edit.svg" class="icon edit" alt="edit" />
<img src="/icons/cross.svg" class="icon cross" alt="delete" />
</div>
<div class="bottom dark-text">
<div>+919876543210</div>
<div>[email protected]</div>
<div class="contact-now">
<a class="contact-link" href="mailto:[email protected]">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 479.058 479.058"
class="contact-icon"
>
<path
d="M408.602 83.461H70.456c-21.515 0-39.017 17.502-39.017 39.018v234.1c0 21.516 17.502 39.018 39.017 39.018h338.146c21.515 0 39.017-17.502 39.017-39.017V122.479c0-21.516-17.502-39.018-39.017-39.018zm0 26.012c1.767 0 3.448.366 4.985 1.006L239.529 261.336 65.471 110.48a12.946 12.946 0 014.984-1.006zm0 260.112H70.456c-7.176 0-13.006-5.83-13.006-13.006V137.96l173.557 150.416c2.451 2.12 5.487 3.175 8.522 3.175s6.07-1.053 8.522-3.175L421.608 137.96v218.62c-.001 7.175-5.83 13.005-13.006 13.005z"
data-original="#000000"
class="active-path"
fill="currentColor"
/>
</svg>
Send mail</a
>
<a class="contact-link" href="tel:+91 98765 43210">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 511.999 511.999"
class="contact-icon"
>
<path
d="M477.826 367.114l-58.144-58.145c-16.03-16.03-42.115-16.03-58.144 0l-26.43 26.43c-12.144 12.143-31.905 12.14-44.045.004L176.508 220.75c-12.172-12.173-12.174-31.874 0-44.049l26.43-26.429c15.96-15.959 16.182-41.962-.016-58.159l-58.13-57.946c-16.03-16.03-42.113-16.03-58.1-.042L65.504 55.128c-57.807 57.806-57.807 151.864-.003 209.669l181.509 181.604c57.942 57.943 151.724 57.948 209.671 0l21.144-21.144c16.03-16.03 16.03-42.113 0-58.143zM106.031 53.548c5.343-5.343 14.036-5.344 19.396.015l58.13 57.946c5.355 5.356 5.355 14.024 0 19.381l-9.692 9.69-77.476-77.475 9.642-9.557zm160.365 373.474L84.886 245.417c-44.724-44.724-47.182-114.95-7.56-162.612l77.25 77.25c-20.298 23.011-19.452 58.075 2.547 80.073l114.551 114.648.004.003c21.974 21.976 57.036 22.877 80.075 2.55l77.252 77.253c-47.509 39.554-117.578 37.472-162.61-7.56zm192.05-21.146l-9.691 9.692-77.526-77.527 9.69-9.69c5.344-5.344 14.038-5.345 19.382 0l58.144 58.144c5.344 5.344 5.344 14.039.001 19.381z"
data-original="#000000"
class="active-path"
fill="currentColor"
/>
</svg>
Call</a
>
</div>
</div>
</div> -->
</div>
<!-- Add/Edit Modal-->
<div
class="modal fade"
id="contactFormModal"
tabindex="-1"
role="dialog"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Add contact</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id="contactForm">
<div class="form-group">
<label for="fullName">Name</label>
<input
type="text"
class="form-control"
id="fullName"
name="fullName"
placeholder="John Doe"
required
/>
</div>
<div id="contactContainer">
<div class="form-row">
<div class="col-8">
<div class="form-group">
<label for="contact_1">Contact</label>
<input
type="number"
class="form-control contact"
id="contact_1"
name="contact_1"
placeholder="+91 98765 43210"
required
/>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="contactType_1">Contact type</label>
<select
class="form-control"
id="contactType_1"
name="contactType_1"
>
<option>Home</option>
<option>Office</option>
<option>Personal</option>
</select>
</div>
</div>
</div>
</div>
<span class="pin mb-3" id="addAnotherContact"
>Add another contact</span
>
<div id="emailContainer">
<div class="form-group">
<label for="email_1">Email</label>
<input
type="email"
class="form-control email"
id="email_1"
name="email_1"
placeholder="[email protected]"
/>
</div>
</div>
<span class="pin mb-3" id="addAnotherEmail"
>Add another email</span
>
<div class="form-row">
<div class="col-8">
<div class="form-group">
<label for="company">Company</label>
<input
type="text"
class="form-control"
id="company"
name="company"
placeholder="Google"
/>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="title">Title</label>
<input
type="text"
class="form-control"
id="title"
name="title"
placeholder="Developer"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="button button-tertiary"
data-dismiss="modal"
>
Close
</button>
<button
type="submit"
class="button button-secondary"
id="addDataBtn"
>
Add
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="./scripts/eventEmitter.js"></script>
<script src="./scripts/modal.js"></script>
<script src="./scripts/view.js"></script>
<script src="./scripts/controller.js"></script>
</body>
</html>