From e1c818914ea66d04ab2d76f281888232fe5a04b9 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Thu, 1 May 2025 12:14:42 +0300 Subject: [PATCH] Update the style for the error pages. --- .../controllers/error_html.ex | 2 +- .../controllers/error_html/404.html.heex | 49 +++++++++++++++++++ .../controllers/error_html/500.html.heex | 49 +++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 lib/decentralised_book_index_web/controllers/error_html/404.html.heex create mode 100644 lib/decentralised_book_index_web/controllers/error_html/500.html.heex diff --git a/lib/decentralised_book_index_web/controllers/error_html.ex b/lib/decentralised_book_index_web/controllers/error_html.ex index 1692c35..a0eb79f 100644 --- a/lib/decentralised_book_index_web/controllers/error_html.ex +++ b/lib/decentralised_book_index_web/controllers/error_html.ex @@ -13,7 +13,7 @@ defmodule DecentralisedBookIndexWeb.ErrorHTML do # * lib/decentralised_book_index_web/controllers/error_html/404.html.heex # * lib/decentralised_book_index_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 diff --git a/lib/decentralised_book_index_web/controllers/error_html/404.html.heex b/lib/decentralised_book_index_web/controllers/error_html/404.html.heex new file mode 100644 index 0000000..cf78bfc --- /dev/null +++ b/lib/decentralised_book_index_web/controllers/error_html/404.html.heex @@ -0,0 +1,49 @@ + + + + + + + <.live_title default="DecentralisedBookIndex" suffix=" · Page not found"> + {assigns[:page_title]} + + + + + +
+ <.partial_navbar page_title="404" current_user={assigns[:current_user]} /> +
+ +
+
+ <.flash_group flash={@flash} /> + +
+
+
+

+ 404 +

+

+ Something's missing. +

+

+ Sorry, we can't find that page. +

+ + Go to books + +
+
+
+
+
+ + <.partial_footer /> + + diff --git a/lib/decentralised_book_index_web/controllers/error_html/500.html.heex b/lib/decentralised_book_index_web/controllers/error_html/500.html.heex new file mode 100644 index 0000000..cac21b2 --- /dev/null +++ b/lib/decentralised_book_index_web/controllers/error_html/500.html.heex @@ -0,0 +1,49 @@ + + + + + + + <.live_title default="DecentralisedBookIndex" suffix=" · Something went wrong"> + {assigns[:page_title]} + + + + + +
+ <.partial_navbar page_title="505" current_user={assigns[:current_user]} /> +
+ +
+
+ <.flash_group flash={@flash} /> + +
+
+
+

+ 500 +

+

+ Something's went wrong. +

+

+ Try to refresh the page. Feel free to contact us if the problem persists. +

+ + Go to books + +
+
+
+
+
+ + <.partial_footer /> + +