1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Merge pull request #280 from github/hidden-license-list

Smarter license list filtering
This commit is contained in:
Ben Balter 2015-08-19 16:27:24 -04:00
commit f121f637db

View File

@ -14,8 +14,8 @@
<!-- always show this div, even w/o variations, for proper spacing -->
{% if license.tab-slug %}
<ul class="nav-pills js-nav-pills">
{% for variation in site.licenses %}
{% if variation.category and variation.category == license.category %}
{% assign variations = site.licenses | where:"hidden",false | where:"category",license.category %}
{% for variation in variations %}
<li{% if license.tab-slug == variation.tab-slug %} class="active"{% endif %}><a href="#{{ variation.tab-slug }}" data-selected-tab="variation-{{ variation.tab-slug }}">
{% if variation.nickname != nil %}
{{ variation.nickname }}
@ -23,13 +23,12 @@
{{ variation.title }}
{% endif %}
</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
{% for variation in site.licenses %}
{% if variation.category and variation.category == license.category %}
{% assign variations = site.licenses | where:"hidden",false | where:"category",license.category %}
{% for variation in variations %}
<div {% if variation.tab-slug %}id="{{ variation.tab-slug }}" {% endif %}class="variation-tab {% if variation.tab-slug %}variation-{{ variation.tab-slug }}{% endif %} js-variation-tab{% if license.tab-slug == variation.tab-slug %} active{% endif %}">
<table class="license-rules">
<tr>
@ -59,7 +58,6 @@
</table>
<p class="small"><a href="{{ variation.permalink }}">View full {{ variation.title }} license »</a></p>
</div>
{% endif %}
{% endfor %}
</div>
</div>