Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,46 @@ class: license-types
All licenses described in the choosealicense.com [repository](https://github.com/github/choosealicense.com), in a table.

<table border style="font-size: xx-small">
{% assign types = "permissions|conditions|limitations" | split: "|" %}
<tr>
<th>License</th>
{% assign types = "permissions|conditions|limitations" | split: "|" %}
{% assign seen_tags = '' %}
{% for type in types %}
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% if seen_tags contains rule_obj.tag %}
{% continue %}
{% endif %}
{% capture seen_tags %}{{ seen_tags | append:rule_obj.tag }}{% endcapture %}
<th style="text-align: center; width:7%">{{ rule_obj.label }}</th>
{% endfor %}
{% endfor %}
</tr>
{% for license in site.licenses | sort: 'path' %}
<tr style="height: 3em"><td><a href="{{ license.id }}">{{ license.title }}</a></td>
{% assign seen_tags = '' %}
{% for type in types %}
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
<td class="license-{{ type }}" style="text-align:center">{% assign req = rule_obj.tag %}
{% if license[type] contains req %}
<span class="{{ req }}">
<span class="license-sprite {{ req }}"></span>
</span>
{% endif %}</td>
{% assign req = rule_obj.tag %}
{% if seen_tags contains req %}
{% continue %}
{% endif %}
{% capture seen_tags %}{{ seen_tags | append:req }}{% endcapture %}
{% assign seen_req = false %}
{% for t in types %}
{% if license[t] contains req %}
<td class="license-{{ t }}" style="text-align:center">
<span class="{{ req }}">
<span class="license-sprite {{ req }}"></span>
</span>
</td>
{% assign seen_req = true %}
{% endif %}
{% endfor %}
{% unless seen_req %}
<td></td>
{% endunless %}
{% endfor %}
{% endfor %}
</tr>
Expand Down