mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-25 05:01:37 +02:00
Additional style tweaks to make things work better
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="resources/css/rebase.css" />
|
||||
<link rel="stylesheet" type="text/css" href="resources/css/directorylister.css" />
|
||||
<link rel="stylesheet" type="text/css" href="resources/css/colorbox.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php include('resources/DirectoryLister.php'); $lister = new DirectoryLister(); ?>
|
||||
@@ -24,8 +25,7 @@
|
||||
<?php $x = 1; foreach($lister->listDirectory() as $name => $fileInfo): ?>
|
||||
<li class="<?php echo $x %2 == 0 ? 'even' : 'odd'; ?>">
|
||||
<a href="<?php if(is_dir($fileInfo['file_path'])) { echo '?dir=' . $fileInfo['file_path']; } else { echo $fileInfo['file_path']; } ?>" class="clearfix">
|
||||
<img src="resources/images/icons/<?php echo $fileInfo['file_icon']; ?>" class="fileIcon">
|
||||
<span class="fileName"><?php echo $name; ?></span>
|
||||
<span class="fileName" style="background: transparent url(resources/images/icons/<?php echo $fileInfo['icon']; ?>) no-repeat left center;"><?php echo $name; ?></span>
|
||||
<span class="fileSize"><?php echo $fileInfo['file_size']; ?></span>
|
||||
<span class="fileModTime"><?php echo $fileInfo['mod_time']; ?></span>
|
||||
</a>
|
||||
|
@@ -79,6 +79,7 @@ class DirectoryLister {
|
||||
// Get file type
|
||||
if (is_dir($realPath)) {
|
||||
$fileIcon = 'folder.png';
|
||||
$sort = 1;
|
||||
} else {
|
||||
|
||||
// Get file extension
|
||||
@@ -89,6 +90,8 @@ class DirectoryLister {
|
||||
} else {
|
||||
$fileIcon = 'blank.png';
|
||||
}
|
||||
|
||||
$sort = 2;
|
||||
}
|
||||
|
||||
if ($file == '..') {
|
||||
@@ -104,7 +107,8 @@ class DirectoryLister {
|
||||
'file_path' => $directoryPath,
|
||||
'file_size' => '-',
|
||||
'mod_time' => date("Y-m-d H:i:s", filemtime($realPath)),
|
||||
'file_icon' => 'back.png'
|
||||
'icon' => 'back.png',
|
||||
'sort' => 0
|
||||
);
|
||||
|
||||
} else {
|
||||
@@ -114,7 +118,8 @@ class DirectoryLister {
|
||||
'file_path' => $relativePath,
|
||||
'file_size' => is_dir($realPath) ? '-' : round(filesize($realPath) / 1024) . 'KB',
|
||||
'mod_time' => date("Y-m-d H:i:s", filemtime($realPath)),
|
||||
'file_icon' => $fileIcon
|
||||
'icon' => $fileIcon,
|
||||
'sort' => $sort
|
||||
);
|
||||
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ body {
|
||||
color: #333;
|
||||
background: #FFF url(../images/bg.png) repeat top left;
|
||||
font-family: arial, sans-serif, serif, helvetica;
|
||||
font-size: .8em;
|
||||
font-size: .85em;
|
||||
}
|
||||
|
||||
#contentWraper {
|
||||
@@ -28,13 +28,15 @@ body {
|
||||
|
||||
#header .fileName {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 3px;
|
||||
overflow: none;
|
||||
width: 501px;
|
||||
width: 496px;
|
||||
}
|
||||
|
||||
#header .fileSize {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 3px;
|
||||
text-align: right;
|
||||
width: 100px;
|
||||
@@ -85,7 +87,6 @@ body {
|
||||
|
||||
#directoryListing .fileIcon {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 3px;
|
||||
margin-right: -19px;
|
||||
width: 16px;
|
||||
@@ -95,10 +96,10 @@ body {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 3px;
|
||||
margin-left: 22px;
|
||||
padding-left: 19px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 485px;
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
#directoryListing .fileSize {
|
||||
|
Reference in New Issue
Block a user