-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
63 lines (60 loc) · 2 KB
/
index.html
File metadata and controls
63 lines (60 loc) · 2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Government digital experience data">
<title>ScanGov Data</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<script>
document.addEventListener("DOMContentLoaded", async function () {
const tableBody = document.getElementById("file-list");
try {
const response = await fetch("https://api.github.com/repos/ScanGov/data/contents/");
const files = await response.json();
files.forEach(file => {
if (file.type === "file") {
const row = `<tr>
<td><a href="${file.html_url}" target="_blank">${file.name}</a></td>
</tr>`;
tableBody.innerHTML += row;
}
});
} catch (error) {
console.error("Error fetching file list:", error);
}
});
</script>
</head>
<body>
<div class="container text-center mt-5">
<h1>ScanGov Data</h1>
<p class="lead">Government digital experience data</p>
<div class="table-responsive mt-4">
<table class="table table-bordered">
<thead>
<tr>
<th>File Name</th>
</tr>
</thead>
<tbody id="file-list">
<tr>
<td>Loading...</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Google tag (gtag.js) -->
<script
async
defer
src="https://www.googletagmanager.com/gtag/js?id=G-3KBWH728KR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3KBWH728KR');
</script>
</body>
</html>