<% content_for "header" do %> <%= author %> - Invidious <% end %>

<%= author %>

<% if user %> <% if subscriptions.includes? ucid %>

"> Unsubscribe | <%= number_to_short_text(sub_count) %>

<% else %>

"> Subscribe | <%= number_to_short_text(sub_count) %>

<% end %> <% else %>

"> Login to subscribe to <%= author %>

<% end %>
View channel on YouTube
<% {"newest", "oldest", "popular"}.each do |sort| %>
<% if sort_by == sort %> <%= sort %> <% else %> <%= sort %> <% end %>
<% end %>

<% videos.each_slice(4) do |slice| %> <% slice.each do |item| %> <%= rendered "components/item" %> <% end %> <% end %>
<% if page >= 2 %> &sort_by=<%= sort_by %><% end %>">Previous page <% end %>
<% if count == 60 %> &sort_by=<%= sort_by %><% end %>">Next page <% end %>