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

50 lines
1.6 KiB
HTML
Raw Normal View History

{% assign id = "/licenses/" | append: include.license-id %}
{% assign licenses = site.licenses | where:"id", id %}
{% for license in licenses %}
<div class="license-family clearfix" id="{{ include.license-id | slugify }}">
<div class="license-family-heading">
2014-07-31 12:36:56 -04:00
<h3 class="license-family-name">
2015-08-22 15:25:16 -04:00
<a href="{{ license.url }}">
{% if license.nickname %}
{{ license.nickname }}
{% else %}
{{ license.title }}
{% endif %}
2014-07-31 12:36:56 -04:00
</a>
</h3>
2014-07-31 12:36:56 -04:00
<p class="license-family-description">{{ license.description }}</p>
</div>
<div class="license-details">
2013-12-10 09:48:49 +02:00
<table class="license-rules">
<tr>
{% assign types = "permissions|conditions|limitations" | 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 }}">
2014-07-31 12:36:56 -04:00
{% assign rules = site.data.rules[type] | sort: "label" %}
2013-11-29 20:57:35 -05:00
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if license[type] contains req %}
<li class="{{ req }}">
<span class="license-sprite"></span>
{{ rule_obj.label }}
</li>
2013-11-29 20:57:35 -05:00
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
</tr>
</table>
<p class="small"><a href="{{ license.url }}">View full {{ license.title }} »</a></p>
</div>
</div>
{% endfor %}