invidious-experimenting/src/invidious/views/trending.ecr

50 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-11-20 22:48:12 +05:30
<% content_for "header" do %>
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
2019-05-02 06:33:39 +05:30
<title>
<% if config.default_home != "Trending" %>
<%= translate(locale, "Trending") %> - Invidious
<% else %>
Invidious
<% end %>
</title>
2018-11-20 22:48:12 +05:30
<% end %>
2019-02-24 23:21:33 +05:30
<%= rendered "components/feed_menu" %>
2018-11-20 22:48:12 +05:30
2018-12-21 04:18:45 +05:30
<div class="pure-g h-box">
<div style="align-self:flex-end" class="pure-u-2-3">
<% if plid %>
2019-05-02 06:33:39 +05:30
<a href="/playlist?list=<%= plid %>">
<%= translate(locale, "View as playlist") %>
</a>
<% end %>
2018-12-21 04:18:45 +05:30
</div>
<div class="pure-u-1-3">
2019-05-02 06:33:39 +05:30
<div class="pure-g" style="text-align:right">
2018-12-21 04:18:45 +05:30
<% {"Default", "Music", "Gaming", "News", "Movies"}.each do |option| %>
<div class="pure-u-1 pure-md-1-3">
<% if trending_type == option %>
2019-05-02 06:33:39 +05:30
<b><%= translate(locale, option) %></b>
2018-12-21 04:18:45 +05:30
<% else %>
2019-05-02 06:33:39 +05:30
<a href="/feed/trending?type=<%= option %>&region=<%= region %>">
<%= translate(locale, option) %>
</a>
2018-12-21 04:18:45 +05:30
<% end %>
</div>
<% end %>
</div>
</div>
</div>
<div class="h-box">
<hr>
</div>
2018-11-20 22:48:12 +05:30
<div class="pure-g">
2019-05-02 06:33:39 +05:30
<% trending.each_slice(4) do |slice| %>
<% slice.each do |item| %>
<%= rendered "components/item" %>
<% end %>
<% end %>
2018-11-20 22:48:12 +05:30
</div>