Additional style tweaks to make things work better

This commit is contained in:
Chris Kankiewicz
2010-11-28 22:52:48 -07:00
parent 3d0a99b9d2
commit b9a1e95a51
3 changed files with 15 additions and 9 deletions

View File

@@ -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>

View File

@@ -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
);
}

View File

@@ -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 {