Add Darkmode to login page

- add fixes to dark-patch.css
- apple darkmode to login page
This commit is contained in:
leiweibau
2022-07-23 13:38:56 +02:00
parent 6f734c789f
commit 25a4658a26
2 changed files with 29 additions and 14 deletions

View File

@@ -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;
}

View File

@@ -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)
<!-- iCheck -->
<link rel="stylesheet" href="lib/AdminLTE/plugins/iCheck/square/blue.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Dark-Mode Patch -->
<?php
if ($ENABLED_DARKMODE === True) {
echo '<link rel="stylesheet" href="css/dark-patch.css">';
$BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/boxed-bg-dark.png\');"';
} else { $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/background.png\');"';}
?>
<link rel="stylesheet" href="/front/css/offline-font.css">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="/pialert/index2.php"><b>Pi.</b>Alert</a>
<a href="/pialert/index2.php">Pi.<b>Alert</b></a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
@@ -98,14 +100,14 @@ if ($_SESSION["login"] != 1)
</div>
<!-- /.login-box-body -->
<div class="box-body" style="margin-top: 50px;">
<div class="callout callout-danger">
<h4>Password Alert!</h4>
<p><?php echo $login_info;?></p>
<p>To set a new password run:<br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh yournewpassword</span><br>in the config folder.</p>
<div class="box-body" style="margin-top: 50px;">
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i>Password Alert!</h4>
<p><?php echo $login_info;?></p>
<p>To set a new password run:<br><span style="border: solid 1px yellow; padding: 2px;">./reset_password.sh yournewpassword</span><br>in the config folder.</p>
</div>
</div>
</div>
</div>