mirror of
https://github.com/github/choosealicense.com
synced 2024-11-05 03:08:51 +01:00
Merge pull request #159 from XhmikosR/license-sprite
Use a CSS sprite for the license images.
This commit is contained in:
commit
4302b20b07
@ -36,7 +36,10 @@
|
|||||||
{% for rule_obj in rules %}
|
{% for rule_obj in rules %}
|
||||||
{% assign req = rule_obj.tag %}
|
{% assign req = rule_obj.tag %}
|
||||||
{% if variation[type] contains req %}
|
{% if variation[type] contains req %}
|
||||||
<li class="{{ req }}">{{ rule_obj.label }}</li>
|
<li class="{{ req }}">
|
||||||
|
<span class="license-sprite"></span>
|
||||||
|
{{ rule_obj.label }}
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -14,7 +14,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if page.source %}
|
{% if page.source %}
|
||||||
<div class="source">
|
<div class="source">
|
||||||
<a href="{{ page.source }}">Source</a>
|
<a href="{{ page.source }}">
|
||||||
|
<span class="license-sprite"></span>
|
||||||
|
Source
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -28,7 +31,10 @@
|
|||||||
{% for rule_obj in rules %}
|
{% for rule_obj in rules %}
|
||||||
{% assign req = rule_obj.tag %}
|
{% assign req = rule_obj.tag %}
|
||||||
{% if page[type] contains req %}
|
{% if page[type] contains req %}
|
||||||
<li class="{{ req }}">{{ rule_obj.label }}</li>
|
<li class="{{ req }}">
|
||||||
|
<span class="license-sprite"></span>
|
||||||
|
{{ rule_obj.label }}
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -263,30 +263,26 @@ strong {
|
|||||||
.license-rules .label {
|
.license-rules .label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.license-rules li {
|
.license-rules li {
|
||||||
background-position: 0 1px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 12px 12px;
|
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
padding-left: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.license-rules li:hover {
|
.license-rules li:hover {
|
||||||
color: #443a33;
|
color: #443a33;
|
||||||
}
|
}
|
||||||
|
|
||||||
.license-required li {
|
.license-sprite {
|
||||||
background-image: url(../img/blue-dot@2x.png);
|
background-image: url(../img/license-sprite.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.license-permitted li {
|
.sidebar .source span { background-position: 0 0; width: 16px; height: 12px; }
|
||||||
background-image: url(../img/green-dot@2x.png);
|
.license-forbidden span { background-position: -16px 0; width: 12px; height: 12px; }
|
||||||
}
|
.license-permitted span { background-position: -28px 0; width: 12px; height: 12px; }
|
||||||
|
.license-required span { background-position: -40px 0; width: 12px; height: 12px; }
|
||||||
.license-forbidden li {
|
|
||||||
background-image: url(../img/red-dot@2x.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.license-rules-sidebar li {
|
.license-rules-sidebar li {
|
||||||
float: none;
|
float: none;
|
||||||
@ -346,12 +342,6 @@ strong {
|
|||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar .source a {
|
|
||||||
padding-left: 20px;
|
|
||||||
background: transparent url(../img/source@2x.png) 0 1px no-repeat;
|
|
||||||
background-size: 16px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar .boilerplate {
|
.sidebar .boilerplate {
|
||||||
font: 0.7em "Courier new", courier;
|
font: 0.7em "Courier new", courier;
|
||||||
}
|
}
|
||||||
@ -493,4 +483,12 @@ strong {
|
|||||||
-moz-background-size: 72px 198px;
|
-moz-background-size: 72px 198px;
|
||||||
background-size: 72px 198px;
|
background-size: 72px 198px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.license-sprite {
|
||||||
|
background-image: url(../img/license-sprite@2x.png);
|
||||||
|
-webkit-background-size: 52px 12px;
|
||||||
|
-moz-background-size: 52px 12px;
|
||||||
|
background-size: 52px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 272 B |
Binary file not shown.
Before Width: | Height: | Size: 276 B |
BIN
img/license-sprite.png
Normal file
BIN
img/license-sprite.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 639 B |
BIN
img/license-sprite@2x.png
Normal file
BIN
img/license-sprite@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 742 B |
Binary file not shown.
Before Width: | Height: | Size: 275 B |
Binary file not shown.
Before Width: | Height: | Size: 357 B |
Loading…
Reference in New Issue
Block a user