diff --git a/Public/css/404style.css b/Public/css/404style.css new file mode 100644 index 0000000..393507b --- /dev/null +++ b/Public/css/404style.css @@ -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; + } +} diff --git a/Public/img/bg.jpg b/Public/img/bg.jpg new file mode 100644 index 0000000..372f856 Binary files /dev/null and b/Public/img/bg.jpg differ diff --git a/Resources/Views/404.leaf b/Resources/Views/404.leaf new file mode 100644 index 0000000..bea6a0a --- /dev/null +++ b/Resources/Views/404.leaf @@ -0,0 +1,42 @@ + + + + + + + + + + You went looking for this + + + + + + + + + + + + + + + +
+
+
+

Oops!

+
+

404 - Page not found

+

The page you are looking for might have been removed had its name changed or is temporarily unavailable.

+ Home +
+
+ + + + diff --git a/Sources/App/routes.swift b/Sources/App/routes.swift index 4dbfa94..f22e6a4 100644 --- a/Sources/App/routes.swift +++ b/Sources/App/routes.swift @@ -2,13 +2,16 @@ import Vapor // Register your application's routes here. public func routes(_ router: Router) throws { - router.get("/") { request in + router.get("") { request in return try request.view().render("home") } - router.get("/index.html") { request in + router.get("index.html") { request in return try request.view().render("home") } - router.get("/privacy") { request in + router.get("privacy") { request in return try request.view().render("privacy") } + router.get("404") { request in + return try request.view().render("404") + } }