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

Do not include compiled logo twice

This commit is contained in:
Jakub Vrana
2025-04-04 17:44:49 +02:00
parent 510cd2e068
commit 01d8fe112c
4 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ class Adminer {
* @return string HTML code * @return string HTML code
*/ */
function name(): string { function name(): string {
return "<a href='https://www.adminer.org/'" . target_blank() . " id='h1'><span id='logo'></span>Adminer</a>"; return "<a href='https://www.adminer.org/'" . target_blank() . " id='h1'><img src='../adminer/static/logo.png' width='24' height='24' alt='' id='logo'>Adminer</a>";
} }
/** Connection parameters /** Connection parameters

View File

@@ -88,7 +88,7 @@ input.wayoff { left: -1000px; position: absolute; }
#lang { position: absolute; top: -2.6em; left: 0; padding: .3em 1em; } #lang { position: absolute; top: -2.6em; left: 0; padding: .3em 1em; }
#menuopen { display: none; } #menuopen { display: none; }
#breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; } #breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
#logo { width: 24px; height: 24px; background-size: cover; display: inline-block; background-image: url(logo.png); margin-bottom: -3px; } #logo { vertical-align: baseline; margin-bottom: -3px; }
#h1 { color: #777; text-decoration: none; font-style: italic; } #h1 { color: #777; text-decoration: none; font-style: italic; }
#version { color: red; } #version { color: red; }
#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; }

View File

@@ -193,7 +193,7 @@ function minify_css($file) {
$file = preg_replace('~.*url\(data:image/gif.*~', '', $file); $file = preg_replace('~.*url\(data:image/gif.*~', '', $file);
} }
$file = preg_replace_callback('~url\((\w+\.(gif|png|jpg))\)~', function ($match) { $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 return "url(data:image/$match[2];base64," . base64_encode(file_get_contents(__DIR__ . "/adminer/static/$match[1]")) . ")"; // we don't have ME in *.css so we can only inline images
}, $file); }, $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)));
} }

View File

@@ -7,7 +7,7 @@ class Adminer {
private $values = array(); private $values = array();
function name() { function name() {
return "<a href='https://www.adminer.org/editor/'" . target_blank() . " id='h1'><span id='logo'></span>" . lang('Editor') . "</a>"; return "<a href='https://www.adminer.org/editor/'" . target_blank() . " id='h1'><img src='../adminer/static/logo.png' width='24' height='24' alt='' id='logo'>" . lang('Editor') . "</a>";
} }
//! driver, ns //! driver, ns