1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 09:04:02 +02:00

CSS: Dark input fields in dark mode

This commit is contained in:
Jakub Vrana
2025-03-17 07:04:21 +01:00
parent 2bb74e7467
commit 587f6a5375
2 changed files with 3 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
if ($dark !== false) {
echo "<link rel='stylesheet'" . ($dark ? "" : " media='(prefers-color-scheme: dark)'") . " href='../adminer/static/dark.css'>\n";
}
echo "<meta name='color-scheme' content='" . ($dark !== false ? ($dark ? "" : "light ") . "dark" : "") . "'>\n";
// this is matched by compile.php
echo script_src("../adminer/static/functions.js");
echo script_src("static/editing.js");
@@ -45,10 +46,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
foreach ($css as $val) {
echo "<link rel='stylesheet'" . (preg_match('~-dark~', $val) && !$dark ? " media='(prefers-color-scheme: dark)'" : "") . " href='" . h($val) . "'>\n";
}
?>
<body class="<?php echo lang('ltr'); ?> nojs">
<?php
echo "\n<body class='" . lang('ltr') . " nojs'>\n";
$filename = get_temp_dir() . "/adminer.version";
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
$version = unserialize(file_get_contents($filename));