-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.html
102 lines (94 loc) · 3.14 KB
/
settings.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Admin</title>
<link rel="icon" href="assets/img/logo.svg" />
<!-- Material CDN -->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<!-- CSS Stylesheets -->
<link rel="stylesheet" href="assets/css/settings.css" />
</head>
<body>
<div class="container">
<aside>
<div class="top">
<div class="logo">
<img src="assets/img/logo.svg" alt="Logo" />
<h2>JalaRaksha</h2>
</div>
<div class="close" id="close-btn">
<span class="material-icons-outlined"> close </span>
</div>
</div>
<div class="sidebar">
<a href="/dashboard">
<span class="material-icons-outlined"> dashboard </span>
<h3>Dashboard</h3>
</a>
<a href="/admin">
<span class="material-icons-outlined"> admin_panel_settings </span>
<h3>Admin</h3>
</a>
<a href="/insights">
<span class="material-icons-outlined"> insights </span>
<h3>Insights</h3>
</a>
<a href="/settings" class="active">
<span class="material-icons-outlined"> settings </span>
<h3>Settings</h3>
</a>
<a href="#" id="logout">
<span class="material-icons-outlined"> logout </span>
<h3>Logout</h3>
</a>
</div>
</aside>
<main>
<h1 style="text-align: center;">Content will be updated soon</h1>
</main>
</div>
</body>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.9/firebase-app.js";
import {
getAuth,
signOut,
} from "https://www.gstatic.com/firebasejs/9.6.9/firebase-auth.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyCs_Vp6s3jtJp98aWLLj9T8SDH0-PW7uKc",
authDomain: "finalproject-bf039.firebaseapp.com",
databaseURL: "https://finalproject-bf039-default-rtdb.firebaseio.com",
projectId: "finalproject-bf039",
storageBucket: "finalproject-bf039.appspot.com",
messagingSenderId: "87145908250",
appId: "1:87145908250:web:7493362d75f1717d6429a3",
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth();
logout.addEventListener("click", (e) => {
signOut(auth)
.then(() => {
// Sign-out successful.
window.location = "index.html";
})
.catch((error) => {
// An error happened.
const errorCode = error.code;
const errorMessage = error.message;
// ..
alert(errorMessage);
});
});
</script>
</html>