CSS: Dark mode syntax highlighting and adminer-dark.css

This commit is contained in:
Jakub Vrana
2025-03-15 01:49:42 +01:00
parent be0a485b14
commit e3515fd63f
21 changed files with 46 additions and 290 deletions

View File

@@ -11,7 +11,7 @@
class AdminerDotJs {
const FILENAME = "adminer.js";
function head() {
function head($dark = null) {
if (file_exists(self::FILENAME)) {
echo Adminer\script_src(self::FILENAME . "?v=" . crc32(file_get_contents(self::FILENAME))), "\n";
}

View File

@@ -27,7 +27,7 @@ class AdminerEditCalendar {
$this->langPath = $langPath;
}
function head() {
function head($dark = null) {
echo $this->prepend;
if ($this->langPath) {
$lang = Adminer\get_lang();

View File

@@ -162,7 +162,7 @@ class AdminerPlugin extends Adminer\Adminer {
return $this->applyPlugin(__FUNCTION__, $args);
}
function head() {
function head($dark = null) {
$args = func_get_args();
return $this->applyPlugin(__FUNCTION__, $args);
}

View File

@@ -17,7 +17,7 @@ class AdminerTinymce {
$this->path = $path;
}
function head() {
function head($dark = null) {
$lang = Adminer\get_lang();
$lang = ($lang == "zh" ? "zh-cn" : ($lang == "zh-tw" ? "zh" : $lang));
if (!file_exists(dirname($this->path) . "/langs/$lang.js")) {

View File

@@ -8,7 +8,7 @@
*/
class AdminerVersionNoverify {
function head() {
function head($dark = null) {
echo Adminer\script("verifyVersion = function () {};");
}
}

View File

@@ -19,7 +19,7 @@ class AdminerWymeditor {
$this->options = $options;
}
function head() {
function head($dark = null) {
foreach ($this->scripts as $script) {
echo Adminer\script_src($script);
}