Skip to content

Commit dfcb140

Browse files
committed
feat: add 404 error page
1 parent a923a8a commit dfcb140

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8"/>
5-
<meta name="viewport" content="width=device-width, initial-scale=1"/>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<title>404</title>
7-
<link rel="stylesheet" href="/assets/app.css"/>
8-
<script defer type="text/javascript" src="/assets/app.js"></script>
7+
<link rel="stylesheet" href="/assets/app.css" />
8+
<script defer type="text/javascript" src="/assets/app.js">
9+
</script>
910
</head>
1011
<body>
11-
<main class="flex-auto my-60">
12-
<section class="justify-center flex flex-col items-center w-full">
12+
<main class="my-60 flex-auto">
13+
<section class="flex w-full flex-col items-center justify-center">
1314
<a href="/" class="items-center justify-center">
14-
<img class="w-40 my-5" src="/images/cesium.svg" alt="Cesium-Logo"/>
15+
<img class="my-5 w-40" src="/images/cesium.svg" alt="Cesium-Logo" />
1516
</a>
16-
<p class = "text-center font-medium text-5xl">
17+
<p class="text-center text-5xl font-medium">
1718
404 Page not found
1819
</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>
20+
<p class="my-3 text-center text-2xl">Oops! Looks like you are lost.</p>
21+
<p class="my-5 text-center text-lg">Click on the logo to turn back.</p>
2122
</section>
2223
</main>
23-
</body>
24-
</html>
24+
</body>
25+
</html>

test/cesium_link_web/controllers/error_html_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule CesiumLinkWeb.ErrorHTMLTest do
55
import Phoenix.Template
66

77
test "renders 404.html" do
8-
assert render_to_string(CesiumLinkWeb.ErrorHTML, "404", "html", []) == "Not Found"
8+
assert render_to_string(CesiumLinkWeb.ErrorHTML, "404", "html", []) =~ "404 Page not found"
99
end
1010

1111
test "renders 500.html" do

0 commit comments

Comments
 (0)