Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cesium_link_web/controllers/error_html.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule CesiumLinkWeb.ErrorHTML do
# * lib/cesium_link_web/controllers/error_html/404.html.heex
# * lib/cesium_link_web/controllers/error_html/500.html.heex
#
# embed_templates "error_html/*"
embed_templates "error_html/*"

# The default is to render a plain text page based on
# the template name. For example, "404.html" becomes
Expand Down
25 changes: 25 additions & 0 deletions lib/cesium_link_web/controllers/error_html/404.html.heex
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>404</title>
<link rel="stylesheet" href="/assets/app.css" />
<script defer type="text/javascript" src="/assets/app.js">
</script>
</head>
<body>
<main class="my-60 flex-auto">
<section class="flex w-full flex-col items-center justify-center">
<a href="/" class="items-center justify-center">
<img class="my-5 w-40" src="/images/cesium.svg" alt="cesium-logo" />
</a>
<p class="text-center text-5xl font-medium">
404 Page Not Found
</p>
<p class="my-3 text-center text-2xl">Oops! Looks like you are lost.</p>
<p class="my-5 text-center text-lg">Click on the logo to return home</p>
</section>
</main>
</body>
</html>
2 changes: 1 addition & 1 deletion test/cesium_link_web/controllers/error_html_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule CesiumLinkWeb.ErrorHTMLTest do
import Phoenix.Template

test "renders 404.html" do
assert render_to_string(CesiumLinkWeb.ErrorHTML, "404", "html", []) == "Not Found"
assert render_to_string(CesiumLinkWeb.ErrorHTML, "404", "html", []) =~ "404 Page Not Found"
end

test "renders 500.html" do
Expand Down