Compare commits

...

10 Commits

Author SHA1 Message Date
broquemonsieur
13cee4ec5d
Merge 577058617f into c5fdd9ea65 2024-08-24 16:10:44 -04:00
broquemonsieur
577058617f Twice 2024-08-13 00:40:48 -07:00
broquemonsieur
5e87b32530 Increase scale 2024-08-13 00:36:54 -07:00
broquemonsieur
270468e2eb Center items 2024-08-13 00:32:50 -07:00
broquemonsieur
a9600c8c7c Asset 2024-08-12 22:51:14 -07:00
broquemonsieur
e9e89a58f7
Merge branch 'iv-org:master' into beautify_404_page 2024-08-11 19:01:47 +00:00
broquemonsieur
f8793c6d9f Restore new line EOF 2024-08-10 23:20:05 -07:00
broquemonsieur
824206612d Add dark light interoperability 2024-08-10 22:59:17 -07:00
broquemonsieur
6044c66407 Set up for theme toggling 2024-08-10 18:37:10 -07:00
broquemonsieur
c6409c77a4 Initial commit 2024-08-09 03:20:02 -07:00
5 changed files with 2548 additions and 1 deletions

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -816,3 +816,9 @@ h1, h2, h3, h4, h5, p,
#download_widget {
width: 100%;
}
/* 404 TV Box */
.error-page {
width: 50%;
height: auto;
}

View File

@ -74,6 +74,8 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce
# Don't show the usual "next steps" widget. The same options are
# 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
@ -85,6 +87,8 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, mess
locale = env.get("preferences").as(Preferences).locale
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"

View File

@ -1,8 +1,23 @@
<%
dark_mode = env.get("preferences").as(Preferences).dark_mode
%>
<% content_for "header" do %>
<title><%= "Error" %> - Invidious</title>
<% end %>
<div class="h-box">
<%= error_message %>
<div style="display: flex; flex-direction: column; align-items: center;">
<%= error_message %>
<% if dark_mode == "dark" %>
<div style="width: 100px; height: auto;">
<img src="/404_tv_box_dark_theme.svg" alt="SVG Image" style="width: 100px; height: auto;">
</div>
<% else %>
<div style="width: 100px; height: auto;">
<img src="/404_tv_box_light_theme.svg" alt="SVG Image" style="width: 100px; height: auto;">
</div>
<% end %>
</div>
<%= next_steps %>
</div>