From 890655aedd751f6d4f426f320f156077acee3aaa Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Fri, 11 Dec 2015 12:12:13 +0000 Subject: Add a sprite for less requests --- css/sprite.css | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ images/sprite.gif | Bin 0 -> 1349 bytes index.php | 6 ++-- 3 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 css/sprite.css create mode 100644 images/sprite.gif 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 new file mode 100644 index 0000000..d42f384 Binary files /dev/null and b/images/sprite.gif differ diff --git a/index.php b/index.php index dd34a1c..c229199 100644 --- a/index.php +++ b/index.php @@ -313,6 +313,7 @@ if (!isset($_GET['format']) || $_GET['format'] == "html") { + Index of / @@ -322,7 +323,7 @@ if ($headerfile) { echo file_get_contents($headerfile); } ?> -
Icon  Name                    Last modified      Size        
+
Name Last modified Size
23) { @@ -336,8 +337,7 @@ for ($i = 0; $i < count($listing); $i++) { for ($j = 0; $j < (24 - strlen($preview)); $j++) { $spaces = $spaces . " "; } - - echo '[IMG] ' . $preview . "" . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . " " . size_readable($listing[$i]['size'], null, "bi") . " " . "\n"; + echo '
' . $preview . "" . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . " " . size_readable($listing[$i]['size'], null, "bi") . " " . "\n"; } ?>
-- cgit v1.2.3