1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-04 18:58:50 +01:00
choosealicense.com/_includes/sidebar.html
Jeff King 62066749b5 sidebar: convert <</>> into brackets in page.how
We already do this in the license bodies, and we need to
match here (currently we just print junk like `replace <>
with ...` because we end up with garbled HTML.

This replacement should arguably be factored out, as it
would want to be the same everywhere (and we might want to
make it bold everywhere or something).
2013-06-15 04:13:13 -04:00

46 lines
1.3 KiB
HTML

<div class='sidebar'>
<a href="#" data-clipboard-target="license-text" class="js-clipboard-button button">Copy license text to clipboard</a>
<div class='how-to-apply callout'>
<h5>How to apply this license</h5>
<p>
{{ page.how | replace:"<<","[" | replace:">>","]" }}
</p>
{% if page.note %}
<p class="note">
<strong>Note: </strong> {{ page.note }}
</p>
{% endif %}
</div>
<div class="source">
<a href="{{ page.source}}">Source</a>
</div>
<div class="license-rules license-rules-sidebar">
{% assign types = "required|permitted|forbidden" | split: "|" %}
{% for type in types %}
<h3>{{ type | capitalize }}</h3>
<ul class="license-{{ type }}">
{% for req in page[type] %}
<li class="{{ req }}">{{ site.rules[type][req].label }}</li>
{% endfor %}
</ul>
{% endfor %}
</div>
{% if page.using %}
<div class="projects-with-license">
<h3>Who's using this license?</h3>
<ul>
{% for using_hash in page.using %}
{% for using in using_hash %}
<li><a href="{{ using[1] }}" target="_blank">{{ using[0] }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endif %}
</div><!-- /sidebar -->