-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
22 lines (22 loc) · 966 Bytes
/
index.html
File metadata and controls
22 lines (22 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
(async () => {
const response = await fetch('https://api.github.com/repos/baasgeo/imroi_icons/contents/');
const json = await response.json();
const data = json.filter(file => file.type === 'dir');
let htmlString = '<h2>ImROI icons by the Right Direction</h2>';
htmlString += '<table class="table"><tr><th>preview</th><th>SLD</th></tr>';
for (let file of data) {
htmlString += `<tr><td><a href="${file.path}">${file.name}</a></td>`;
htmlString += `<td><a href="https://github.com/baasgeo/imroi_icons/blob/master/${file.name}.sld">${file.name}.sld</a></td></tr>`;
}
htmlString += '</table>';
document.getElementsByTagName('body')[0].innerHTML = htmlString;
})()
</script>
<body>
</html>