-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
182 lines (164 loc) · 9.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- style -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.1/css/all.css" integrity="sha384-vp86vTRFVJgpjF9jiIGPEEqYqlDwgyBgEF109VFjmqGmIY/Y4HV4d3Gp2irVfcrp" crossorigin="anonymous">
<!-- scripts -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.2.3/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.3/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.3/firebase-auth.js"></script>
<!-- style -->
<style>
#nav-toggle-btn {
border: none !important;
color: white !important;
}
#nav-toggle-btn:focus {
outline: none !important;
}
.btn-sm:focus {
box-shadow: none !important;
outline: none !important;
}
</style>
</head>
<body class="bg-light">
<!-- navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-secondary px-5">
<a class="navbar-brand text-light" href="#">To-Do-List</a>
<button class="navbar-toggler" type="button" id="nav-toggle-btn" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span><i class="fas fa-bars"></i></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link logged-out text-light" href="#" data-toggle="modal" data-target="#Modal-signup">Sign Up</a>
</li>
<li class="nav-item">
<a class="nav-link logged-out text-light" href="#" data-toggle="modal" data-target="#Modal-login">Log In</a>
</li>
<li class="nav-link disabled logged-in text-light" id="user-email"></li>
<li class="nav-item">
<a class="nav-link logged-in text-light" id="logout" href="#">Log Out</a>
</li>
</ul>
</div>
</nav>
<!-- Add todo -->
<div class="container">
<form class="logged-in text-center py-5" id="add-todo-form">
<input type="text" name="title" placeholder="Add Task" class="w-75 py-1">
<button type="submit" class="btn-sm btn-secondary">Add</button>
</form>
<!-- list -->
<ul class="list-group" id="todo-list"></ul>
<!-- Edit Modal -->
<div class="modal fade" id="Modal-update" tabindex="-1" role="dialog" aria-labelledby="Modal-updateLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="EditModalCenterTitle">Make Changes</h5>
</div>
<div class="modal-body p-4">
<input type="text" required name="newtitle" placeholder="Edit..." class="w-100 m-1">
</div>
<div class="modal-footer">
<button type="button" class="btn-sm btn-secondary" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn-sm btn-primary" id="update">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Log in Modal -->
<div class="modal fade" id="Modal-login" tabindex="-1" role="dialog" aria-labelledby="Modal-loginLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="LoginModalCenterTitle">Login</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body p-4">
<form action="" id="login-form">
<div class="input-field p-2">
<label>E-mail Address:</label>
<input type="email" id="login-email" required placeholder="email@email.com" class="w-100">
</div>
<div class="input-field p-2">
<label>Password:</label>
<input type="password" id="login-password" required placeholder="Shhh..." class="w-100">
</div>
<div class="modal-footer">
<p class="text-danger error"></p>
<button type="submit" class="btn-sm btn-primary ml-auto" id="login-btn">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Sign up Modal -->
<div class="modal fade" id="Modal-signup" tabindex="-1" role="dialog" aria-labelledby="Modal-signupLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="signupModalCenterTitle">Signup</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body p-4">
<form action="" id="signup-form">
<div class="input-field p-2">
<label>E-mail Address:</label>
<input type="email" id="signup-email" required placeholder="email@email.com" class="w-100">
</div>
<div class="input-field p-2">
<label>Password:</label>
<input type="password" id="signup-password" required placeholder="Shhh..." class="w-100">
</div>
<div class="modal-footer">
<p class="text-danger error"></p>
<button type="submit" class="btn-sm btn-primary ml-auto" id="signup-btn">signup</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid fixed-bottom bg-secondary py-2 px-2 text-light text-right">
-Made by Siddharth Khandelwal
</div>
<!-- script -->
<script>
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').trigger('focus')
});
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyCI20JFDdVqlIfZLaU7FJc2WLgvd5pnC3k",
authDomain: "todolist-49e51.firebaseapp.com",
projectId: "todolist-49e51",
storageBucket: "todolist-49e51.appspot.com",
messagingSenderId: "67234175852",
appId: "1:67234175852:web:9f076ea1e6155c4d01b149"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();
const auth = firebase.auth();
</script>
<script src="auth.js"></script>
<script src="app.js"></script>
</body>
</html>