1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-04 18:58:50 +01:00

Merge pull request #150 from XhmikosR/patch-1

Patch 1
This commit is contained in:
Phil Haack 2013-12-14 13:34:02 -08:00
commit 383a69c3b9
6 changed files with 26 additions and 28 deletions

View File

@ -24,11 +24,13 @@ small list of those that matter.
# Run It On Your Machine
1. `git clone https://github.com/github/choosealicense.com`
2. `cd choosealicense.com`
3. `script/bootstrap`
4. `script/server`
5. Open [localhost:4000](http://localhost:4000) in your favorite browser
```bash
git clone https://github.com/github/choosealicense.com.git
cd choosealicense.com
script/bootstrap
script/server
```
Open [localhost:4000](http://localhost:4000) in your favorite browser
# Adding a license
@ -54,7 +56,7 @@ The licenses on choosealicense.com are regularly imported to GitHub.com to be us
# Rules
* Rules (the license's properties) are stored as a bulleted list within the licenses YAML front matter. A full list of rules can be found in the repository's `_config.yml` file. Each rule has a name e.g., `include-copyright`, a human-readable label, e.g., `Copyright inclusion`, and a description `Include the original copyright with the code`. To add a new rule, simply add it to config.yml and reference it in the appropriate license.
Rules (the license's properties) are stored as a bulleted list within the licenses YAML front matter. A full list of rules can be found in the repository's `_config.yml` file. Each rule has a name e.g., `include-copyright`, a human-readable label, e.g., `Copyright inclusion`, and a description `Include the original copyright with the code`. To add a new rule, simply add it to `config.yml` and reference it in the appropriate license.
# License

View File

@ -4,18 +4,14 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
{% if page.description %}
<meta name="description" content="{{ page.description | strip_html }}">
{% endif %}
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon">
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css" media="screen">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<script src="/js/modernizr.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="/js/selectivizr-min.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">

View File

@ -96,13 +96,13 @@ class Choosealicense
# 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')
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')
$(this).parent("li").addClass("active")
$("." + selectedTab).addClass("active")
e.preventDefault()

View File

@ -110,12 +110,12 @@
Choosealicense.prototype.initLicenseVariationNav = function() {
return $(".js-nav-pills a").click(function(e) {
var nav, selectedTab;
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');
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");
return e.preventDefault();
});
};

View File

@ -21,7 +21,7 @@
{% for variation in site.pages %}
{% if variation.category and variation.category == page.category %}
<div id="{{ variation.tab-slug }}" class="variation-tab variation-{{ variation.tab-slug }} js-variation-tab{% if page.tab-slug == variation.tab-slug %} active{% endif %}">
<table class='license-rules'>
<table class="license-rules">
<tr>
{% assign types = "required|permitted|forbidden" | split: "|" %}
{% for type in types %}
@ -32,7 +32,7 @@
{% for type in types %}
<td>
<ul class="license-{{ type }}">
{% assign rules = site.rules[type] | sort: 'label' %}
{% assign rules = site.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if variation[type] contains req %}

View File

@ -24,7 +24,7 @@
{% for type in types %}
<h3>{{ type | capitalize }}</h3>
<ul class="license-{{ type }}">
{% assign rules = site.rules[type] | sort: 'label' %}
{% assign rules = site.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if page[type] contains req %}