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 From 9b4cb4bb11ade21b68cdc3dabb3e24be4e9d0fe2 Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sat, 12 Dec 2015 14:30:38 +0000 Subject: Remove local debug sprite url and replace with relative path to sprite --- css/sprite.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/sprite.css b/css/sprite.css index 28f0ce0..51f007e 100644 --- a/css/sprite.css +++ b/css/sprite.css @@ -2,7 +2,7 @@ .icon { display: inline-block; - background: url('http://localhost:9991/images/sprite.gif') no-repeat; + background: url('images/sprite.gif') no-repeat; overflow: hidden; text-indent: -9999px; text-align: left; -- cgit v1.2.3 From 5dcbc23baba2b7133439bba27f333f6003d75c3f Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Sat, 12 Dec 2015 14:41:02 +0000 Subject: Fix missing / in css --- config.php | 21 +++++++++++++++++++++ css/sprite.css | 2 +- test | 0 test.txt | 0 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 config.php create mode 100644 test create mode 100644 test.txt diff --git a/config.php b/config.php new file mode 100644 index 0000000..1557b65 --- /dev/null +++ b/config.php @@ -0,0 +1,21 @@ + diff --git a/css/sprite.css b/css/sprite.css index 51f007e..c594663 100644 --- a/css/sprite.css +++ b/css/sprite.css @@ -2,7 +2,7 @@ .icon { display: inline-block; - background: url('images/sprite.gif') no-repeat; + background: url('/images/sprite.gif') no-repeat; overflow: hidden; text-indent: -9999px; text-align: left; diff --git a/test b/test new file mode 100644 index 0000000..e69de29 diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 72b5322b3de8c87246aa6a2c6f137116d492c26d Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Sat, 12 Dec 2015 14:43:00 +0000 Subject: Update example config for git, css and icons --- config.php.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.php.example b/config.php.example index e45ff35..59ddcf9 100644 --- a/config.php.example +++ b/config.php.example @@ -17,5 +17,6 @@ $headerfile = "upload.html"; # An array of filenames to omit from the index - $indexignore = array(".htaccess", "config.php", "index.php", "upload_file.php", "upload.html"); + $indexignore = array(".htaccess", "config.php", "index.php", "upload_file.php", "upload.html", "css", "icons", ".git"); + ?> -- cgit v1.2.3 From 2f3630cb838872b79e5f59dd3022fdfde6c7566c Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Sat, 12 Dec 2015 14:45:34 +0000 Subject: Add config example to the list of ignored files --- config.php.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.php.example b/config.php.example index 59ddcf9..4c46215 100644 --- a/config.php.example +++ b/config.php.example @@ -17,6 +17,6 @@ $headerfile = "upload.html"; # An array of filenames to omit from the index - $indexignore = array(".htaccess", "config.php", "index.php", "upload_file.php", "upload.html", "css", "icons", ".git"); + $indexignore = array(".htaccess", "config.php", "index.php", "upload_file.php", "upload.html", "css", "icons", ".git", "config.php.example"); ?> -- cgit v1.2.3 From b9c99951aa54368bc09904311197ece121dc4130 Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Sat, 12 Dec 2015 15:07:29 +0000 Subject: Removed incorrectly added files --- config.php | 21 --------------------- test | 0 test.txt | 0 3 files changed, 21 deletions(-) delete mode 100644 config.php delete mode 100644 test delete mode 100644 test.txt diff --git a/config.php b/config.php deleted file mode 100644 index 1557b65..0000000 --- a/config.php +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/test b/test deleted file mode 100644 index e69de29..0000000 diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3