Mark the current state and orderby links in bold.

This commit is contained in:
voussoir 2020-09-05 17:49:04 -07:00
parent d0e803aa66
commit 0116d80740

View file

@ -174,25 +174,25 @@ https://stackoverflow.com/a/35153397
<div>View <div>View
{% if channel is not none %} {% if channel is not none %}
<a class="merge_params" href="/channel/{{channel.id}}">All</a> <a class="merge_params {{"bold" if not state else ""}}" href="/channel/{{channel.id}}">All</a>
{% else %} {% else %}
<a class="merge_params" href="/videos">All</a> <a class="merge_params {{"bold" if not state else ""}}" href="/videos">All</a>
{% endif %} {% endif %}
{% for statename in all_states %} {% for statename in all_states %}
{% if channel is not none %} {% if channel is not none %}
<a class="merge_params" href="/channel/{{channel.id}}/{{statename}}">{{statename.capitalize()}}</a> <a class="merge_params {{"bold" if state == statename else ""}}" href="/channel/{{channel.id}}/{{statename}}">{{statename.capitalize()}}</a>
{% else %} {% else %}
<a class="merge_params" href="/videos/{{statename}}">{{statename.capitalize()}}</a> <a class="merge_params {{"bold" if state == statename else ""}}" href="/videos/{{statename}}">{{statename.capitalize()}}</a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
<div>Sort by <div>Sort by
<a class="merge_params" href="?orderby=published">Date</a> <a class="merge_params {{"bold" if orderby == "published" or not orderby else ""}}" href="?orderby=published">Date</a>
<a class="merge_params" href="?orderby=duration">Duration</a> <a class="merge_params {{"bold" if orderby == "duration" else ""}}" href="?orderby=duration">Duration</a>
<a class="merge_params" href="?orderby=views">Views</a> <a class="merge_params {{"bold" if orderby == "views" else ""}}" href="?orderby=views">Views</a>
<a class="merge_params" href="?orderby=random">Random</a> <a class="merge_params {{"bold" if orderby == "random" else ""}}" href="?orderby=random">Random</a>
</div> </div>
<div id="video_cards"> <div id="video_cards">