<% content_for "header" do %> <%= query.text.size > 30 ? HTML.escape(query.text[0,30].rstrip(".")) + "…" : HTML.escape(query.text) %> - Invidious <% end %> <%= Invidious::Frontend::SearchFilters.generate(query.filters, query.text, query.page, locale) %>
<%- if query.page > 1 -%> <%= translate(locale, "Previous page") %> <%- end -%>
<%- if videos.size >= 20 -%> <%= translate(locale, "Next page") %> <%- end -%>
<%- if videos.empty? -%>
<%= translate(locale, "search_message_no_results") %>

<%= translate(locale, "search_message_change_filters_or_query") %>

<%= translate(locale, "search_message_use_another_instance", redirect_url) %>
<%- else -%>
<%- videos.each do |item| -%> <%= rendered "components/item" %> <%- end -%>
<%- end -%>
<%- if query.page > 1 -%> <%= translate(locale, "Previous page") %> <%- end -%>
<%- if videos.size >= 20 -%> <%= translate(locale, "Next page") %> <%- end -%>