-
Notifications
You must be signed in to change notification settings - Fork 1
/
homepage.html
206 lines (198 loc) · 7.24 KB
/
homepage.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
<!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" />
<!-- update the version number as needed -->
<script src="https://www.gstatic.com/firebasejs/7.6.2/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.6.2/firebase-firestore.js"></script>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="./backend/css/homepage.css" />
<link rel="stylesheet" href="./backend/css/studCRUD.css" />
<title>DataSync - Govt of Sikkim</title>
<script>
window.onload = function() {
var chart = new CanvasJS.Chart("BarchartContainer", {
animationEnabled: true,
exportEnabled: true,
theme: "light1", // "light1", "light2", "dark1", "dark2"
title: {
text: "Simple Column Chart with Index Labels"
},
data: [
{
type: "column", //change type to bar, line, area, pie, etc
//indexLabel: "{y}", //Shows y value on all Data Points
indexLabelFontColor: "#5A5757",
indexLabelPlacement: "outside",
dataPoints: [
{ x: 10, y: 71 },
{ x: 20, y: 55 },
{ x: 30, y: 50 },
{ x: 40, y: 65 },
{ x: 50, y: 92, indexLabel: "Highest" },
{ x: 60, y: 68 },
{ x: 70, y: 38 },
{ x: 80, y: 71 },
{ x: 90, y: 54 },
{ x: 100, y: 60 },
{ x: 110, y: 36 },
{ x: 120, y: 49 },
{ x: 130, y: 21, indexLabel: "Lowest" }
]
}
]
});
chart.render();
var chart2 = new CanvasJS.Chart("PiechartContainer", {
animationEnabled: true,
title: {
text: "Desktop Search Engine Market Share - 2016"
},
data: [
{
type: "pie",
startAngle: 240,
yValueFormatString: '##0.00"%"',
indexLabel: "{label} {y}",
dataPoints: [
{ y: 79.45, label: "Google" },
{ y: 7.31, label: "Bing" },
{ y: 7.06, label: "Baidu" },
{ y: 4.91, label: "Yahoo" },
{ y: 1.26, label: "Others" }
]
}
]
});
chart2.render();
};
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Govt Of Sikkim</a>
<div class="right m-2">
<a href="./studCRUD.html">
<button class="btn btn-outline-primary m-1">Student DB</button> </a
><a href="./teachCRUD.html">
<button class="btn btn-outline-primary m-1">Teachers DB</button>
</a>
<form class="form-inline">
<label id="netStatus" class="badge badge-pill mx-3"></label>
<button
class="btn btn-outline-success my-2 my-sm-0"
onclick="retriveDB()"
>
Sync Now
</button>
</form>
</div>
</nav>
<!-- Application Body Starts Here -->
<div class="container bgclass">
<div class="row m-2">
<div class="col-6">
<img
src="./backend/img/chart-1-pie.jpeg"
alt="Gender ratio pie chart"
class="img m-2 img-fluid"
/>
</div>
<div class="col-6">
<div class="card crudcard">
<img
class="card-img-top m-auto"
src="./backend/img/student-icon.png"
alt="Card image cap"
style="float:left"
/>
<div class="card-body" style="float: right;">
<h5 class="card-title">Student Information Database</h5>
<p class="card-text">
This Database consist of Information of all students including
their academic records and is very useful for the purpose of
central data analysis
</p>
<a href="./studCRUD.html" class="btn btn-primary"
>Go to Students DB</a
>
</div>
</div>
</div>
</div>
<div class="row m-2">
<div class="col-6">
<img
src="./backend/img/chart-2-bar.jpeg"
alt="Teacher Age Bar Chart"
class="img img-fluid"
/>
</div>
<div class="col-6">
<div class="card crudcard">
<div class="card-body" style="float: left;">
<h5 class="card-title">Teacher Information Database</h5>
<p class="card-text">
This Database will take you to each teacher working in this
ecosysstem and is very useful for efficiency
</p>
<a href="./teachCRUD.html" class="btn btn-primary"
>Go to Teachers DB</a
>
</div>
<img
class="card-img-top m-auto"
src="./backend/img/teacher-icon.png"
alt="Card image cap"
style="float: right;"
/>
</div>
</div>
</div>
</div>
<nav class="bottom">
<h5 class="m-2">© Created by Team X-Distaster-X</h5 class="m-2">
</nav>
<script src="./backend/js/netCheck.js"></script>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script src="./backend/js/database.js"></script>
<script src="./index.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
// // The Firebase SDK is initialized and available here!
//
// firebase.auth().onAuthStateChanged(user => { });
// firebase.database().ref('/path/to/ref').on('value', snapshot => { });
// firebase.messaging().requestPermission().then(() => { });
// firebase.storage().ref('/path/to/ref').getDownloadURL().then(() => { });
//
// // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
try {
const firebaseConfig = {
apiKey: "AIzaSyAJye_s5ZoTSH2-hjyKMmeNrG21AmcvxT4",
authDomain: "sihdatabase.firebaseapp.com",
databaseURL: "https://sihdatabase.firebaseio.com",
projectId: "sihdatabase",
storageBucket: "sihdatabase.appspot.com",
messagingSenderId: "638058570525",
appId: "1:638058570525:web:8a2514284390e757d5f7f4"
};
firebase.initializeApp(firebaseConfig);
let app = firebase.app();
let features = ["auth", "database", "messaging", "storage"].filter(
feature => typeof app[feature] === "function"
);
} catch (e) {
console.error(e);
}
});
</script>
<script src="./backend/js/sendToFirebase.js"></script>
</body>
</html>