mirror of
https://github.com/joppuyo/nice-nginx-error-page.git
synced 2026-03-08 00:42:22 +00:00
Initial commit
This commit is contained in:
184
templates/custom-error-page/custom-error-page.css
Normal file
184
templates/custom-error-page/custom-error-page.css
Normal file
@@ -0,0 +1,184 @@
|
||||
/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */
|
||||
html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{height:auto;max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
||||
|
||||
@font-face {
|
||||
font-family: "Inter var";
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: normal;
|
||||
font-named-instance: "Regular";
|
||||
src: url("./inter-roman-var.woff2?v=3.19") format("woff2");
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "Inter var", sans-serif;
|
||||
}
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.container {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.left,
|
||||
.right {
|
||||
width: 50%;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.left,
|
||||
.right {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.left {
|
||||
background-color: #f44336;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.left svg {
|
||||
min-height: 200px;
|
||||
}
|
||||
}
|
||||
.left svg {
|
||||
width: 300px;
|
||||
height: auto;
|
||||
opacity: 0.3;
|
||||
margin-right: 40px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.left svg {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text-container {
|
||||
width: 500px;
|
||||
margin-right: 40px;
|
||||
margin-left: 40px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.text-container *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.code {
|
||||
font-size: 75px;
|
||||
margin-bottom: 40px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* https://seek-oss.github.io/capsize/ */
|
||||
|
||||
.code::before {
|
||||
content: "";
|
||||
margin-bottom: -0.2597em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.code::after {
|
||||
content: "";
|
||||
margin-top: -0.287em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
@media (max-width: 1300px) {
|
||||
.code {
|
||||
font-size: 75px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.code {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
.status {
|
||||
font-size: 38px;
|
||||
margin-bottom: 40px;
|
||||
font-weight: 500;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.status::before {
|
||||
content: "";
|
||||
margin-bottom: -0.2758em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.status::after {
|
||||
content: "";
|
||||
margin-top: -0.3031em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
@media (max-width: 1023px) {
|
||||
.status {
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 18px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
/* https://seek-oss.github.io/capsize/ */
|
||||
|
||||
.description::before {
|
||||
content: "";
|
||||
margin-bottom: -0.3752em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.description::after {
|
||||
content: "";
|
||||
margin-top: -0.4026em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 16px;
|
||||
margin-bottom: 40px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* https://seek-oss.github.io/capsize/ */
|
||||
|
||||
.footer::before {
|
||||
content: "";
|
||||
margin-bottom: -0.3613em;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.footer::after {
|
||||
content: "";
|
||||
margin-top: -0.3887em;
|
||||
display: table;
|
||||
}
|
||||
.button-container {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.button {
|
||||
all: unset;
|
||||
display: inline-block;
|
||||
background-color: #f44336;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
border-radius: 3px;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
61
templates/custom-error-page/custom-error-page.html
Normal file
61
templates/custom-error-page/custom-error-page.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title> <!--# echo var="status" default="" --> – <!--# echo var="status_text" default="Something went wrong" --> </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="./custom-error-page.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="left">
|
||||
<svg
|
||||
width="300"
|
||||
height="300"
|
||||
viewBox="0 0 300 300"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M153.01 33.2a6 6 0 0 1 2.18 2.18l129.7 223.61a6 6 0 0 1-5.19 9.01H20.3a6 6 0 0 1-5.2-9.01L144.8 35.38a6 6 0 0 1 8.21-2.18ZM150.02 204a14.01 14.01 0 1 0-.02 28.02 14.01 14.01 0 0 0 .02-28.02Zm4.8-89h-9.65a6 6 0 0 0-6 6.17l1.5 52a6 6 0 0 0 6 5.83h6.67a6 6 0 0 0 6-5.83l1.48-52a6 6 0 0 0-6-6.17Z"
|
||||
fill="#000"
|
||||
fill-rule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="text-container">
|
||||
<h1 class="code">
|
||||
<!--# echo var="status" -->
|
||||
</h1>
|
||||
<div class="status">
|
||||
<!--# echo var="status_text" default="Something went wrong" -->
|
||||
</div>
|
||||
<div class="description">
|
||||
<!--# if expr="$status = 404" -->
|
||||
The page you were looking for may have been deleted or
|
||||
moved.
|
||||
<!--# elif expr="$status = /4\d\d/" -->
|
||||
Your browser sent a request that the server was unable
|
||||
to process.
|
||||
<!--# elif expr="$status = /5\d\d/" -->
|
||||
The server encountered an error and could not complete
|
||||
your request. Please try again later.
|
||||
<!--# else -->
|
||||
Something went wrong while trying to display this page.
|
||||
Please try again later.
|
||||
<!--# endif -->
|
||||
</div>
|
||||
<!--# if expr="$status = 404" -->
|
||||
<div class="button-container">
|
||||
<a href="/" class="button">Back to home</a>
|
||||
</div>
|
||||
<!--# endif -->
|
||||
<div class="footer">
|
||||
Nginx at <!--# echo var="host" default="localhost" -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
templates/custom-error-page/inter-roman-var.woff2
Normal file
BIN
templates/custom-error-page/inter-roman-var.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user