mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Refactor channel sorting links to dropdown
This commit is contained in:
parent
be6df4e855
commit
5b81d429ea
1 changed files with 24 additions and 13 deletions
|
@ -74,19 +74,30 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1-3"></div>
|
||||
<div class="pure-u-1-3">
|
||||
<div class="pure-g" style="text-align:right">
|
||||
<% sort_options.each do |sort| %>
|
||||
<div class="pure-u-1 pure-md-1-3">
|
||||
<% if sort_by == sort %>
|
||||
<b><%= translate(locale, sort) %></b>
|
||||
<% else %>
|
||||
<a href="/channel/<%= ucid %>?page=<%= page %>&sort_by=<%= sort %>">
|
||||
<%= translate(locale, sort) %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pure-u-1-3"> <!-- Sort by -->
|
||||
<div class="pure-menu pure-menu-horizontal" style="">
|
||||
<ul class="pure-menu-list", style="float: right">
|
||||
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
|
||||
<a class="pure-menu-link">Sort By</a> <!-- Translate! -->
|
||||
<ul class="pure-menu-children">
|
||||
<% sort_options.each do |sort| %>
|
||||
<% if sort_by == sort %>
|
||||
<li class="pure-menu-item pure-menu-selected">
|
||||
<a class="pure-menu-link" href="/channel/<%= channel.ucid %>?page=<%= page %>&sort_by=<%= sort %>">
|
||||
<b><%= translate(locale, sort) %></b>
|
||||
</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="pure-menu-item">
|
||||
<a class="pure-menu-link" href="/channel/<%= channel.ucid %>?page=<%= page %>&sort_by=<%= sort %>">
|
||||
<%= translate(locale, sort) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue