initial commit
This commit is contained in:
39
view.html
Normal file
39
view.html
Normal file
@ -0,0 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://cdn.scode.ovh/bootstrapLight.css" />
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #085;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="data"></div>
|
||||
<br />
|
||||
<br />
|
||||
<a
|
||||
style="font-size:10px"
|
||||
rel="license"
|
||||
href="https://www.gnu.org/licenses/gpl-3.0.en.html"
|
||||
>GNU General Public License v3.0 or later © Timo Hocker</a
|
||||
>
|
||||
<script>
|
||||
fetch('?json')
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
let data = '<table>';
|
||||
for (let row of json) {
|
||||
data += `<tr><td>${row.join('</td><td>')}</td></tr>`;
|
||||
}
|
||||
data += '</table>';
|
||||
document.getElementById('data').innerHTML = data;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user