]> git.joonet.de Git - adminer.git/commitdiff
Do not include compiled logo twice
authorJakub Vrana <jakub@vrana.cz>
Fri, 4 Apr 2025 15:44:49 +0000 (17:44 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 4 Apr 2025 15:44:58 +0000 (17:44 +0200)
adminer/include/adminer.inc.php
adminer/static/default.css
compile.php
editor/include/adminer.inc.php

index aaceecef46f102eefb5df62984a258b37bfe4a53..5a0479fe230e63f1c50396c231f3c68f6235e433 100644 (file)
@@ -12,7 +12,7 @@ class Adminer {
        * @return string HTML code
        */
        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
index 6c5a8ce00e41cc0b2d10346cab8b9fc0b59279ca..f41a822ecde3587f527374259cbebedf8d9f9b18 100644 (file)
@@ -88,7 +88,7 @@ input.wayoff { left: -1000px; position: absolute; }
 #lang { position: absolute; top: -2.6em; left: 0; padding: .3em 1em; }
 #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; }
-#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; }
 #version { color: red; }
 #schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
index e7a79d186ba09372b20c5f6fe83bd4d0acd6dd89..74de76d1711ebf85de690e30e31cd58444db324c 100755 (executable)
@@ -193,7 +193,7 @@ function minify_css($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
+               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);
        return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
 }
index e765320288db7461f9463f41d7e1146d1e3dbb86..943e5b68d67aaa83544ecb681fb8d4671c61e425 100644 (file)
@@ -7,7 +7,7 @@ class Adminer {
        private $values = array();
 
        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