1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 06:37:33 +02:00

CSS: Add logo

This commit is contained in:
Jakub Vrana
2025-04-04 07:39:08 +02:00
parent 3f6136205d
commit 6e8c89ee71
8 changed files with 12 additions and 4 deletions

View File

@@ -202,8 +202,11 @@ function get_translations($lang) {
function minify_css($file) {
global $project;
if ($project == "editor") {
$file = preg_replace('~.*\.url\(.*~', '', $file);
$file = preg_replace('~.*url\(data:image/gif.*~', '', $file);
}
$file = preg_replace_callback('~url\((\w+\.(gif|png|jpg))\)~', function ($match) {
return "url(data:image/$match[2];base64," . base64_encode(file_get_contents(__DIR__ . "/adminer/static/$match[1]")) . ")"; // we don't have ME in *.css; logo.png is still used for apple-touch-icon
}, $file);
return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
}