mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Schema: Move style to CSS
This commit is contained in:
@@ -50,9 +50,6 @@ if ($_GET["file"] == "favicon.ico") {
|
|||||||
case "down.gif":
|
case "down.gif":
|
||||||
echo compile_file('../adminer/static/down.gif');
|
echo compile_file('../adminer/static/down.gif');
|
||||||
break;
|
break;
|
||||||
case "arrow.gif":
|
|
||||||
echo compile_file('../adminer/static/arrow.gif');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
|
@@ -86,8 +86,7 @@ foreach ($schema as $name => $table) {
|
|||||||
$left1 = $left - $table_pos[$name][1];
|
$left1 = $left - $table_pos[$name][1];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($columns as $target) {
|
foreach ($columns as $target) {
|
||||||
echo "\n<div class='references' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "'"
|
echo "\n<div class='references arrow' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em;'>"
|
||||||
. " style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em; height: 1.25em; background: url(../adminer/static/arrow.gif) no-repeat right center;'>"
|
|
||||||
. "<div style='height: .5em; border-bottom: 1px solid gray; width: " . (-$left1) . "em;'></div>"
|
. "<div style='height: .5em; border-bottom: 1px solid gray; width: " . (-$left1) . "em;'></div>"
|
||||||
. "</div>"
|
. "</div>"
|
||||||
;
|
;
|
||||||
|
@@ -86,6 +86,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
|||||||
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
|
#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 .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
||||||
#schema .references { 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; }
|
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
||||||
|
|
||||||
.rtl h2 { margin: 0 -18px 20px 0; }
|
.rtl h2 { margin: 0 -18px 20px 0; }
|
||||||
|
@@ -202,6 +202,9 @@ if (!$translations) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function minify_css($file) {
|
function minify_css($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)));
|
return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user