From eb6c2659c877b927d5461d9de309dd16e8ae8155 Mon Sep 17 00:00:00 2001
From: Thomas Lange <code@nerdmind.de>
Date: Mon, 5 Jul 2021 21:42:20 +0200
Subject: Add dark color mode for admin theme

This commit adds a dark color mode for the admin theme. The dark color
mode can be enabled/disabled by clicking the hyperlink in the footer.

It is not perfect yet (it uses cookies and needs a full page reload),
but it works just fine for the moment. Hope your eyes can enjoy it!
---
 theme/admin/html/migration.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'theme/admin/html/migration.php')

diff --git a/theme/admin/html/migration.php b/theme/admin/html/migration.php
index 14405c4..1b5be2c 100644
--- a/theme/admin/html/migration.php
+++ b/theme/admin/html/migration.php
@@ -1,10 +1,11 @@
+<?php $theme = isset($_COOKIE['dark_mode']) ? 'dark' : 'main'; ?>
 <!DOCTYPE html>
 <html lang="<?=$BLOGMETA['LANG']?>">
 <head>
 	<meta charset="UTF-8" />
 	<meta name="referrer" content="origin-when-crossorigin" />
 	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/css/main.css')?>" />
+	<link rel="stylesheet" href="<?=Application::getTemplateURL("rsrc/css/$theme.css")?>" />
 	<title><?=$Language->text('maintenance_mode')?></title>
 </head>
 <body>
-- 
cgit v1.2.3