-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
82 lines (71 loc) · 2.01 KB
/
index.html
File metadata and controls
82 lines (71 loc) · 2.01 KB
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
<!DOCTYPE html>
<html>
<head>
<title>COVID Bhopal</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- JS -->
<script>
$(document).ready(() => {
$.ajax({
url: "district_wise.csv",
dataType: "text",
success: function (data) {
var employee_data = data.split(/\r?\n|\r/);
var table_data = '<table class="table table-bordered table-striped">';
for (var count = 0; count < employee_data.length; count++) {
var cell_data = employee_data[count].split(",");
table_data += '<tr>';
for (var cell_count = 0; cell_count < cell_data.length; cell_count++) {
if (count === 0) {
table_data += '<th>' + cell_data[cell_count] + '</th>';
}
else {
table_data += '<td>' + cell_data[cell_count] + '</td>';
}
}
table_data += '</tr>';
}
table_data += '</table>';
$('#employee_table').html(table_data);
}
});
});
</script>
</head>
<style>
th {
position: sticky;
top: 0;
background-color: rgb(51, 139, 0);
}
h1 {
font-family: monospace;
}
.table th{
transform: translateY(-1px);
text-align: center;
font-size: 28px;
}
/*responsive*/
@media (max-width: 500px) {
.table {
width: fit-content;
overflow-x: scroll
}
}
@media only screen and (max-width: 1025px) {
.mob-menu-header-holder {
position: fixed !important;
z-index: 99999 !important;
}
}
</style>
<body>
<h1 class="text-center">COVID 19 Cases in Madhya Pradesh</h1>
<br />
<div id="employee_table"></div>
</body>
</html>