invidious-copy-2022-08-14/src/views/index.ecr

20 lines
613 B
Text
Raw Normal View History

2018-01-15 03:16:09 +00:00
<% content_for "header" do %>
<title>Invidious</title>
2018-02-05 23:56:40 +00:00
<% end %>
<% videos.each_slice(4) do |slice| %>
<div class="pure-g">
<% slice.each do |video| %>
<% player_response = JSON.parse(video.info["player_response"]) %>
<div class="pure-u-1 pure-u-md-1-4">
2018-02-06 00:44:42 +00:00
<div style="margin:1em;">
2018-02-05 23:56:40 +00:00
<a style="width:100%;" class="link" href="/watch?v=<%= video.id %>">
2018-02-06 00:44:42 +00:00
<img style="width:100%;" src="<%= player_response["videoDetails"]["thumbnail"]["thumbnails"][0]["url"] %>"/>
2018-02-05 23:56:40 +00:00
<%= video.title %>
</a>
</div>
</div>
<% end %>
</div>
<% end %>