motoe moto
commited on
Commit
•
6d591db
1
Parent(s):
49ef248
Update index.html
Browse files- index.html +40 -18
index.html
CHANGED
@@ -1,19 +1,41 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>File List</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
background-color: #333;
|
10 |
+
color: #fff;
|
11 |
+
}
|
12 |
+
a {
|
13 |
+
color: #9ecfff;
|
14 |
+
}
|
15 |
+
</style>
|
16 |
+
</head>
|
17 |
+
<body>
|
18 |
+
<h1>Files in Directory</h1>
|
19 |
+
<ul id="fileList"></ul>
|
20 |
+
|
21 |
+
<script>
|
22 |
+
fetch('list.yml')
|
23 |
+
.then(response => response.text())
|
24 |
+
.then(data => {
|
25 |
+
const parser = new DOMParser();
|
26 |
+
const doc = parser.parseFromString(data, 'application/x-yaml');
|
27 |
+
const files = doc.documentElement.textContent.split('\n').filter(line => line.trim() !== '');
|
28 |
+
const listElement = document.getElementById('fileList');
|
29 |
+
files.forEach(file => {
|
30 |
+
const listItem = document.createElement('li');
|
31 |
+
const link = document.createElement('a');
|
32 |
+
link.href = file;
|
33 |
+
link.textContent = file;
|
34 |
+
listItem.appendChild(link);
|
35 |
+
listElement.appendChild(listItem);
|
36 |
+
});
|
37 |
+
})
|
38 |
+
.catch(error => console.error('Error loading the file list:', error));
|
39 |
+
</script>
|
40 |
+
</body>
|
41 |
</html>
|