social-spider/docs/index.html
2019-10-19 15:26:42 +02:00

143 lines
5.2 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Social Spider</title>
<link rel="stylesheet" href="https://netzbegruenung.github.io/webfonts/style.css">
<style type="text/css">
h1 {
font-family: 'Arvo Gruen', sans-serif;
font-weight: bold;
color: #ffffff;
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
}
h2 {
font-family: 'Arvo Gruen', sans-serif;
font-weight: bold;
color: #ffffff;
margin-bottom: 0px;
margin-top: 0;
}
h5 {
font-family: 'Arvo', sans-serif;
color: #ffffff;
margin: 0;
}
.header {
background-color: #46962b;
padding: 20px;
}
body{
margin: 0;
}
a.headerlink {
color: #ffffff;
}
table {
font-family: 'PT Sans';
}
.dataTables_filter {
font-family: 'PT Sans';
}
.dataTables_info {
font-family: 'PT Sans';
}
a {
color: #000000
}
</style>
</head>
<body>
<div class="header">
<h5><a class="headerlink", style="float: right;" href="https://github.com/netzbegruenung/social-spider", target="_blank">GitHub</a></h5>
<h1>Social Spider</h1>
<h2><a class="headerlink", href="index.html">Tabelle</a> | <a class="headerlink", href="maps.html">Karte</a></h2>
</div>
<div style="float: left; margin:20px;">
<table id="datatable">
<thead>
<tr>
<th>Typ</th>
<th>Level</th>
<th>Land</th>
<th>Kreis</th>
<th>Stadt</th>
<th>FacebookID</th>
<th>Facebook Likes</th>
<th>TwitterID</th>
<th>Twitter Follower</th>
<th>InstagramID</th>
<th>Instagram Follower</th>
</tr>
</thead>
</table>
</div>
<script src="jquery-3.3.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<script type="text/javascript">
$.getJSON("result.json" , function(data) {
var tbl_body = document.createElement("tbody");
$.each(data, function() {
var tbl_row = tbl_body.insertRow();
var name;
var follower;
var isVerified;
$.each(this, function(idx , v) {
if (idx < 5){
var cell = tbl_row.insertCell();
txt = v.toString();
cell.appendChild(document.createTextNode(txt));
} else if (idx == 5 || idx == 8 || idx === 11) {
name = v.toString();
} else if (idx == 6 || idx == 9 || idx === 12) {
follower = v.toString();
} else if (idx == 7 || idx == 10 || idx === 13) {
var cell = tbl_row.insertCell();
var a = document.createElement('a');
isVerified = v;
if (isVerified)
{
verification = document.createElement("div");
icon = document.createElement("img")
icon.setAttribute("src", "verified.png")
icon.setAttribute("style", "height:19px;width:19px;float:left;margin-right:3px;");
verification.appendChild(icon)
text = document.createElement("div")
text.setAttribute("style", "float:left;text-decoration:underline;");
text.appendChild(document.createTextNode(name))
verification.appendChild(text);
a.appendChild(verification)
} else {
a.appendChild(document.createTextNode(name));
}
if (idx == 7 && name != "--") {
a.href = "https://www.facebook.com/" + name;
cell.appendChild(a);
} else if (idx == 10 && name != "--") {
a.href = "https://www.twitter.com/" + name;
cell.appendChild(a);
} else if (idx == 13 && name != "--") {
a.href = "https://www.instagram.com/" + name;
cell.appendChild(a);
} else {
cell.appendChild(document.createTextNode(name));
}
var cell2 = tbl_row.insertCell();
cell2.appendChild(document.createTextNode(follower));
}
})
})
$("#datatable").append(tbl_body);
$('#datatable').DataTable( {
paging: false,
"order" : [[ 6, "desc"]]
} );
});
</script>
</body>
</html>