-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathlicense-overview.html
49 lines (47 loc) · 1.61 KB
/
license-overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% 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">
<a href="{{ license.url }}">
{% if license.nickname %}
{{ license.nickname }}
{% else %}
{{ license.title }}
{% endif %}
</a>
</h3>
<p class="license-overview-description">{{ license.description }}</p>
</div>
<div class="license-details">
<table class="license-rules">
<tr>
{% assign types = "permissions|conditions|limitations" | split: "|" %}
{% for type in types %}
<th class="label">{{ type | capitalize }}</th>
{% endfor %}
</tr>
<tr>
{% for type in types %}
<td>
<ul class="license-{{ type }}">
{% assign rules = site.data.rules[type] | sort: "label" %}
{% 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>
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
</tr>
</table>
<p class="small"><a href="{{ license.url }}">View full {{ license.title }} »</a></p>
</div>
</div>
{% endfor %}