-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (57 loc) · 3.38 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LC Company | See the problems lists with company info</title>
<meta name="description" content="Bootstrap.">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css"></style>
<script type="text/javascript" src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body style="margin:20px auto">
<div class="container">
<div class="row header" style="text-align:center;color:green">
<h3>Problem Lists With Company Names</h3>
</div>
<div id = "company_table">
<table id="dtBasicExample" class="table table-striped table-bordered table-sm" cellspacing="0" width="100%" style="font-family: Verdana, Geneva, Tahoma, sans-serif;">
<script>
fetch('https://raw.githubusercontent.com/ssavi-ict/LC-Which-Company/main/data/company_info.json')
.then(response => response.json())
.then(data => {
let table = document.getElementById('dtBasicExample');
let tableContent = '';
tableContent += '<thead><tr><th class="th-sm"><center>Problem Name</center></th>';
tableContent += '<th class="th-sm"><center>Companies Asked</center></th>';
tableContent += '<th class="th-sm"><center>Tutorial<center></th></tr></thead>';
tableContent += '<tbody>';
// Parse the Data. And add them into the Table.
for (let key in data){
let plink = key, pname = data[key][0];
tableContent += "<tr>";
tableContent += "<td><a href = '" + plink + "' target='_blank'>" + pname +"</a></td>";
tableContent += "<td style='background-image: linear-gradient(45deg, red, orange, green, blue, indigo, violet); -webkit-background-clip: text; -webkit-text-fill-color: transparent;'>";
for(let i=1; i<data[key].length; i++){
if(i > 1){
tableContent += ', ';
}
tableContent += data[key][i];
}
tableContent += "</td>";
tableContent += "<td></td>";
tableContent += "</tr>";
}
tableContent += '</tbody>';
table.innerHTML = tableContent;
$('#dtBasicExample').DataTable();
});
</script>
</table>
</div>
</div>
</body>
</html>