Add subscriptions to feed menu

This commit is contained in:
Omar Roth 2019-02-24 11:51:33 -06:00
parent 1692f7640c
commit c5a17cd043
6 changed files with 25 additions and 92 deletions

View file

@ -0,0 +1,19 @@
<div class="h-box pure-g">
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g">
<% feeds = ["Popular", "Top", "Trending"] %>
<% if env.get? "user" %>
<% feeds << "Subscriptions" %>
<% end %>
<% feeds.each do |feed| %>
<div class="pure-u-1-<%= feeds.size %>">
<a href="/feed/<%= feed.downcase %>" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, feed) %>
</a>
</div>
<% end %>
</div>
</div>
<div class="pure-u-1-4"></div>
</div>

View file

@ -3,29 +3,7 @@
<title>Invidious</title> <title>Invidious</title>
<% end %> <% end %>
<div class="h-box pure-g"> <%= rendered "components/feed_menu" %>
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g">
<div class="pure-u-1-3">
<a href="/feed/popular" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Popular") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/top" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Top") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/trending" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Trending") %>
</a>
</div>
</div>
</div>
<div class="pure-u-1-4"></div>
</div>
<div class="pure-g"> <div class="pure-g">
<% top_videos.each_slice(4) do |slice| %> <% top_videos.each_slice(4) do |slice| %>

View file

@ -3,29 +3,7 @@
<title><%= translate(locale, "Popular") %> - Invidious</title> <title><%= translate(locale, "Popular") %> - Invidious</title>
<% end %> <% end %>
<div class="h-box pure-g"> <%= rendered "components/feed_menu" %>
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g">
<div class="pure-u-1-3">
<a href="/feed/popular" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Popular") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/top" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Top") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/trending" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Trending") %>
</a>
</div>
</div>
</div>
<div class="pure-u-1-4"></div>
</div>
<div class="pure-g"> <div class="pure-g">
<% popular_videos.each_slice(4) do |slice| %> <% popular_videos.each_slice(4) do |slice| %>

View file

@ -2,6 +2,8 @@
<title><%= translate(locale, "Subscriptions") %> - Invidious</title> <title><%= translate(locale, "Subscriptions") %> - Invidious</title>
<% end %> <% end %>
<%= rendered "components/feed_menu" %>
<div class="pure-g h-box"> <div class="pure-g h-box">
<div class="pure-u-1-3"> <div class="pure-u-1-3">
<h3> <h3>

View file

@ -3,29 +3,7 @@
<title><%= translate(locale, "Top") %> - Invidious</title> <title><%= translate(locale, "Top") %> - Invidious</title>
<% end %> <% end %>
<div class="h-box pure-g"> <%= rendered "components/feed_menu" %>
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g">
<div class="pure-u-1-3">
<a href="/feed/popular" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Popular") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/top" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Top") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/trending" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Trending") %>
</a>
</div>
</div>
</div>
<div class="pure-u-1-4"></div>
</div>
<div class="pure-g"> <div class="pure-g">
<% top_videos.each_slice(4) do |slice| %> <% top_videos.each_slice(4) do |slice| %>

View file

@ -3,29 +3,7 @@
<title><%= translate(locale, "Trending") %> - Invidious</title> <title><%= translate(locale, "Trending") %> - Invidious</title>
<% end %> <% end %>
<div class="h-box pure-g"> <%= rendered "components/feed_menu" %>
<div class="pure-u-1-4"></div>
<div class="pure-u-1 pure-u-md-1-2">
<div class="pure-g">
<div class="pure-u-1-3">
<a href="/feed/popular" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Popular") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/top" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Top") %>
</a>
</div>
<div class="pure-u-1-3">
<a href="/feed/trending" style="text-align:center;" class="pure-menu-heading">
<%= translate(locale, "Trending") %>
</a>
</div>
</div>
</div>
<div class="pure-u-1-4"></div>
</div>
<div class="pure-g h-box"> <div class="pure-g h-box">
<div class="pure-u-2-3"> <div class="pure-u-2-3">