1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-06 03:38:49 +01:00

Merge pull request #393 from github/cleanup-361-386

cleanup variant/family/fields forgotten in #361 and #386
This commit is contained in:
Mike Linksvayer 2016-04-17 12:11:29 -07:00
commit 355876520d
6 changed files with 14 additions and 72 deletions

View File

@ -28,7 +28,6 @@ If your proposed license meets the above criteria, here's a few other things to
* Each license has both [required and optional metadata](https://github.com/github/choosealicense.com#license-metadata) that should be included. * Each license has both [required and optional metadata](https://github.com/github/choosealicense.com#license-metadata) that should be included.
* The text of the license should be wrapped to a 78 character width. * The text of the license should be wrapped to a 78 character width.
* The body of the file should be the text of the license in plain text. * The body of the file should be the text of the license in plain text.
* Almost without exception, new licenses should be added as hidden (`hidden: true` in the YAML front matter), such that they are directly linkable and detectable, but not otherwise listed.
## Making Changes ## Making Changes

View File

@ -17,9 +17,6 @@ defaults:
type: "licenses" type: "licenses"
values: values:
layout: license layout: license
featured: false
hidden: true
variant: false
exclude: exclude:
- app.coffee - app.coffee

View File

@ -86,10 +86,10 @@
.home h2 span:last-child { .home h2 span:last-child {
right: 35px; right: 35px;
} }
.license-family { .license-overview {
margin-bottom: 20px; margin-bottom: 20px;
} }
.license-family-heading { .license-overview-heading {
float: none; float: none;
width: 100%; width: 100%;
} }
@ -98,13 +98,6 @@
width: 100%; width: 100%;
padding-left: 0; padding-left: 0;
} }
.license-variations {
height: auto;
padding-top: 0;
}
.license-variations ul {
height: 31px;
}
.site-footer { .site-footer {
text-align: center; text-align: center;
} }

View File

@ -1,9 +1,9 @@
{% assign id = "/licenses/" | append: include.license-id %} {% assign id = "/licenses/" | append: include.license-id %}
{% assign licenses = site.licenses | where:"id", id %} {% assign licenses = site.licenses | where:"id", id %}
{% for license in licenses %} {% for license in licenses %}
<div class="license-family clearfix" id="{{ include.license-id | slugify }}"> <div class="license-overview clearfix" id="{{ include.license-id | slugify }}">
<div class="license-family-heading"> <div class="license-overview-heading">
<h3 class="license-family-name"> <h3 class="license-overview-name">
<a href="{{ license.url }}"> <a href="{{ license.url }}">
{% if license.nickname %} {% if license.nickname %}
{{ license.nickname }} {{ license.nickname }}
@ -13,7 +13,7 @@
</a> </a>
</h3> </h3>
<p class="license-family-description">{{ license.description }}</p> <p class="license-overview-description">{{ license.description }}</p>
</div> </div>
<div class="license-details"> <div class="license-details">

View File

@ -144,12 +144,12 @@ strong {
.circular { background-position: 0 -129px; width: 72px; height: 69px; } .circular { background-position: 0 -129px; width: 72px; height: 69px; }
.license-family { .license-overview {
clear: both; clear: both;
margin-bottom: 50px; margin-bottom: 50px;
} }
.license-family-heading { .license-overview-heading {
float: left; float: left;
width: 35%; width: 35%;
} }
@ -163,21 +163,12 @@ strong {
padding-left: 20px; padding-left: 20px;
} }
.license-variations { .license-overview-name {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 31px;
padding-top: 23px;
margin-left: -10px;
}
.license-family-name {
font-size: 28px; font-size: 28px;
margin-top: 5px; margin-top: 5px;
} }
.license-family-description { .license-overview-description {
color: #555; color: #555;
} }
@ -364,30 +355,6 @@ strong {
margin-left: 2em; margin-left: 2em;
} }
.nav-pills > li {
float: left;
display: block;
margin-right: 10px;
}
.nav-pills > li > a {
padding: 5px 10px;
border-radius: 3px;
}
.nav-pills > li.active > a {
background-color: #149ad4;
color: #f7f4ef;
}
.variation-tab {
display: none;
}
.variation-tab.active {
display: block;
}
.small { .small {
font-size: 90%; font-size: 90%;
} }
@ -419,7 +386,7 @@ strong {
color: #298625; color: #298625;
} }
.qtip-permitted .qtip-titlebar { .qtip-permissions .qtip-titlebar {
background-color: #3dc637; background-color: #3dc637;
color: #fff; color: #fff;
} }

View File

@ -23,15 +23,14 @@ class Choosealicense
# Annotation rule types as defined in `_config.yml` # Annotation rule types as defined in `_config.yml`
ruletypes: ruletypes:
required: "Required" permissions: "Permission"
permitted: "Permitted" conditions: "Condition"
forbidden: "Forbidden" limitations: "Limitation"
# fire on document.ready # fire on document.ready
constructor: -> constructor: ->
@initTooltips() @initTooltips()
@initClipboard() @initClipboard()
@initLicenseVariationNav()
# Init tooltip action # Init tooltip action
initTooltips: -> initTooltips: ->
@ -72,18 +71,5 @@ class Choosealicense
clipboardComplete: (client, args) -> clipboardComplete: (client, args) ->
@textContent = "Copied!" @textContent = "Copied!"
# Initializes pill navigation for license variations
initLicenseVariationNav: ->
$(".js-nav-pills a").click (e) ->
selectedTab = $(this).data("selected-tab")
nav = $(this).closest(".js-nav-pills")
nav.find("li").removeClass("active")
nav.closest(".js-license-variations").siblings(".js-variation-tab").removeClass("active")
$(this).parent("li").addClass("active")
$("." + selectedTab).addClass("active")
e.preventDefault()
$ -> $ ->
new Choosealicense() new Choosealicense()