invidious/src/views/search.ecr
2018-02-05 18:44:42 -06:00

22 lines
688 B
Plaintext

<% content_for "header" do %>
<title><%= query.size > 30 ? query[0,30].rstrip(".") + "..." : query %> - Invidious</title>
<% end %>
<% videos.each_slice(4) do |slice| %>
<div class="pure-g">
<% slice.each do |video| %>
<div class="pure-u-1 pure-u-md-1-4">
<div style="margin:1em;">
<a style="width:100%;" class="link" href="/watch?v=<%= video["link"] %>">
<img style="width:100%;" src="<%= video["thumbnail"] %>"/>
<%= video["title"] %>
</a>
</div>
</div>
<% end %>
</div>
<% end %>
<p style="text-align:right;">
<a class="link" href="/search?q=<%= query %>&page=<%= page + 1 %>">Next page</a>
</p>