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