From 25a4658a261b048cf86432cc0b92eb4cc9c76a7f Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Sat, 23 Jul 2022 13:38:56 +0200 Subject: [PATCH] Add Darkmode to login page - add fixes to dark-patch.css - apple darkmode to login page --- front/css/dark-patch.css | 13 +++++++++++++ front/index.php | 30 ++++++++++++++++-------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/front/css/dark-patch.css b/front/css/dark-patch.css index f6f77c74..d49882d7 100644 --- a/front/css/dark-patch.css +++ b/front/css/dark-patch.css @@ -654,4 +654,17 @@ input[type="password"]::-webkit-caps-lock-indicator { /* remove white border that appears on mobile screen sizes */ .table-responsive { border: 0px; +} + +.login-page { + background-color: transparent; +} + +.login-logo a { + color: white; +} + +.login-box-body { + color: #bec5cb; + background-color: #272c30; } \ No newline at end of file diff --git a/front/index.php b/front/index.php index 6c4a1c74..29a08607 100644 --- a/front/index.php +++ b/front/index.php @@ -31,6 +31,7 @@ if ($_SESSION["login"] == 1) if ($_SESSION["login"] != 1) { + if (file_exists('../db/setting_darkmode')) {$ENABLED_DARKMODE = True;} if ($Pia_Password == '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92') {$login_info = 'Defaultpassword "123456" is still active';} ?> @@ -56,19 +57,20 @@ if ($_SESSION["login"] != 1) - - - + +'; + $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/boxed-bg-dark.png\');"'; +} else { $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/background.png\');"';} +?>