motoe moto commited on
Commit
6d591db
1 Parent(s): 49ef248

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +40 -18
index.html CHANGED
@@ -1,19 +1,41 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>