diff --git a/.gitignore b/.gitignore index f45f04e..2d07c48 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,9 @@ erl_crash.dump # Ignore package tarball (built via "mix hex.build"). katana-*.tar -# Ignore assets that are produced by build tools. +# Ignore assets that are produced by build tools, taking into consideration our images. /priv/static/* +!/priv/static/images/ # Ignore digested assets cache. /priv/static/cache_manifest.json diff --git a/config/dev.exs b/config/dev.exs index d8137a2..0b3f453 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -23,7 +23,7 @@ config :katana, KatanaWeb.Endpoint, http: [ip: {127, 0, 0, 1}, port: 4000], check_origin: false, code_reloader: true, - debug_errors: true, + debug_errors: false, secret_key_base: "Yz7S7zILG5VpjihK8U0LZIcD0wqwDApDxbVm2/rRIevSMEnF/1HLOjeon/WjGMMh", watchers: [vite: {PhoenixVite.Npm, :run, [:vite, ~w(dev)]}], static_url: [host: "localhost", port: 5173] diff --git a/lib/katana_web.ex b/lib/katana_web.ex index 9f2052f..7df6a95 100644 --- a/lib/katana_web.ex +++ b/lib/katana_web.ex @@ -135,6 +135,8 @@ defmodule KatanaWeb do Icon } + import KatanaWeb.Helpers.UrlHelpers + alias Phoenix.LiveView.JS # Routes generation with the ~p sigil diff --git a/lib/katana_web/controllers/error_html.ex b/lib/katana_web/controllers/error_html.ex index f47b7ea..3b07dce 100644 --- a/lib/katana_web/controllers/error_html.ex +++ b/lib/katana_web/controllers/error_html.ex @@ -13,7 +13,7 @@ defmodule KatanaWeb.ErrorHTML do # * lib/katana_web/controllers/error_html/404.html.heex # * lib/katana_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/katana_web/controllers/error_html/404.html.heex b/lib/katana_web/controllers/error_html/404.html.heex new file mode 100644 index 0000000..f59dbac --- /dev/null +++ b/lib/katana_web/controllers/error_html/404.html.heex @@ -0,0 +1,54 @@ + + +
+ + + + <.live_title default="Page Not Found" prefix="Katana · "> + {assigns[:page_title]} + ++ Oops! A página que procuras não existe. +
++ O link pode estar desatualizado ou a página foi movida. +
+ + + +
+ {full_url(@conn)}
+
+