1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

Narrows screens: Move lang and logout under h1

This commit is contained in:
Jakub Vrana
2025-02-23 11:18:28 +01:00
parent 4e6ad13eac
commit 1838df9465
5 changed files with 11 additions and 9 deletions

View File

@@ -955,6 +955,7 @@ class Adminer {
</span> </span>
</h1> </h1>
<?php <?php
switch_lang();
if ($missing == "auth") { if ($missing == "auth") {
$output = ""; $output = "";
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) { foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {

View File

@@ -179,7 +179,10 @@ function page_footer($missing = "") {
?> ?>
</div> </div>
<?php switch_lang(); ?> <div id="menu">
<?php $adminer->navigation($missing); ?>
</div>
<?php if ($missing != "auth") { ?> <?php if ($missing != "auth") { ?>
<form action="" method="post"> <form action="" method="post">
<p class="logout"> <p class="logout">
@@ -189,9 +192,6 @@ function page_footer($missing = "") {
</p> </p>
</form> </form>
<?php } ?> <?php } ?>
<div id="menu">
<?php $adminer->navigation($missing); ?>
</div>
<?php <?php
echo script("setupSubmitHighlight(document);"); echo script("setupSubmitHighlight(document);");
} }

View File

@@ -68,14 +68,14 @@ input.wayoff { left: -1000px; position: absolute; }
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; } .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
.loadmore { margin-left: 1ex; } .loadmore { margin-left: 1ex; }
/* .edit used in designs */ /* .edit used in designs */
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; } #menu { position: absolute; margin: 10px 0 0; top: 2em; left: 0; width: 19em; }
#menu p, #logins, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; } #menu p, #logins, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
#logins li, #tables li { list-style: none; } #logins li, #tables li { list-style: none; }
#dbs { overflow: hidden; } #dbs { overflow: hidden; }
#logins, #tables { white-space: nowrap; overflow: hidden; } #logins, #tables { white-space: nowrap; overflow: hidden; }
#logins a, #tables a, #tables span { background: #fff; } #logins a, #tables a, #tables span { background: #fff; }
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; } #content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; } #lang { position: absolute; top: -2.6em; left: 0; padding: .3em 1em; }
#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; }
#h1 { color: #777; text-decoration: none; font-style: italic; } #h1 { color: #777; text-decoration: none; font-style: italic; }
#version { color: red; } #version { color: red; }
@@ -96,10 +96,10 @@ input.wayoff { left: -1000px; position: absolute; }
@media all and (max-width: 880px) { @media all and (max-width: 880px) {
.pages { left: auto; } .pages { left: auto; }
.logout { position: static; padding: 0 1em; } .logout { position: static; padding: 0 1em 1em; }
#menu { position: static; width: auto; } #menu { position: static; width: auto; }
#content { margin-left: 10px; } #content { margin-left: 10px; }
#lang { position: static; border-top: 1px solid #999; } #lang { position: static; }
#breadcrumb { left: auto; } #breadcrumb { left: auto; }
.rtl .pages { right: auto; } .rtl .pages { right: auto; }
.rtl #content { margin-right: 10px; } .rtl #content { margin-right: 10px; }

View File

@@ -431,7 +431,7 @@ $file = str_replace("\r", "", $file);
if ($_SESSION["lang"]) { if ($_SESSION["lang"]) {
// single language version // single language version
$file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file); $file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])(;\\s*\\?>)?~s", 'remove_lang', $file);
$file = str_replace("<?php switch_lang(); ?>\n", "", $file); $file = str_replace("switch_lang();", "", $file);
$file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file); $file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
} }
$file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file); $file = str_replace('<?php echo script_src("static/editing.js"); ?>' . "\n", "", $file);

View File

@@ -587,6 +587,7 @@ qsl('div').onclick = whisperClick;", "")
</span> </span>
</h1> </h1>
<?php <?php
switch_lang();
if ($missing == "auth") { if ($missing == "auth") {
$first = true; $first = true;
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) { foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {