mirror of
https://github.com/github/choosealicense.com
synced 2025-01-22 03:17:48 +01:00
commit
383a69c3b9
14
README.md
14
README.md
@ -24,11 +24,13 @@ small list of those that matter.
|
|||||||
|
|
||||||
# Run It On Your Machine
|
# Run It On Your Machine
|
||||||
|
|
||||||
1. `git clone https://github.com/github/choosealicense.com`
|
```bash
|
||||||
2. `cd choosealicense.com`
|
git clone https://github.com/github/choosealicense.com.git
|
||||||
3. `script/bootstrap`
|
cd choosealicense.com
|
||||||
4. `script/server`
|
script/bootstrap
|
||||||
5. Open [localhost:4000](http://localhost:4000) in your favorite browser
|
script/server
|
||||||
|
```
|
||||||
|
Open [localhost:4000](http://localhost:4000) in your favorite browser
|
||||||
|
|
||||||
# Adding a license
|
# Adding a license
|
||||||
|
|
||||||
@ -54,7 +56,7 @@ The licenses on choosealicense.com are regularly imported to GitHub.com to be us
|
|||||||
|
|
||||||
# Rules
|
# 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
|
# License
|
||||||
|
|
||||||
|
@ -4,18 +4,14 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
|
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
|
||||||
{% if page.description %}
|
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
|
||||||
<meta name="description" content="{{ page.description | strip_html }}">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
|
||||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
|
<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>
|
<script src="/js/modernizr.js"></script>
|
||||||
<!--[if (gte IE 6)&(lte IE 8)]>
|
<!--[if (gte IE 6)&(lte IE 8)]>
|
||||||
<script src="/js/selectivizr-min.js"></script>
|
<script src="/js/selectivizr-min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
|
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -96,13 +96,13 @@ class Choosealicense
|
|||||||
# Initializes pill navigation for license variations
|
# Initializes pill navigation for license variations
|
||||||
initLicenseVariationNav: ->
|
initLicenseVariationNav: ->
|
||||||
$(".js-nav-pills a").click (e) ->
|
$(".js-nav-pills a").click (e) ->
|
||||||
selectedTab = $(this).data('selected-tab')
|
selectedTab = $(this).data("selected-tab")
|
||||||
nav = $(this).closest('.js-nav-pills')
|
nav = $(this).closest(".js-nav-pills")
|
||||||
nav.find('li').removeClass('active')
|
nav.find("li").removeClass("active")
|
||||||
nav.closest('.js-license-variations').siblings('.js-variation-tab').removeClass('active')
|
nav.closest(".js-license-variations").siblings(".js-variation-tab").removeClass("active")
|
||||||
|
|
||||||
$(this).parent('li').addClass('active')
|
$(this).parent("li").addClass("active")
|
||||||
$('.' + selectedTab).addClass('active')
|
$("." + selectedTab).addClass("active")
|
||||||
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
|
@ -110,12 +110,12 @@
|
|||||||
Choosealicense.prototype.initLicenseVariationNav = function() {
|
Choosealicense.prototype.initLicenseVariationNav = function() {
|
||||||
return $(".js-nav-pills a").click(function(e) {
|
return $(".js-nav-pills a").click(function(e) {
|
||||||
var nav, selectedTab;
|
var nav, selectedTab;
|
||||||
selectedTab = $(this).data('selected-tab');
|
selectedTab = $(this).data("selected-tab");
|
||||||
nav = $(this).closest('.js-nav-pills');
|
nav = $(this).closest(".js-nav-pills");
|
||||||
nav.find('li').removeClass('active');
|
nav.find("li").removeClass("active");
|
||||||
nav.closest('.js-license-variations').siblings('.js-variation-tab').removeClass('active');
|
nav.closest(".js-license-variations").siblings(".js-variation-tab").removeClass("active");
|
||||||
$(this).parent('li').addClass('active');
|
$(this).parent("li").addClass("active");
|
||||||
$('.' + selectedTab).addClass('active');
|
$("." + selectedTab).addClass("active");
|
||||||
return e.preventDefault();
|
return e.preventDefault();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{% for variation in site.pages %}
|
{% for variation in site.pages %}
|
||||||
{% if variation.category and variation.category == page.category %}
|
{% 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 %}">
|
<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>
|
<tr>
|
||||||
{% assign types = "required|permitted|forbidden" | split: "|" %}
|
{% assign types = "required|permitted|forbidden" | split: "|" %}
|
||||||
{% for type in types %}
|
{% for type in types %}
|
||||||
@ -32,7 +32,7 @@
|
|||||||
{% for type in types %}
|
{% for type in types %}
|
||||||
<td>
|
<td>
|
||||||
<ul class="license-{{ type }}">
|
<ul class="license-{{ type }}">
|
||||||
{% assign rules = site.rules[type] | sort: 'label' %}
|
{% assign rules = site.rules[type] | sort: "label" %}
|
||||||
{% 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 %}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
{% for type in types %}
|
{% for type in types %}
|
||||||
<h3>{{ type | capitalize }}</h3>
|
<h3>{{ type | capitalize }}</h3>
|
||||||
<ul class="license-{{ type }}">
|
<ul class="license-{{ type }}">
|
||||||
{% assign rules = site.rules[type] | sort: 'label' %}
|
{% assign rules = site.rules[type] | sort: "label" %}
|
||||||
{% 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 %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user