mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-26 23:47:25 +00:00
Add dark light interoperability
This commit is contained in:
parent
6044c66407
commit
824206612d
1261
assets/404_tv_box_light_theme.svg
Normal file
1261
assets/404_tv_box_light_theme.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 38 KiB |
@ -75,6 +75,7 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce
|
|||||||
# proposed above the error message, just worded differently.
|
# proposed above the error message, just worded differently.
|
||||||
next_steps = ""
|
next_steps = ""
|
||||||
unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg")
|
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"
|
return templated "error"
|
||||||
end
|
end
|
||||||
@ -87,6 +88,7 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, mess
|
|||||||
|
|
||||||
error_message = translate(locale, message)
|
error_message = translate(locale, message)
|
||||||
unfound_tv_box_dark_theme = File.read("assets/404_tv_box_dark_theme.svg")
|
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)
|
next_steps = error_redirect_helper(env)
|
||||||
|
|
||||||
return templated "error"
|
return templated "error"
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
|
<%
|
||||||
|
dark_mode = env.get("preferences").as(Preferences).dark_mode
|
||||||
|
%>
|
||||||
|
|
||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= "Error" %> - Invidious</title>
|
<title><%= "Error" %> - Invidious</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<a id="error-parent">
|
<div style="display: flex; flex-direction: column;">
|
||||||
<%= error_message %>
|
<%= error_message %>
|
||||||
</a>
|
<% if dark_mode == "dark" %>
|
||||||
<%= unfound_tv_box_dark_theme %>
|
<%= unfound_tv_box_dark_theme %>
|
||||||
|
<% else %>
|
||||||
|
<%= unfound_tv_box_light_theme %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<%= next_steps %>
|
<%= next_steps %>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user