Further improve maintenance mode

This commit is contained in:
DariusIII
2017-08-10 11:51:03 +02:00
parent 317185c4b1
commit 8283cff56b
3 changed files with 47 additions and 46 deletions
+2
View File
@@ -1,3 +1,5 @@
2017-08-10 DariusIII
* Chg: Further improve maintenance mode
2017-08-09 DariusIII
* Chg: Add maintenance mode with custom page displayed
* Chg: Add UserRequest model and use it in Users class
+2 -46
View File
@@ -306,53 +306,9 @@ class BasePage
* Show maintenance page.
*
*/
public function showMaintenance(): void
public function showMaintenance()
{
header('HTTP/1.1 503 Service Temporarily Unavailable');
die('
<html>
<head>
<title>Be right back.</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: \'Lato\', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">We are currently performing maintenance. Please try again later!</div>
</div>
</div>
</body>
</html>'
);
die(response()->view('errors.503', [], 503));
}
/**
+43
View File
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Be right back.</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: \'Lato\', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">We are currently performing maintenance. Please try again later!</div>
</div>
</div>
</body>
</html>