Skip to content

Commit d5dbaf0

Browse files
committed
feat: add error page 404
1 parent 443ef08 commit d5dbaf0

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

config/dev.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ config :cesium_link, CesiumLinkWeb.Endpoint,
2222
http: [ip: {127, 0, 0, 1}, port: 4000],
2323
check_origin: false,
2424
code_reloader: true,
25-
debug_errors: true,
25+
debug_errors: false,
2626
secret_key_base: "6u3rGnb0UXmh9e8TXewRiiEYUFNvzvvgHTrDY0EqxJq7t44sm8gVtVO9+7AfQtQV",
2727
watchers: [
2828
esbuild: {Esbuild, :install_and_run, [:cesium_link, ~w(--sourcemap=inline --watch)]},

lib/cesium_link_web/controllers/error_html.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defmodule CesiumLinkWeb.ErrorHTML do
1313
# * lib/cesium_link_web/controllers/error_html/404.html.heex
1414
# * lib/cesium_link_web/controllers/error_html/500.html.heex
1515
#
16-
# embed_templates "error_html/*"
16+
embed_templates "error_html/*"
1717

1818
# The default is to render a plain text page based on
1919
# the template name. For example, "404.html" becomes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
6+
<title>404</title>
7+
<link rel="stylesheet" href="/assets/app.css"/>
8+
<script defer type="text/javascript" src="/assets/app.js"></script>
9+
</head>
10+
<body>
11+
<main class="flex-auto my-60">
12+
<section class="justify-center flex flex-col items-center w-full">
13+
<a href="/" class="items-center justify-center">
14+
<img class="w-40 my-5" src="/images/cesium.svg" alt="Cesium-Logo"/>
15+
</a>
16+
<p class = "text-center font-medium text-5xl">
17+
404 Page not found
18+
</p>
19+
<p class = "text-center my-3 text-2xl">Oops! Looks like you are lost.</p>
20+
<p class = "text-center my-5 text-lg">Click on the logo to turn back.</p>
21+
</section>
22+
</main>
23+
</body>
24+
</html>
File renamed without changes.

0 commit comments

Comments
 (0)