fix centered directories
This commit is contained in:
parent
d2dedf51c7
commit
2b58bd74cc
@ -102,7 +102,7 @@ div.directory-item a, li.directory-item a, li.file-item a {
|
||||
}
|
||||
.directories-grid .directory-item {
|
||||
background-color: #fff;
|
||||
padding: 15px 10px;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||||
@ -114,7 +114,7 @@ div.directory-item a, li.directory-item a, li.file-item a {
|
||||
grid-template-columns: 1fr auto;
|
||||
align-items: center;
|
||||
margin: 10px 0;
|
||||
padding: 15px 10px;
|
||||
padding: 15px;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||||
|
||||
@ -46,8 +46,8 @@ function renderContent(data) {
|
||||
let contentHTML = '';
|
||||
if (data.directories.length > 0) {
|
||||
contentHTML += '<ul>';
|
||||
// Check if every directory name is short (≤15 characters)
|
||||
const areAllShort = data.directories.every(dir => dir.name.length <= 15);
|
||||
// Check if every directory name is short (≤15 characters) and no files are present
|
||||
const areAllShort = data.directories.every(dir => dir.name.length <= 15) && data.files.length === 0;
|
||||
if (areAllShort) {
|
||||
contentHTML += '<div class="directories-grid">';
|
||||
data.directories.forEach(dir => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user