2018-01-08 02:40:03 +09:00
|
|
|
<% content_for "header" do %>
|
2022-03-27 04:15:02 +09:00
|
|
|
<title><%= query.text.size > 30 ? HTML.escape(query.text[0,30].rstrip(".")) + "…" : HTML.escape(query.text) %> - Invidious</title>
|
|
|
|
<link rel="stylesheet" href="/css/search.css?v=<%= ASSET_COMMIT %>">
|
2018-01-08 02:40:03 +09:00
|
|
|
<% end %>
|
2018-01-15 12:16:09 +09:00
|
|
|
|
2021-03-27 13:22:46 +09:00
|
|
|
<!-- Search redirection and filtering UI -->
|
2022-04-07 05:23:22 +09:00
|
|
|
<%= Invidious::Frontend::SearchFilters.generate(query.filters, query.text, query.page, locale) %>
|
|
|
|
<hr/>
|
2021-01-03 09:35:31 +09:00
|
|
|
|
2019-11-21 03:59:07 +09:00
|
|
|
<div class="pure-g h-box v-box">
|
|
|
|
<div class="pure-u-1 pure-u-lg-1-5">
|
2022-03-27 04:15:02 +09:00
|
|
|
<%- if query.page > 1 -%>
|
|
|
|
<a href="<%= url_prev_page %>"><%= translate(locale, "Previous page") %></a>
|
|
|
|
<%- end -%>
|
2019-11-21 03:59:07 +09:00
|
|
|
</div>
|
|
|
|
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
|
|
|
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
2022-03-27 04:15:02 +09:00
|
|
|
<%- if videos.size >= 20 -%>
|
|
|
|
<a href="<%= url_next_page %>"><%= translate(locale, "Next page") %></a>
|
|
|
|
<%- end -%>
|
2019-11-21 03:59:07 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-04-07 05:23:22 +09:00
|
|
|
<%- if videos.empty? -%>
|
|
|
|
<div class="h-box no-results-error">
|
|
|
|
<div>
|
|
|
|
<%= translate(locale, "search_message_no_results") %><br/><br/>
|
|
|
|
<%= translate(locale, "search_message_change_filters_or_query") %><br/><br/>
|
|
|
|
<%= translate(locale, "search_message_use_another_instance", redirect_url) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<%- else -%>
|
2018-02-06 09:05:23 +09:00
|
|
|
<div class="pure-g">
|
2022-04-07 05:23:22 +09:00
|
|
|
<%- videos.each do |item| -%>
|
2021-07-16 06:01:36 +09:00
|
|
|
<%= rendered "components/item" %>
|
2022-04-07 05:23:22 +09:00
|
|
|
<%- end -%>
|
2019-03-24 04:05:13 +09:00
|
|
|
</div>
|
2022-04-07 05:23:22 +09:00
|
|
|
<%- end -%>
|
2018-01-15 12:16:09 +09:00
|
|
|
|
2023-02-20 04:41:18 +09:00
|
|
|
<script src="/js/watched_indicator.js"></script>
|
2022-11-09 07:18:24 +09:00
|
|
|
|
2018-08-05 13:07:38 +09:00
|
|
|
<div class="pure-g h-box">
|
2019-04-15 07:04:52 +09:00
|
|
|
<div class="pure-u-1 pure-u-lg-1-5">
|
2022-03-27 04:15:02 +09:00
|
|
|
<%- if query.page > 1 -%>
|
|
|
|
<a href="<%= url_prev_page %>"><%= translate(locale, "Previous page") %></a>
|
|
|
|
<%- end -%>
|
2018-03-25 13:14:35 +09:00
|
|
|
</div>
|
2019-04-15 07:04:52 +09:00
|
|
|
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
2019-05-02 10:03:39 +09:00
|
|
|
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
2022-03-27 04:15:02 +09:00
|
|
|
<%- if videos.size >= 20 -%>
|
|
|
|
<a href="<%= url_next_page %>"><%= translate(locale, "Next page") %></a>
|
|
|
|
<%- end -%>
|
2018-03-25 13:14:35 +09:00
|
|
|
</div>
|
2018-08-18 01:04:38 +09:00
|
|
|
</div>
|