summaryrefslogtreecommitdiff
path: root/src/invidious/views/feeds/trending.ecr
blob: a35c4ee3c3c015faf6f5f83a6d550b0e1a117ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<% content_for "header" do %>
<meta name="description" content="<%= translate(locale, "An alternative front-end to YouTube") %>">
<title>
    <% if env.get("preferences").as(Preferences).default_home != "Trending" %>
        <%= translate(locale, "Trending") %> - Invidious
    <% else %>
        Invidious
    <% end %>
</title>
<% end %>

<%= rendered "components/feed_menu" %>

<div class="pure-g h-box">
    <div style="align-self:flex-end" class="pure-u-2-3">
        <% if plid %>
            <a href="/playlist?list=<%= plid %>">
                <%= translate(locale, "View as playlist") %>
            </a>
        <% end %>
    </div>
    <div class="pure-u-1-3">
        <div class="pure-g" style="text-align:right">
            <% {"Default", "Music", "Gaming", "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 do |item| %>
    <%= rendered "components/item" %>
<% end %>
</div>