1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Restructure individual license pages, added styles to improve alignment

This commit is contained in:
git 2016-04-26 16:43:40 -07:00
parent 79f893e4a8
commit 78aac74fb2
3 changed files with 58 additions and 39 deletions

View File

@ -2,22 +2,6 @@
<a href="#" data-clipboard-target="#license-text" data-proofer-ignore="true" class="js-clipboard-button button">Copy license text to clipboard</a> <a href="#" data-clipboard-target="#license-text" data-proofer-ignore="true" class="js-clipboard-button button">Copy license text to clipboard</a>
<div class="license-description">
<h3>Description</h3>
<p>
{{ page.description }}
</p>
</div>
{% if page.nickname %}
<div class="license-nickname">
<h3>Nickname</h3>
<p>
{{ page.nickname }}
</p>
</div>
{% endif %}
<div class="how-to-apply"> <div class="how-to-apply">
<h3>How to apply this license</h3> <h3>How to apply this license</h3>
<p> <p>
@ -38,27 +22,6 @@
</div> </div>
{% endif %} {% endif %}
<div class="license-rules license-rules-sidebar">
{% assign types = "permissions|conditions|limitations" | split: "|" %}
{% for type in types %}
<h3>{{ type | capitalize }}</h3>
<ul class="license-{{ type }}">
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if page[type] contains req %}
<li class="{{ req }}">
<span class="license-sprite"></span>
{{ rule_obj.label }}
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
{% if page.using %} {% if page.using %}
<div class="projects-with-license"> <div class="projects-with-license">
<h3>Who's using this license?</h3> <h3>Who's using this license?</h3>

View File

@ -1,8 +1,54 @@
{% include header.html %} {% include header.html %}
<div class="clearfix"> <div class="clearfix">
<div class="license-body"> <div class="license-body">
{% if page.nickname %}
<p class="license-nickname">
{{ page.nickname }}
</p>
{% endif %}
<p>
{{ page.description }}
</p>
<div class="license-page-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 page[type] contains req %}
<li class="{{ req }}">
<span class="license-sprite"></span>
{{ rule_obj.label }}
</li>
{% endif %}
{% endfor %}
</ul>
</td>
{% endfor %}
</tr>
</table>
</div>
<h3>License Text</h3>
<pre id="license-text">{{ content | replace:"<", "&lt;" | replace:">", "&gt;" }}</pre> <pre id="license-text">{{ content | replace:"<", "&lt;" | replace:">", "&gt;" }}</pre>
</div> <!-- /license-body --> </div> <!-- /license-body -->
{% include sidebar.html %} {% include sidebar.html %}

View File

@ -163,6 +163,12 @@ strong {
padding-left: 20px; padding-left: 20px;
} }
.license-page-details {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.license-overview-name { .license-overview-name {
font-size: 28px; font-size: 28px;
margin-top: 5px; margin-top: 5px;
@ -265,6 +271,10 @@ strong {
padding: 20px; padding: 20px;
} }
.license-nickname {
margin-top: 0;
}
.sidebar { .sidebar {
float: right; float: right;
width: 220px; width: 220px;