diff options
-rw-r--r-- | css/sprite.css | 86 | ||||
-rw-r--r-- | images/sprite.gif | bin | 0 -> 1349 bytes | |||
-rw-r--r-- | index.php | 6 |
3 files changed, 89 insertions, 3 deletions
diff --git a/css/sprite.css b/css/sprite.css new file mode 100644 index 0000000..28f0ce0 --- /dev/null +++ b/css/sprite.css @@ -0,0 +1,86 @@ +/* Generated by http://css.spritegen.com CSS Sprite Generator */ + +.icon { + display: inline-block; + background: url('http://localhost:9991/images/sprite.gif') no-repeat; + overflow: hidden; + text-indent: -9999px; + text-align: left; + margin-right: 10px; +} + +.icon.iconbinary { + background-position: -0px -0px; + width: 20px; + height: 22px; +} +.icon.iconblank { + background-position: -20px -0px; + width: 20px; + height: 22px; +} +.icon.iconc { + background-position: -40px -0px; + width: 20px; + height: 22px; +} +.icon.iconcompressed { + background-position: -0px -22px; + width: 20px; + height: 22px; +} +.icon.iconimage2 { + background-position: -20px -22px; + width: 20px; + height: 22px; +} +.icon.iconlayout { + background-position: -40px -22px; + width: 20px; + height: 22px; +} +.icon.iconmovie { + background-position: -0px -44px; + width: 20px; + height: 22px; +} +.icon.iconpdf { + background-position: -20px -44px; + width: 20px; + height: 22px; +} +.icon.iconps { + background-position: -40px -44px; + width: 20px; + height: 22px; +} +.icon.iconscript { + background-position: -0px -66px; + width: 20px; + height: 22px; +} +.icon.iconsound1 { + background-position: -20px -66px; + width: 20px; + height: 22px; +} +.icon.iconsound2 { + background-position: -40px -66px; + width: 20px; + height: 22px; +} +.icon.icontex { + background-position: -0px -88px; + width: 20px; + height: 22px; +} +.icon.icontext { + background-position: -20px -88px; + width: 20px; + height: 22px; +} +.icon.iconunknown { + background-position: -40px -88px; + width: 20px; + height: 22px; +} diff --git a/images/sprite.gif b/images/sprite.gif Binary files differnew file mode 100644 index 0000000..d42f384 --- /dev/null +++ b/images/sprite.gif @@ -313,6 +313,7 @@ if (!isset($_GET['format']) || $_GET['format'] == "html") { <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> +<link rel="stylesheet" type="text/css" href="css/sprite.css"> <title>Index of /</title> </head> <body> @@ -322,7 +323,7 @@ if ($headerfile) { echo file_get_contents($headerfile); } ?> -<pre><img src="/icons/blank.gif" alt="Icon "> <a href="<?php echo $nameurl; ?>">Name</a> <a href="<?php echo $modifiedurl; ?>">Last modified</a> <a href="<?php echo $sizeurl; ?>">Size</a> <?php echo $signout; ?> +<pre><div class="icon iconblank"></div><a href="<?php echo $nameurl; ?>">Name</a> <a href="<?php echo $modifiedurl; ?>">Last modified</a> <a href="<?php echo $sizeurl; ?>">Size</a> <?php echo $signout; ?> <hr><?php for ($i = 0; $i < count($listing); $i++) { if (strlen($listing[$i]['filename']) > 23) { @@ -336,8 +337,7 @@ for ($i = 0; $i < count($listing); $i++) { for ($j = 0; $j < (24 - strlen($preview)); $j++) { $spaces = $spaces . " "; } - - echo '<img src="/icons/' . $listing[$i]['type'] . '.gif" alt="[IMG]"> <a href="' . rawurlencode($listing[$i]['filename']) . '">' . $preview . "</a>" . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . " " . size_readable($listing[$i]['size'], null, "bi") . " " . "\n"; + echo '<div class="icon icon' . $listing[$i]['type'] . '"></div><a href="' . rawurlencode($listing[$i]['filename']) . '">' . $preview . "</a>" . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . " " . size_readable($listing[$i]['size'], null, "bi") . " " . "\n"; } ?> <hr></pre> |