Epub Parent Directory - Index Of Ebooks
/* footer */ .footer background: #f9fbfc; border-top: 1px solid #e2e8f0; padding: 1rem 2rem; font-size: 0.75rem; color: #5b6e6b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
.file-table td padding: 0.85rem 1.5rem; border-bottom: 1px solid #edf2f7; vertical-align: middle;
// Build table rows function buildTable() const tbody = document.getElementById('table-body'); if (!tbody) return; tbody.innerHTML = ''; fileItems.forEach(item => const icon, display, link = getIconAndLink(item); const row = tbody.insertRow(); if (item.isParent) row.classList.add('parent-row'); // filename column const cellName = row.insertCell(0); const nameSpan = document.createElement('span'); nameSpan.className = 'filename'; const anchor = document.createElement('a'); anchor.href = link; // special styling for parent directory if (item.isParent) anchor.style.fontWeight = '600'; anchor.style.background = '#f1f5f9'; anchor.style.padding = '0.2rem 0.6rem'; anchor.style.borderRadius = '20px'; anchor.style.display = 'inline-flex'; anchor.style.alignItems = 'center'; const iconSpan = document.createElement('span'); iconSpan.className = item.isDir ? 'dir-icon' : 'file-icon'; iconSpan.textContent = icon; iconSpan.style.marginRight = '8px'; anchor.appendChild(iconSpan); anchor.appendChild(document.createTextNode(display)); nameSpan.appendChild(anchor); cellName.appendChild(nameSpan); // last modified column const cellDate = row.insertCell(1); cellDate.className = 'date'; cellDate.textContent = formatDate(item.lastModified); // size column const cellSize = row.insertCell(2); cellSize.className = 'size'; if (item.isDir && !item.isParent) cellSize.textContent = '—'; else cellSize.textContent = item.size; ); index of ebooks epub parent directory
.size, .date color: #4b5563; font-size: 0.8rem;
// init: build both views, set table as default visible buildTable(); buildGrid(); setActiveView('table'); /* footer */
.filename a text-decoration: none; color: #1e4a46; transition: color 0.2s; display: inline-flex; align-items: center; gap: 6px;
.grid-filename font-weight: 600; font-family: monospace; font-size: 0.9rem; word-break: break-word; margin: 0.5rem 0 0.25rem; /* footer */ .footer background: #f9fbfc
.grid-filename a:hover text-decoration: underline;
@media (max-width: 680px) body padding: 1rem; .file-table th, .file-table td padding: 0.7rem 1rem; .toolbar flex-direction: column; align-items: flex-start; .header padding: 1.2rem 1.2rem; h1 font-size: 1.6rem; </style> </head> <body> <div class="container"> <div class="header"> <div class="path-bar"> 📂 <i>Index of</i> <strong>/ebooks/epub/</strong> </div> <h1> 📚 EPUB eBook Collection <span>Parent Directory</span> </h1> <div class="sub"> <span>🔓 Public access</span> <span>📄 ~240 items</span> <span>⚡ Last updated: April 2025</span> </div> </div> <div class="toolbar"> <div class="stats"> 📖 showing all EPUBs + subfolders </div> <div class="view-options"> <button class="view-btn active" data-view="table">📋 Table view</button> <button class="view-btn" data-view="grid">🔲 Grid view</button> </div> </div>
.grid-icon font-size: 3rem; margin-bottom: 0.5rem;
h1 span background: rgba(255, 255, 255, 0.2); font-size: 0.9rem; padding: 0.2rem 0.8rem; border-radius: 30px; font-weight: normal; font-family: monospace;