]> git.joonet.de Git - adminer.git/commitdiff
Inline GIF to CSS
authorJakub Vrana <jakub@vrana.cz>
Sat, 29 Mar 2025 07:44:56 +0000 (08:44 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 29 Mar 2025 07:49:51 +0000 (08:49 +0100)
adminer/static/arrow.gif [deleted file]
adminer/static/cross.gif [deleted file]
adminer/static/default.css
adminer/static/down.gif [deleted file]
adminer/static/plus.gif [deleted file]
adminer/static/up.gif [deleted file]
compile.php

diff --git a/adminer/static/arrow.gif b/adminer/static/arrow.gif
deleted file mode 100644 (file)
index d99badb..0000000
Binary files a/adminer/static/arrow.gif and /dev/null differ
diff --git a/adminer/static/cross.gif b/adminer/static/cross.gif
deleted file mode 100644 (file)
index 7031822..0000000
Binary files a/adminer/static/cross.gif and /dev/null differ
index 8bb4ab04f289552dd2ccdcaeaaa9d1c21316fdf0..71d468408476a532cfe245a9bc2ea4ad94df0179 100644 (file)
@@ -64,10 +64,6 @@ input.wayoff { left: -1000px; position: absolute; }
 .icon { width: 18px; height: 18px; background-color: navy; border: 0; vertical-align: middle; }
 .icon span { display: none; }
 .icon:hover { background-color: red; }
-.icon-up { background-image: url(up.gif); }
-.icon-down { background-image: url(down.gif); }
-.icon-plus { background-image: url(plus.gif); }
-.icon-cross { background-image: url(cross.gif); }
 .size { width: 7ex; }
 .help { cursor: help; }
 .footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
@@ -91,9 +87,15 @@ input.wayoff { left: -1000px; position: absolute; }
 #schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
 #schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
 #schema .references { position: absolute; }
-#schema .arrow { height: 1.25em; background: url(arrow.gif) no-repeat right center; }
 #help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
 
+/* inlined here and not in compile.php because otherwise the development version flickers a little bit when loading the images */
+.icon-up { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIghI+py+0PTQhRTgrvfRP0nmEVOIoReZphxbauAMfyHBcAOw==); }
+.icon-down { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIghI+py+0PTQjxzCopvltX/lyix0wm2ZwdxraVAMfyHBcAOw==); }
+.icon-plus { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIhhI+py+0PTQjxzCopvm/6rykgCHGVGaFliLXuI8TyTMsFADs=); }
+.icon-cross { background-image: url(data:image/gif;base64,R0lGODlhEgASAIEAMe7u7gAAgJmZmQAAACH5BAEAAAEALAAAAAASABIAAQIjhI+py+0PIwph1kZvfnnDLoFfd2GU4THnsUruC0fCTNc2XQAAOw==); }
+#schema .arrow { height: 1.25em; background: url(data:image/gif;base64,R0lGODlhCAAKAIAAAICAgP///yH5BAEAAAEALAAAAAAIAAoAAAIPBIJplrGLnpQRqtOy3rsAADs=) no-repeat right center; }
+
 .rtl h2 { margin: 0 -18px 20px 0; }
 .rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
 .rtl .logout { left: 0; right: auto; }
diff --git a/adminer/static/down.gif b/adminer/static/down.gif
deleted file mode 100644 (file)
index 70113bc..0000000
Binary files a/adminer/static/down.gif and /dev/null differ
diff --git a/adminer/static/plus.gif b/adminer/static/plus.gif
deleted file mode 100644 (file)
index a15bc8c..0000000
Binary files a/adminer/static/plus.gif and /dev/null differ
diff --git a/adminer/static/up.gif b/adminer/static/up.gif
deleted file mode 100644 (file)
index d37ffe4..0000000
Binary files a/adminer/static/up.gif and /dev/null differ
index 66f8445bed02d9e21e9bbc04937ac7558aaa4cd4..cfa606f822a4eaa0224b4ecd2340824a8f47a0a1 100755 (executable)
@@ -204,11 +204,8 @@ if (!$translations) {
 function minify_css($file) {
        global $project;
        if ($project == "editor") {
-               $file = preg_replace('~.*\.gif.*~', '', $file);
+               $file = preg_replace('~.*\.url\(.*~', '', $file);
        }
-       $file = preg_replace_callback('~url\((\w+\.(gif))\)~', function ($match) {
-               return "url(data:image/$match[2];base64," . base64_encode(file_get_contents(__DIR__ . "/adminer/static/$match[1]")) . ")";
-       }, $file);
        return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
 }