mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 04:40:09 +01:00
Merge pull request #1261 from mschoettle/appendix-legend-grouping
Group rules by type in appendix legend
This commit is contained in:
commit
7923e10f7f
34
appendix.md
34
appendix.md
@ -72,36 +72,24 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
|
|||||||
|
|
||||||
<p>Most open source licenses also have <span class="license-limitations"><span class="license-sprite"></span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>
|
<p>Most open source licenses also have <span class="license-limitations"><span class="license-sprite"></span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>
|
||||||
|
|
||||||
{% assign seen_tags = '' %}
|
|
||||||
{% for type in types %}
|
{% for type in types %}
|
||||||
### {% if type == "permissions" %}Permissions{% elsif type == "conditions" %}Conditions{% else %}Limitations{% endif %}
|
### {% if type == "permissions" %}Permissions{% elsif type == "conditions" %}Conditions{% else %}Limitations{% endif %}
|
||||||
<dl>
|
<dl>
|
||||||
{% assign rules = site.data.rules[type] | sort: "label" %}
|
{% assign rules = site.data.rules[type] | sort: "label" %}
|
||||||
{% for rule_obj in rules %}
|
{% for rule_obj in rules %}
|
||||||
{% assign req = rule_obj.tag %}
|
{% assign req = rule_obj.tag %}
|
||||||
{% if seen_tags contains req %}
|
|
||||||
{% continue %}
|
|
||||||
{% endif %}
|
|
||||||
<dt id="{{ req }}">{{ rule_obj.label }}</dt>
|
<dt id="{{ req }}">{{ rule_obj.label }}</dt>
|
||||||
{% capture seen_tags %}{{ seen_tags | append:req }}{% endcapture %}
|
<dd class="license-{{ type }}">
|
||||||
{% for t in types %}
|
{% if req contains "--" %}
|
||||||
{% assign rs = site.data.rules[t] | sort: "label" %}
|
{% assign lite = " lite" %}
|
||||||
{% for r in rs %}
|
{% else %}
|
||||||
{% if r.tag == req %}
|
{% assign lite = "" %}
|
||||||
{% if r.tag contains "--" %}
|
{% endif %}
|
||||||
{% assign lite = " lite" %}
|
<span class="{{ req | append: lite }}">
|
||||||
{% else %}
|
<span class="license-sprite {{ req }}"></span>
|
||||||
{% assign lite = "" %}
|
</span>
|
||||||
{% endif %}
|
{{ rule_obj.description }}
|
||||||
<dd class="license-{{t}}">
|
</dd>
|
||||||
<span class="{{ r.tag | append: lite }}">
|
|
||||||
<span class="license-sprite {{ r.tag }}"></span>
|
|
||||||
</span>
|
|
||||||
{{ r.description }}
|
|
||||||
</dd>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user