diff --git a/static/app.css b/static/app.css index 925e3c2..01e36d8 100644 --- a/static/app.css +++ b/static/app.css @@ -78,8 +78,8 @@ li { } /* mouse symbol for links */ -li.directory-item, li.file-item, -li.directory-item a, li.file-item a { +div.directory-item, li.directory-item, li.file-item, +div.directory-item a, li.directory-item a, li.file-item a { cursor: pointer; } diff --git a/static/app.js b/static/app.js index 0a824de..045dd71 100644 --- a/static/app.js +++ b/static/app.js @@ -27,19 +27,29 @@ function renderContent(data) { }); document.getElementById('breadcrumbs').innerHTML = breadcrumbHTML; - // Build the HTML for directories and files. + + // Render directories. let contentHTML = ''; if (data.directories.length > 0) { contentHTML += ''; + // Check if every directory name is short (≤15 characters) + const areAllShort = data.directories.every(dir => dir.name.length <= 15); + if (areAllShort) { + contentHTML += '
'; + data.directories.forEach(dir => { + contentHTML += `
📁 ${dir.name}
`; + }); + contentHTML += '
'; + } else { + contentHTML += ''; + } } + // Render files. if (data.files.length > 0) { contentHTML += '