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