File size: 1,295 Bytes
6d591db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70a61d6
 
 
6d591db
 
 
 
 
 
 
 
 
 
 
 
 
68ae310
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>File List</title>
    <style>
        body {
            background-color: #333;
            color: #fff;
        }
        a {
            color: #9ecfff;
        }
    </style>
</head>
<body>
    <h1>Files in Directory</h1>
    <ul id="fileList"></ul>

    <script>
        fetch('list.yml')
            .then(response => response.text())
            .then(data => {
                const files = data.split('\n')
                                  .filter(line => line.trim() !== '')
                                  .map(line => line.replace(/^- /, '').trim());
                const listElement = document.getElementById('fileList');
                files.forEach(file => {
                    const listItem = document.createElement('li');
                    const link = document.createElement('a');
                    link.href = file;
                    link.textContent = file;
                    listItem.appendChild(link);
                    listElement.appendChild(listItem);
                });
            })
            .catch(error => console.error('Error loading the file list:', error));
    </script>
</body>
</html>