戒酒的李白

【error.html】优化500页面,直观展示错误信息

@@ -2,46 +2,32 @@ @@ -2,46 +2,32 @@
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">  
6 - <title>Error Page</title> 5 + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6 + <title>错误页面</title>
  7 +
  8 + <link rel="stylesheet" href="/static/css/backend-plugin.min.css">
  9 + <link rel="stylesheet" href="/static/css/backend.css"> </head>
  10 + <body class=" ">
  11 +
  12 +
  13 + <div class="wrapper">
  14 + <div class="mt-5 iq-maintenance">
  15 + <div class="container-fluid p-0">
  16 + <div class="row no-gutters">
  17 + <div class="col-sm-12 text-center">
  18 + <div class="iq-maintenance">
  19 + <img src="/static/picture/maintenance.png" class="img-fluid" alt="">
  20 + <h3 class="mt-4 mb-2">{{ errorMsg }}</h3>
  21 + <p class="mb-2">请回去再次检查问题并且修改问题.</p>
  22 + <p><a href="/user/login" class="btn btn-primary">回到登录页</a></p>
  23 + </div>
  24 + </div>
  25 + </div>
  26 + </div>
  27 + </div>
  28 + </div>
7 29
8 - <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">  
9 - <style>  
10 - body {  
11 - background-color: #f8f9fa;  
12 - color: #343a40;  
13 - }  
14 - .container {  
15 - margin-top: 10%;  
16 - }  
17 - .error-image {  
18 - max-width: 100%;  
19 - height: auto;  
20 - }  
21 - .error-msg {  
22 - font-size: 1.5rem;  
23 - margin-top: 20px;  
24 - }  
25 - .btn-custom {  
26 - background-color: #6c757d;  
27 - color: #fff;  
28 - margin-top: 20px;  
29 - }  
30 - .btn-custom:hover {  
31 - background-color: #5a6268;  
32 - }  
33 - </style>  
34 - </head>  
35 - <body>  
36 - <div class="container text-center">  
37 - <img src="/static/picture/maintenance.png" class="error-image" alt="Maintenance Image">  
38 - <div class="error-msg">{{ errorMsg }}</div>  
39 - <p>Please go back, check the issue, and fix it.</p>  
40 - <a href="/user/login" class="btn btn-custom">Return to Login Page</a>  
41 - </div> 30 + <!-- Backend Bundle JavaScript -->
42 31
43 - <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>  
44 - <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>  
45 - <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>  
46 </body> 32 </body>
47 -</html> 33 +</html>