diff --git a/assets/404_tv_box_light_theme.svg b/assets/404_tv_box_light_theme.svg new file mode 100644 index 00000000..9c2f9705 --- /dev/null +++ b/assets/404_tv_box_light_theme.svg @@ -0,0 +1,1261 @@ + + diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index dc24b173..11eb1421 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -75,7 +75,8 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce # proposed above the error message, just worded differently. next_steps = "" unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg") - + unfound_tv_box_light_theme = File.read("assets/404_tv_box_light_theme.svg") + return templated "error" end @@ -87,6 +88,7 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, mess error_message = translate(locale, message) unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg") + unfound_tv_box_light_theme = File.read("assets/404_tv_box_light_theme.svg") next_steps = error_redirect_helper(env) return templated "error" @@ -199,4 +201,4 @@ def error_redirect_helper(env : HTTP::Server::Context) else return "" end -end +end \ No newline at end of file diff --git a/src/invidious/views/error.ecr b/src/invidious/views/error.ecr index 6cf33f26..ed504c2c 100644 --- a/src/invidious/views/error.ecr +++ b/src/invidious/views/error.ecr @@ -1,11 +1,19 @@ +<% + dark_mode = env.get("preferences").as(Preferences).dark_mode +%> + <% content_for "header" do %>