File size: 5,259 Bytes
6d591db bb384bf 6ffa1f6 bb384bf 6d591db bb384bf 6d591db bb384bf 0b4ac04 bb384bf 6d591db bb384bf 6d591db 105d29f 6d591db bb384bf 6ffa1f6 6d591db bb384bf 6d591db 70a61d6 bb384bf 105d29f bb384bf 6d591db bb384bf 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
<!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, html {
height: 100%;
margin: 0;
}
.bg {
/* The video background */
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
z-index: -1; /* Ensure video stays in the background */
}
body {
/* Styling for content */
color: #fff;
display: flex;
justify-content: center;
align-items: center; /* Align items to the center */
height: 100vh;
overflow: hidden; /* Lock scrolling */
position: relative;
}
a {
color: #FF0000; /* Brighter red for better visibility */
font-size: 24px; /* Increased font size for file names */
text-decoration: none; /* No underline */
transition: transform 0.3s ease-in-out, color 0.3s ease-in-out; /* Added transform transition */
}
a:hover {
color: #FFFFFF; /* White color on hover */
transform: scale(1.2); /* Scale up on hover */
}
ul {
list-style: none;
padding: 0;
text-align: center; /* Center align the list items */
}
div {
text-align: center; /* Center align the div content */
}
h1 {
color: #FF0000; /* Brighter red consistent with link color */
text-shadow: 2px 2px 4px #000000; /* Text shadow for better readability */
}
#pagination {
margin-top: 20px;
display: flex;
justify-content: center; /* Center pagination */
}
.page-link {
color: #FFB6C1; /* Light pink */
font-size: 24px; /* Made page number bigger */
cursor: pointer;
margin: 0 10px; /* Increase spacing */
transition: transform 0.2s ease-in-out;
}
.page-link:hover {
transform: scale(1.2); /* Scale up on hover */
color: #FF69B4; /* Hot pink on hover */
}
/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
body {
flex-direction: column;
justify-content: space-around;
}
h1 {
font-size: 20px; /* Smaller font size for smaller screens */
}
a {
font-size: 18px; /* Smaller font size for links on smaller screens */
}
.page-link {
font-size: 18px; /* Smaller font size for pagination on smaller screens */
}
}
</style>
</head>
<body>
<div>
<h1>Files in Directory</h1>
<ul id="fileList"></ul>
<div id="pagination"></div>
</div>
<video autoplay muted loop class="bg">
<source src="1.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<script>
const itemsPerPage = 5; // Number of files to display per page
let currentPage = 1;
fetch('list.yml')
.then(response => response.text())
.then(data => {
const files = data.split('\n')
.filter(line => line.trim() !== '')
.map(line => line.replace(/^- /, '').trim());
const totalPages = Math.ceil(files.length / itemsPerPage);
displayFiles(files, currentPage);
const paginationElement = document.getElementById('pagination');
paginationElement.innerHTML = ''; // Clear previous pagination links
for (let i = 1; i <= totalPages; i++) {
const pageLink = document.createElement('span');
pageLink.textContent = i;
pageLink.className = 'page-link';
pageLink.onclick = () => {
currentPage = i;
displayFiles(files, currentPage);
};
paginationElement.appendChild(pageLink);
}
})
.catch(error => console.error('Error loading the file list:', error));
function displayFiles(files, page) {
const start = (page - 1) * itemsPerPage;
const end = start + itemsPerPage;
const paginatedFiles = files.slice(start, end);
const listElement = document.getElementById('fileList');
listElement.innerHTML = ''; // Clear previous entries
paginatedFiles.forEach(file => {
const listItem = document.createElement('li');
const link = document.createElement('a');
link.href = file;
link.textContent = file.replace(/^files\//, ''); // Remove 'files/' from display text
listItem.appendChild(link);
listElement.appendChild(listItem);
});
}
</script>
</body>
</html>
|