Aabicus Archives

You can count on me!

Of Ebooks Epub Parent Directory: Index

.file-icon, .dir-icon font-size: 1.25rem; margin-right: 10px; vertical-align: middle; display: inline-block; width: 28px; text-align: center;

.filename font-weight: 500; color: #0f2b2a; word-break: break-all;

.view-btn background: white; border: 1px solid #cbd5e1; padding: 0.3rem 0.8rem; border-radius: 30px; cursor: pointer; font-size: 0.8rem; font-weight: 500; transition: all 0.2s; color: #1e293b;

@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> index of ebooks epub parent directory

function setActiveView(view) currentView = view; if (view === 'table') tableViewDiv.style.display = 'block'; gridViewDiv.classList.remove('active'); gridViewDiv.style.display = 'none'; else tableViewDiv.style.display = 'none'; gridViewDiv.classList.add('active'); gridViewDiv.style.display = 'grid'; // update button styles viewBtns.forEach(btn => const btnView = btn.getAttribute('data-view'); if (btnView === view) btn.classList.add('active'); else btn.classList.remove('active'); );

.parent-link font-weight: 500;

.grid-view.active display: grid;

/* toolbar */ .toolbar padding: 1rem 2rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.85rem;

// 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; );

// Toggle view between table and grid let currentView = 'table'; // 'table' or 'grid' const tableViewDiv = document.getElementById('table-view'); const gridViewDiv = document.getElementById('grid-view'); const viewBtns = document.querySelectorAll('.view-btn'); .dir-icon font-size: 1.25rem

.grid-meta font-size: 0.7rem; color: #5b6e6b; margin-top: 6px;

// override after initial render + view toggle (re-run on toggle because grid/table may replace dom) const originalSetActive = setActiveView; window.setActiveView = function(view) originalSetActive(view); rebindIntercept(); ; setActiveView = function(view) originalSetActive(view); rebindIntercept(); .bind(this);

/* grid view (hidden by default) */ .grid-view display: none; padding: 2rem; background: #ffffff; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; .filename font-weight: 500