diff --git a/assets/css/app.css b/assets/css/app.css
index 298eaf64a..11a395188 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -22,6 +22,10 @@
@apply text-indigo-600 bg-transparent border border-indigo-600;
}
+.button-outline:hover {
+ @apply text-white;
+}
+
.button-sm {
@apply px-4 py-2 text-sm;
}
diff --git a/lib/plausible_web/templates/error/404_error.html.eex b/lib/plausible_web/templates/error/404_error.html.eex
new file mode 100644
index 000000000..648ca1477
--- /dev/null
+++ b/lib/plausible_web/templates/error/404_error.html.eex
@@ -0,0 +1,9 @@
+
+
<%= @status %>
+
Oops! There's nothing here
+
Trying to access your dashboard? You may need to log in again to see it
+
+ <%= link("Login", to: Routes.auth_path(@conn, :login_form), class: "button") %>
+ <%= link("Go to homepage", to: PlausibleWeb.LayoutView.home_dest(@conn), class: "button button-outline ml-2") %>
+
+
diff --git a/lib/plausible_web/views/error_view.ex b/lib/plausible_web/views/error_view.ex
index 2a2f8b78b..1299731c1 100644
--- a/lib/plausible_web/views/error_view.ex
+++ b/lib/plausible_web/views/error_view.ex
@@ -14,7 +14,7 @@ defmodule PlausibleWeb.ErrorView do
|> Map.put(:status, 404)
|> Map.put_new(:message, "Oops! There's nothing here")
- render("generic_error.html", assigns)
+ render("404_error.html", assigns)
end
def render(<<"5", _error_5xx::binary-size(2), ".html">>, assigns) do
diff --git a/test/plausible_web/controllers/stats_controller_test.exs b/test/plausible_web/controllers/stats_controller_test.exs
index 70330665c..132072759 100644
--- a/test/plausible_web/controllers/stats_controller_test.exs
+++ b/test/plausible_web/controllers/stats_controller_test.exs
@@ -45,7 +45,7 @@ defmodule PlausibleWeb.StatsControllerTest do
test "can not view stats of a private website", %{conn: conn} do
conn = get(conn, "/test-site.com")
- assert html_response(conn, 404) =~ "There's nothing here"
+ assert html_response(conn, 404) =~ "There's nothing here"
end
end
@@ -67,7 +67,7 @@ defmodule PlausibleWeb.StatsControllerTest do
test "can not view stats of someone else's website", %{conn: conn} do
site = insert(:site)
conn = get(conn, "/" <> site.domain)
- assert html_response(conn, 404) =~ "There's nothing here"
+ assert html_response(conn, 404) =~ "There's nothing here"
end
end