404
This commit is contained in:
96
Public/css/404style.css
Normal file
96
Public/css/404style.css
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
* {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#notfound {
|
||||||
|
position: relative;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
#notfound .notfound {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translate(-50%, -50%);
|
||||||
|
-ms-transform: translate(-50%, -50%);
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.notfound {
|
||||||
|
max-width: 410px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notfound .notfound-404 {
|
||||||
|
height: 280px;
|
||||||
|
position: relative;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notfound .notfound-404 h1 {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-size: 230px;
|
||||||
|
margin: 0px;
|
||||||
|
font-weight: 900;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
-webkit-transform: translateX(-50%);
|
||||||
|
-ms-transform: translateX(-50%);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: url('../img/bg.jpg') no-repeat;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.notfound h2 {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
color: #000;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notfound p {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
color: #000;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notfound a {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: #0046d5;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 15px 30px;
|
||||||
|
border-radius: 40px;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
-webkit-box-shadow: 0px 4px 15px -5px #0046d5;
|
||||||
|
box-shadow: 0px 4px 15px -5px #0046d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.notfound .notfound-404 {
|
||||||
|
height: 142px;
|
||||||
|
}
|
||||||
|
.notfound .notfound-404 h1 {
|
||||||
|
font-size: 112px;
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Public/img/bg.jpg
Normal file
BIN
Public/img/bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 497 KiB |
42
Resources/Views/404.leaf
Normal file
42
Resources/Views/404.leaf
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||||
|
|
||||||
|
<title>You went looking for this</title>
|
||||||
|
|
||||||
|
<!-- Google font -->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,900" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Custom stlylesheet -->
|
||||||
|
<link type="text/css" rel="stylesheet" href="css/404style.css" />
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js for 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]-->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="notfound">
|
||||||
|
<div class="notfound">
|
||||||
|
<div class="notfound-404">
|
||||||
|
<h1>Oops!</h1>
|
||||||
|
</div>
|
||||||
|
<h2>404 - Page not found</h2>
|
||||||
|
<p>The page you are looking for might have been removed had its name changed or is temporarily unavailable.</p>
|
||||||
|
<a href="https://smpark.in">Home</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -2,13 +2,16 @@ import Vapor
|
|||||||
|
|
||||||
// Register your application's routes here.
|
// Register your application's routes here.
|
||||||
public func routes(_ router: Router) throws {
|
public func routes(_ router: Router) throws {
|
||||||
router.get("/") { request in
|
router.get("") { request in
|
||||||
return try request.view().render("home")
|
return try request.view().render("home")
|
||||||
}
|
}
|
||||||
router.get("/index.html") { request in
|
router.get("index.html") { request in
|
||||||
return try request.view().render("home")
|
return try request.view().render("home")
|
||||||
}
|
}
|
||||||
router.get("/privacy") { request in
|
router.get("privacy") { request in
|
||||||
return try request.view().render("privacy")
|
return try request.view().render("privacy")
|
||||||
}
|
}
|
||||||
|
router.get("404") { request in
|
||||||
|
return try request.view().render("404")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user