Move sorting options to separate bar

This commit is contained in:
syeopite 2021-06-24 10:57:45 -07:00
parent ca4afd59f4
commit f2039d6dcf
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
2 changed files with 33 additions and 31 deletions

View File

@ -179,3 +179,8 @@ only show up when the screen is wide enough */
.light-theme .trailer-timestamp { .light-theme .trailer-timestamp {
color: rgb(127, 127, 127); color: rgb(127, 127, 127);
} }
#content-navigation {
display: flex;
}

View File

@ -52,8 +52,8 @@
<%= rendered "components/subscribe_widget" %> <%= rendered "components/subscribe_widget" %>
</div> </div>
<div class="pure-g h-box" id="content-navigation"> <div class="h-box" id="content-navigation">
<div class="pure-u-1-3"> <div class="">
<!-- TODO Add these! <!-- TODO Add these!
<a href="https://www.youtube.com/channel/<%= channel.ucid %>"><%= translate(locale, "View channel on YouTube") %></a> --> <a href="https://www.youtube.com/channel/<%= channel.ucid %>"><%= translate(locale, "View channel on YouTube") %></a> -->
<!-- <a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> --> <!-- <a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Switch Invidious Instance") %></a> -->
@ -164,36 +164,33 @@
</ui> </ui>
</div> </div>
</div> </div>
<div class="pure-u-1-3"></div>
<% if content_type == 1 || content_type == 2 %>
<% route = content_type == 1 ? "/playlists" : "" %>
<% url = "/channel/#{channel.ucid + route}" %>
<div class="pure-u-1-3"> <!-- Sort by -->
<div class="pure-menu pure-menu-horizontal" style="">
<ul class="pure-menu-list" style="float: right">
<% sort_options.each do |sort| %>
<% if sort_by == sort %>
<li class="pure-menu-item pure-menu-selected">
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
<b><%= translate(locale, sort) %></b>
</a>
</li>
<% else %>
<li class="pure-menu-item">
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
<%= translate(locale, sort) %>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
</div>
<% end %>
</div> </div>
<div class="h-box"> <div class="h-box">
<hr> <hr>
<% if content_type == 1 || content_type == 2 %>
<% route = content_type == 1 ? "/playlists" : "" %>
<% url = "/channel/#{channel.ucid + route}" %>
<div class="pure-menu pure-menu-horizontal" style="display: flex;">
<ul class="pure-menu-list" style="margin-left: auto;">
<% sort_options.each do |sort| %>
<% if sort_by == sort %>
<li class="pure-menu-item pure-menu-selected">
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
<b><%= translate(locale, sort) %></b>
</a>
</li>
<% else %>
<li class="pure-menu-item">
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
<%= translate(locale, sort) %>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
<% end %>
<hr>
</div> </div>