|
|
@ -2,99 +2,92 @@
|
|
|
|
<title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title>
|
|
|
|
<title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
<details id="filters">
|
|
|
|
<a id="togglefilters" href="javascript:void(0)">[ + ]</a>
|
|
|
|
<summary>
|
|
|
|
<%= translate(locale, "filter") %>
|
|
|
|
<h3 style="display:inline"> <%= translate(locale, "filter") %> </h3>
|
|
|
|
</h3>
|
|
|
|
</summary>
|
|
|
|
|
|
|
|
<div id="filters" class="pure-g h-box">
|
|
|
|
<noscript>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<style>
|
|
|
|
<b><%= translate(locale, "date") %></b>
|
|
|
|
#filters {
|
|
|
|
<hr/>
|
|
|
|
display: flex;
|
|
|
|
<% ["hour", "today", "week", "month", "year"].each do |date| %>
|
|
|
|
}
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</style>
|
|
|
|
<% if operator_hash.fetch("date", "all") == date %>
|
|
|
|
</noscript>
|
|
|
|
<b><%= translate(locale, date) %></b>
|
|
|
|
<div id="filters" class="pure-g h-box">
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?date:[a-z]+/, "") + " date:" + date) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "date") %></b>
|
|
|
|
<%= translate(locale, date) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["hour", "today", "week", "month", "year"].each do |date| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("date", "all") == date %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, date) %></b>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?date:[a-z]+/, "") + " date:" + date) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "content_type") %></b>
|
|
|
|
<%= translate(locale, date) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("content_type", "all") == content_type %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, content_type) %></b>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?content_type:[a-z]+/, "") + " content_type:" + content_type) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "content_type") %></b>
|
|
|
|
<%= translate(locale, content_type) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("content_type", "all") == content_type %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, content_type) %></b>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?content_type:[a-z]+/, "") + " content_type:" + content_type) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "duration") %></b>
|
|
|
|
<%= translate(locale, content_type) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["short", "long"].each do |duration| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("duration", "all") == duration %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, duration) %></b>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?duration:[a-z]+/, "") + " duration:" + duration) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "duration") %></b>
|
|
|
|
<%= translate(locale, duration) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["short", "long"].each do |duration| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("duration", "all") == duration %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, duration) %></b>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?duration:[a-z]+/, "") + " duration:" + duration) %>&page=<%= page %>">
|
|
|
|
<b><%= translate(locale, "features") %></b>
|
|
|
|
<%= translate(locale, duration) %>
|
|
|
|
<hr/>
|
|
|
|
</a>
|
|
|
|
<% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %>
|
|
|
|
<% end %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
</div>
|
|
|
|
<% if operator_hash.fetch("features", "all").includes?(feature) %>
|
|
|
|
<% end %>
|
|
|
|
<b><%= translate(locale, feature) %></b>
|
|
|
|
|
|
|
|
<% elsif operator_hash.has_key?("features") %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/features:/, "features:" + feature + ",")) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil! + " features:" + feature) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
|
|
|
|
<b><%= translate(locale, "sort") %></b>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<% ["relevance", "rating", "date", "views"].each do |sort| %>
|
|
|
|
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
|
|
|
|
<% if operator_hash.fetch("sort", "relevance") == sort %>
|
|
|
|
|
|
|
|
<b><%= translate(locale, sort) %></b>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?sort:[a-z]+/, "") + " sort:" + sort) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, sort) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
</details>
|
|
|
|
<b><%= translate(locale, "features") %></b>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %>
|
|
|
|
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
|
|
|
|
<% if operator_hash.fetch("features", "all").includes?(feature) %>
|
|
|
|
|
|
|
|
<b><%= translate(locale, feature) %></b>
|
|
|
|
|
|
|
|
<% elsif operator_hash.has_key?("features") %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/features:/, "features:" + feature + ",")) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil! + " features:" + feature) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5">
|
|
|
|
|
|
|
|
<b><%= translate(locale, "sort") %></b>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<% ["relevance", "rating", "date", "views"].each do |sort| %>
|
|
|
|
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
|
|
|
|
<% if operator_hash.fetch("sort", "relevance") == sort %>
|
|
|
|
|
|
|
|
<b><%= translate(locale, sort) %></b>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?sort:[a-z]+/, "") + " sort:" + sort) %>&page=<%= page %>">
|
|
|
|
|
|
|
|
<%= translate(locale, sort) %>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
|
|
|
@ -141,4 +134,3 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="/js/search.js?v=<%= ASSET_COMMIT %>"></script>
|
|
|
|
|