<% locale = env.get("preferences").as(Preferences).locale dark_mode = env.get("preferences").as(Preferences).dark_mode current_external_videoplayback_proxy = Invidious::HttpServer::Utils.get_external_proxy() %> <%= yield_content "header" %> -theme">
<% if CONFIG.invidious_companion.present? current_backend = env.get?("current_companion").try &.as(Int32) domain = env.get?("domain").try &.as(Bool) status = BackendInfo.get_status %>
Switch Backend: <% if domain %> <% CONFIG.invidious_companion.each_with_index do | companion, index | %> <% is_current_backend_host = companion.domain == env.request.headers["Host"] %> <% scheme = env.request.headers["X-Forwarded-Proto"]? || ("https" if CONFIG.https_only) || "http" %> display: inline-block;"> Backend<%= HTML.escape((index + 1).to_s) %> <%= HTML.escape(companion.note) %> <% if !(index == CONFIG.invidious_companion.size-1) %> | <% end %> <% end %> <% else %> <% CONFIG.invidious_companion.each_with_index do | companion, index | %> <% is_current_backend_index = current_backend == index %> display: inline-block;"> Backend<%= HTML.escape((index + 1).to_s) %> <%= HTML.escape(companion.note) %> <% if !(index == CONFIG.invidious_companion.size-1) %> | <% end %> <% end %> <% end %>
<% end %> <% if CONFIG.banner %>

<%= CONFIG.banner %>

<% end %> <%= content %> <% if buffer_footer %> <% end %>
<% if env.get? "user" %> <% if CONFIG.enable_user_notifications %> <% end %> <% end %>