1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-29 15:13:04 +02:00
choosealicense.com/_includes/license-overview.html
Mike Linksvayer 810eeb5618 rename/order license properties better reflect how licenses work
and are structured

grant (permissions)
conditioned on (conditions)
with limitations

Permissions coming first combats mistaken but apparently widespread
impression that licenses impose conditions, even such that without
a license, there would be no conditions/work would be in the public
domain.

Requirements->Conditions emphasizes that they are pertinent if one
wants to take advantage of permissions.

Forbiddens->Limitations is more accurate: in most cases licenses
don't give permission to hold licensors liable, in some cases to
use licensors' trademarks or patents, but a licensee does not lose
the permissions granted by the license if the licensee holds licensor
liable, etc. Also emphasizes that there are limitatations on the
license grant, not that the license imposes prohibitions.

The most concise place to see both the rename and reorder is in
_includes/license-overview.html

I did not reorder the appearance of the groups of properties in
license source files (.txt files in _licenses) as those orderings
are not used to render anything on the webiste. Might do so later.
2016-03-01 13:33:15 -08:00

78 lines
2.9 KiB
HTML

<div class="license-family clearfix">
<div class="license-family-heading">
<h3 class="license-family-name">
<a href="{{ license.url }}">
{% if license.family %}
{{ license.family }}
{% else %}
{% if license.nickname %}
{{ license.nickname }}
{% else %}
{{ license.title }}
{% endif %}
{% endif %}
</a>
</h3>
<p class="license-family-description">{{ license.description }}</p>
</div>
<div class="license-details">
<div class="license-variations js-license-variations">
<!-- always show this div, even w/o variations, for proper spacing -->
{% if license.family %}
<ul class="nav-pills js-nav-pills">
{% assign variations = site.licenses | where:"hidden",false | where:"family",license.family %}
{% for variation in variations %}
<li{% if license.id == variation.id %} class="active"{% endif %}><a href="#{{ variation.id | remove: '/licenses/' | slugify }}" data-selected-tab="variation-{{ variation.id | remove: '/licenses/' | slugify }}">
{% if variation.nickname != nil %}
{{ variation.nickname }}
{% else %}
{{ variation.title }}
{% endif %}
</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
{% if license.family %}
{% assign variations = site.licenses | where:"hidden",false | where:"family",license.family %}
{% else %}
{% assign variations = site.licenses | where:"title",license.title %}
{% endif %}
{% for variation in variations %}
<div {% if variation.id %}id="{{ variation.id | remove: '/licenses/' | slugify }}" {% endif %}class="variation-tab {% if variation.id %}variation-{{ variation.id | remove: '/licenses/' | slugify }}{% endif %} js-variation-tab{% if license.id == variation.id %} active{% endif %}">
<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 variation[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="{{ variation.url }}">View full {{ variation.title }} license »</a></p>
</div>
{% endfor %}
</div>
</div>