1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-05 19:28:50 +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-overview clearfix" id="{{ include.license-id | slugify }}">
<div class="license-overview-heading">
<h3 class="license-overview-name">
2015-08-22 21:25:16 +02:00
<a href="{{ license.url }}">
{% if license.nickname %}
{{ license.nickname }}
{% else %}
{{ license.title }}
{% endif %}
2014-07-31 18:36:56 +02:00
</a>
</h3>
<p class="license-overview-description">{{ license.description }}</p>
</div>
<div class="license-details">
2013-12-10 08:48:49 +01: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-30 02:57:35 +01:00
{% for type in types %}
<td>
<ul class="license-{{ type }}">
2014-07-31 18:36:56 +02:00
{% assign rules = site.data.rules[type] | sort: "label" %}
2013-11-30 02:57:35 +01: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-30 02:57:35 +01:00
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
</tr>
</table>
<p class="small"><a href="{{ license.url }}">View full {{ license.title }} »</a></p>
</div>
</div>
{% endfor %}