Skip to content

Commit 49f99ce

Browse files
committed
Trying to add auto index.html to posters
1 parent c091334 commit 49f99ce

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

posters/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<html>
2+
<body>
3+
<script>
4+
(async () => {
5+
const response = await fetch('https://api.github.com/repos/gofflab/gofflab.github.io/posters/');
6+
const data = await response.json();
7+
let htmlString = '<ul>';
8+
9+
for (let file of data) {
10+
htmlString += `<li><a href="${file.path}">${file.name}</a></li>`;
11+
}
12+
13+
htmlString += '</ul>';
14+
document.getElementsByTagName('body')[0].innerHTML = htmlString;
15+
})()
16+
</script>
17+
<body>
18+
</html>

0 commit comments

Comments
 (0)