invidious-experimenting/src/invidious/views/trending.ecr
2018-12-20 16:48:45 -06:00

38 lines
1.1 KiB
Plaintext

<% content_for "header" do %>
<title><%= translate(locale, "Trending") %> - Invidious</title>
<% end %>
<div class="pure-g h-box">
<div class="pure-u-2-3">
<form class="pure-form pure-form-aligned" action="/feed/trending" method="get">
</form>
</div>
<div class="pure-u-1-3">
<div class="pure-g" style="text-align:right;">
<% {"Default", "Music", "Gaming", "News", "Movies"}.each do |option| %>
<div class="pure-u-1 pure-md-1-3">
<% if trending_type == option %>
<b><%= translate(locale, option) %></b>
<% else %>
<a href="/feed/trending?type=<%= option %>&region=<%= region %>">
<%= translate(locale, option) %>
</a>
<% end %>
</div>
<% end %>
</div>
</div>
</div>
<div class="h-box">
<hr>
</div>
<div class="pure-g">
<% trending.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
<% end %>
<% end %>
</div>