<% content_for "header" do %> <%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious <% end %> <% if count == 0 %>

"><%= translate(locale, "Broken? Try another Invidious Instance!") %>

<% else %>

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

<%= translate(locale, "date") %>
<% ["hour", "today", "week", "month", "year"].each do |date| %>
<% if operator_hash.fetch("date", "all") == date %> <%= translate(locale, date) %> <% else %> &page=<%= page %>"> <%= translate(locale, date) %> <% end %>
<% end %>
<%= translate(locale, "content_type") %>
<% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %>
<% if operator_hash.fetch("content_type", "all") == content_type %> <%= translate(locale, content_type) %> <% else %> &page=<%= page %>"> <%= translate(locale, content_type) %> <% end %>
<% end %>
<%= translate(locale, "duration") %>
<% ["short", "long"].each do |duration| %>
<% if operator_hash.fetch("duration", "all") == duration %> <%= translate(locale, duration) %> <% else %> &page=<%= page %>"> <%= translate(locale, duration) %> <% end %>
<% end %>
<%= translate(locale, "features") %>
<% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %>
<% if operator_hash.fetch("features", "all").includes?(feature) %> <%= translate(locale, feature) %> <% elsif operator_hash.has_key?("features") %> &page=<%= page %>"> <%= translate(locale, feature) %> <% else %> &page=<%= page %>"> <%= translate(locale, feature) %> <% end %>
<% end %>
<%= translate(locale, "sort") %>
<% ["relevance", "rating", "date", "views"].each do |sort| %>
<% if operator_hash.fetch("sort", "relevance") == sort %> <%= translate(locale, sort) %> <% else %> &page=<%= page %>"> <%= translate(locale, sort) %> <% end %>
<% end %>
<% end %>
<% if page > 1 %> <%= translate(locale, "Previous page") %> <% end %>
<% if count >= 20 %> <%= translate(locale, "Next page") %> <% end %>
<% videos.each_slice(4) do |slice| %> <% slice.each do |item| %> <%= rendered "components/item" %> <% end %> <% end %>
<% if page > 1 %> <%= translate(locale, "Previous page") %> <% end %>
<% if count >= 20 %> <%= translate(locale, "Next page") %> <% end %>