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

54 lines
2.2 KiB
HTML
Raw Normal View History

<div class="license-family cf">
<div class="license-family-heading">
2013-11-18 14:48:32 -08:00
<h3 class="license-family-name"><a href="{{ page.permalink }}">{% if page.category %}{{ page.category }}{% else %}{{ page.title }}{% endif %}</a></h3>
<p class="license-family-description">{{ page.description }}</p>
</div>
<div class="license-details">
<div class="license-variations js-license-variations">
<!-- always show this div, even w/o variations, for proper spacing -->
2013-11-18 17:00:15 -08:00
{% if page.tab-slug %}
<ul class="nav-pills js-nav-pills">
2013-11-18 14:48:32 -08:00
{% for variation in site.pages %}
{% if variation.category and variation.category == page.category %}
2013-11-18 17:00:15 -08:00
<li{% if page.tab-slug == variation.tab-slug %} class="active"{% endif %}><a href="#{{ variation.tab-slug }}" data-selected-tab="variation-{{ variation.tab-slug }}">{{ variation.title }}</a></li>
2013-11-18 14:48:32 -08:00
{% endif %}
{% endfor %}
</ul>
2013-11-18 17:00:15 -08:00
{% endif %}
</div>
2013-11-18 14:48:32 -08:00
{% for variation in site.pages %}
{% if variation.category and variation.category == page.category %}
2013-11-19 09:30:11 -08:00
<div id="{{ variation.tab-slug }}" class="variation-tab variation-{{ variation.tab-slug }} js-variation-tab{% if page.tab-slug == variation.tab-slug %} active{% endif %}">
<table class='license-rules'>
<tr>
{% assign types = "required|permitted|forbidden" | split: "|" %}
{% for type in types %}
<th class="label">{{ type | capitalize }}</th>
{% endfor %}
</tr>
<tr>
2013-11-29 20:57:35 -05:00
{% for type in types %}
<td>
<ul class="license-{{ type }}">
{% assign rules = site.rules[type] | sort: 'label' %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
2013-11-29 21:05:49 -05:00
{% if variation[type] contains req %}
2013-11-29 20:57:35 -05:00
<li class="{{ req }}">{{ rule_obj.label }}</li>
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
</tr>
</table>
2013-11-18 14:48:32 -08:00
<p class="small"><a href="{{ variation.permalink }}">View full {{ variation.title }} license »</a></p>
</div>
2013-11-18 14:48:32 -08:00
{% endif %}
{% endfor %}
</div>
</div>