summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-02-05 18:05:23 -0600
committerOmar Roth <omarroth@hotmail.com>2018-02-05 18:05:23 -0600
commit66f28c8f63e944c53df16e901e11d084ecbe3a7b (patch)
treec2808d3a3ff3dfaae5790ac434e5b37aa6510353 /src
parentd1a2b193aab9be8183db310cd405021d99af164c (diff)
downloadinvidious-66f28c8f63e944c53df16e901e11d084ecbe3a7b.tar.gz
invidious-66f28c8f63e944c53df16e901e11d084ecbe3a7b.tar.bz2
invidious-66f28c8f63e944c53df16e901e11d084ecbe3a7b.zip
Use same layout for search as for index
Diffstat (limited to 'src')
-rw-r--r--src/views/search.ecr21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/views/search.ecr b/src/views/search.ecr
index 557a9068..2bc54239 100644
--- a/src/views/search.ecr
+++ b/src/views/search.ecr
@@ -2,22 +2,19 @@
<title><%= query.size > 30 ? query[0,30].rstrip(".") + "..." : query %> - Invidious</title>
<% end %>
-<% videos.each do |video| %>
-<p style="padding:1em;">
- <div class="pure-g">
- <div class="pure-u-1 pure-u-md-1-5">
- <a class="link" href="<%= video["link"] %>">
- <img style="width:100%" alt="thumbnail" src="<%= video["thumbnail"] %>">
- </a>
- </div>
- <div class="pure-u-1 pure-u-md-4-5">
- <a style="display:block; width:100%; height:100%" class="link" href="<%= video["link"] %>">
+<% 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>
- </a>
-</p>
+ <% end %>
+</div>
<% end %>
<p style="text-align: right">