|
<!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> |
|
|