diff --git a/.gitignore b/.gitignore index 26495ca..d5a931a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,13 @@ /_site /node_modules /.bundle -assets/vendor/zeroclipboard/docs -assets/vendor/zeroclipboard/src -assets/vendor/zeroclipboard/test +assets/vendor/clipboard/src +assets/vendor/clipboard/test assets/vendor/selectivizr/tests assets/vendor/qtip2/basic /vendor +/.sass-cache +.ruby-version +/tmp +Gemfile.lock +.jekyll-metadata diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..4b122f8 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,20 @@ +AllCops: + TargetRubyVersion: 2.5 + Exclude: + - _site/**/* + - vendor/**/* + +Metrics/BlockLength: + Enabled: false + +Metrics/LineLength: + Enabled: false + +Metrics/MethodLength: + Enabled: false + +Metrics/AbcSize: + Enabled: false + +Style/Documentation: + Enabled: false diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 227cea2..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.0.0 diff --git a/.travis.yml b/.travis.yml index 1b743c0..2caf39f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,15 @@ script: "./script/cibuild" #environment language: ruby rvm: - - 2.0.0 + - 2.5.3 + +addons: + apt: + packages: + - libcurl4-openssl-dev + +before_install: + - gem update --system branches: only: @@ -14,3 +22,10 @@ branches: notifications: email: false + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +sudo: false +cache: bundler diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..31394ed --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,71 @@ +Contributor Covenant Code of Conduct + +Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource+choosealicense.com@github.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 04435d9..cc487c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,21 +2,37 @@ We love Pull Requests! Your contributions help make ChooseALicense.com great. +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + ## Getting Started So you want to contribute to ChooseALicense. Great! We welcome any help we can get. But first, please make sure you understand what -[this site is all about](http://choosealicense.com/about). +[this site is all about](https://choosealicense.com/about). It’s not a comprehensive list of all possible licenses. -It’s not a comprehensive list of all possible licenses. +## Adding a license -If you understand the goals of this site and still want to suggest a change, -please: +Choosealicense.com is intended to demystify license choices, not present or catalog all of them. As such, only a small number are highlighted on the home page or , and there are several requirements for a license to be [cataloged](https://choosealicense.com/appendix/) on the site: -* Make sure you have a [GitHub account](https://github.com/signup/free) -* Submit a ticket for your issue, assuming one does not already exist. - * Clearly describe the issue including steps to reproduce when it is a bug. - * Make sure you fill in the earliest version that you know has the issue. +1. The license must have [an SPDX identifier](https://spdx.org/licenses/). If your license isn't registered with SPDX, please [request that it be added](https://spdx.org/spdx-license-list/request-new-license). +2. The license must be listed on one of the following approved lists of licenses: + * [List of OSI approved licenses](https://opensource.org/licenses/alphabetical) + * [GNU's list of free licenses](https://www.gnu.org/licenses/license-list.en.html) (*note: the license must be listed in one of the three "free" categories*) + * [Open Definition's list of conformant licenses](https://opendefinition.org/licenses/) (non-code) +3. A [GitHub code search](https://github.com/search?q=MIT+filename%3ALICENSE&type=Code) must reveal at least *1,000* public repositories using the license +4. Identification of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that could be detected by [licensee](https://github.com/benbalter/licensee) if it knew about the license + +If your proposed license meets the above criteria, here's a few other things to keep in mind as you propose the license's addition: + +* Is the license already cataloged? See for a list of all of the licenses known by the site. +* Licenses live in the `/_licenses` folder. +* The license files should be in the format of `_licenses/[lowercased-spdx-id].txt` (e.g., `_licenses/mit.txt`) +* 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 match the corresponding text found at https://spdx.org/licenses/ +* The body of the file should be the text of the license in plain text. ## Making Changes @@ -24,16 +40,16 @@ The easiest way to make a change is to simply edit a file from your browser. When you click the edit button, it will fork the repository under your account. Note what issue/issues your patch fixes in the commit message. -For example, to [change this file](https://github.com/github/choosealicense.com/blob/master/CONTRIBUTING.md), +For example, to [change this file](/CONTRIBUTING.md), find it in the GitHub repository. Then click the `Edit` button. Make your changes, type in a commit message, and click the `Propose File Change` button. That’s it! -For more advanced changes, check out [the bootstrap instructions](https://github.com/github/choosealicense.com#run-it-on-your-machine) in the [project's readme](https://github.com/github/choosealicense.com/blob/master/README.md). +For more advanced changes, check out [the bootstrap instructions](https://github.com/github/choosealicense.com#run-it-on-your-machine) in the [project's readme](/README.md). ## Testing -[HTML::Proofer](https://github.com/gjtorikian/html-proofer) is set up to validate all links within the project. You can run this locally to ensure that your changes are valid: +[HTML::Proofer](https://github.com/gjtorikian/html-proofer) is set up to validate all links within the project. You can run this locally to ensure that your changes are valid: ```shell ./script/bootstrap diff --git a/Gemfile b/Gemfile index d1d35c1..6677662 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,23 @@ -source "https://rubygems.org" -ruby File.read(".ruby-version").strip +# frozen_string_literal: true -gem "github-pages" +source 'https://rubygems.org' + +require 'json' +require 'open-uri' +versions = JSON.parse(open('https://pages.github.com/versions.json').read) + +gem 'github-pages', versions['github-pages'] + +group :development do + gem 'colored' + gem 'fuzzy_match' + gem 'terminal-table' +end group :test do - gem "html-proofer" - gem "rake" + gem 'html-proofer', '~> 3.0' + gem 'licensee' + gem 'rake' + gem 'rspec' + gem 'rubocop' end diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index e231bc7..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,81 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.2.9) - blankslate (2.1.2.4) - classifier (1.3.4) - fast-stemmer (>= 1.0.0) - colorator (0.1) - colored (1.2) - commander (4.1.5) - highline (~> 1.6.11) - ethon (0.6.2) - ffi (>= 1.3.0) - mime-types (~> 1.18) - fast-stemmer (1.0.2) - ffi (1.9.3) - github-pages (12) - RedCloth (= 4.2.9) - jekyll (= 1.4.2) - kramdown (= 1.2.0) - liquid (= 2.5.4) - maruku (= 0.7.0) - rdiscount (= 2.1.7) - redcarpet (= 2.3.0) - highline (1.6.20) - html-proofer (0.4.1) - colored (~> 1.2) - mercenary (~> 0.2.0) - nokogiri (~> 1.6.0) - typhoeus (~> 0.6.7) - jekyll (1.4.2) - classifier (~> 1.3) - colorator (~> 0.1) - commander (~> 4.1.3) - liquid (~> 2.5.2) - listen (~> 1.3) - maruku (~> 0.7.0) - pygments.rb (~> 0.5.0) - redcarpet (~> 2.3.0) - safe_yaml (~> 0.9.7) - toml (~> 0.1.0) - kramdown (1.2.0) - liquid (2.5.4) - listen (1.3.1) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - rb-kqueue (>= 0.2) - maruku (0.7.0) - mercenary (0.2.1) - mime-types (1.25.1) - mini_portile (0.5.2) - nokogiri (1.6.1) - mini_portile (~> 0.5.0) - parslet (1.5.0) - blankslate (~> 2.0) - posix-spawn (0.3.8) - pygments.rb (0.5.4) - posix-spawn (~> 0.3.6) - yajl-ruby (~> 1.1.0) - rake (10.1.1) - rb-fsevent (0.9.4) - rb-inotify (0.9.3) - ffi (>= 0.5.0) - rb-kqueue (0.2.0) - ffi (>= 0.5.0) - rdiscount (2.1.7) - redcarpet (2.3.0) - safe_yaml (0.9.7) - toml (0.1.0) - parslet (~> 1.5.0) - typhoeus (0.6.7) - ethon (~> 0.6.2) - yajl-ruby (1.1.0) - -PLATFORMS - ruby - -DEPENDENCIES - github-pages - html-proofer - rake diff --git a/LICENSE.md b/LICENSE.md index 2a344f7..4b26f77 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014 GitHub, Inc. +Copyright (c) 2013-2018 GitHub, Inc. and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ee2b8ff..7b6b860 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,18 @@ -# Choose a License Web Site [![Build Status](https://travis-ci.org/github/choosealicense.com.png?branch=gh-pages)](https://travis-ci.org/github/choosealicense.com) +**[ChooseALicense.com](https://choosealicense.com)** aims to provide **accurate**, **non-judgmental**, and **understandable** information about popular **open source licenses** in order to **help people make informed decisions** about the projects they start, maintain, contribute to, and use. -Like a Choose Your Own Adventure site, but only much less interesting. +[![Build Status](https://travis-ci.org/github/choosealicense.com.svg?branch=gh-pages)](https://travis-ci.org/github/choosealicense.com) -# Intro +We catalog [select](CONTRIBUTING.md#adding-a-license) open source licenses with a [Jekyll collection](https://jekyllrb.com/docs/collections/) (in `_licenses`). The catalog is used to render [ChooseALicense.com](https://choosealicense.com) and is regularly vendored into [Licensee](https://github.com/benbalter/licensee), which GitHub uses to provide a [license chooser and license detection](https://help.github.com/articles/adding-a-license-to-a-repository/), a [licenses API](https://developer.github.com/v3/licenses/), and to [display license descriptions and metadata](https://github.com/blog/2335-open-source-license-descriptions-and-metadata). -A lot of repositories on GitHub.com don't have a license. GitHub provides -a license chooser, but if you don't know anything about licenses, how are you -supposed to make an informed decision? +## Goals -ChooseALicense.com is designed to help people make an informed decision about -licenses. +* Be accurate, non-judgmental, and understandable. Our goal is to help you find a license that meets *your* goals. +* The homepage should have just enough to help most folks make a decision about what license to use for a project they contribute to. +* For the rest, the site will contain additional information about licenses common to specific communities and situations. +* Collaborate with and reinforce other licensing best practices and standards projects. +* Not comprehensive. Seems like an odd goal, but there are a bajillion licenses out there. We're going to have to filter that down to a small list of those that matter. -# Immediate Goals - -* Politics Free - Let's just not get into it. -* Well designed, but that goes without saying. -* The homepage should have just enough to help 99% of folks make a decision. -* For the 1%, the site will contain a list of licenses common to specific -communities and situations. -* Not comprehensive. Seems like an odd goal, but there are a bajillion -licenses out there. We're going to have to filter that down to a -small list of those that matter. - -# Run It On Your Machine +## Run It On Your Machine ```bash git clone https://github.com/github/choosealicense.com.git @@ -30,51 +20,81 @@ cd choosealicense.com script/bootstrap script/server ``` + Open `http://localhost:4000` in your favorite browser. -# Adding a license +## Adding a license -The text of the license should be wrapped to a 78 character width. +For information on adding a license, see [the CONTRIBUTING file](https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license). -Licenses sit in the `/licenses` folder. Each license has YAML front matter -describing the license's properties. The body of the file should be the text -of the license in plain text. The available metadata fields are: +## License metadata -* `title` - The name of the license -* `layout` - This should be `license` -* `permalink` - The absolute URL to the license, beginning with `/licenses/` -* `source` - URL to the license source text -* `note` - The note field in the sidebar (optional) -* `how` - How to use the license, also in the sidebar -* `required`, `permitted`, `forbidden` - bulleted list of rules applicable to the license (see below) -* `filename` - The filename to be created on GitHub.com when a repository is initialized with this license. +Licenses sit in the `/_licenses` folder. Each license has YAML front matter describing the license's properties. The body of the file contains the text of the license in plain text. The available metadata fields are: -The licenses on choosealicense.com are regularly imported to GitHub.com to be -used as the list of licenses available when creating a repository. When we -create a repository, we will replace certain strings in the license with -variables from the repository. These can be used to create accurate copyright -notices. The available variables are: +#### Required fields -* `[fullname]` - The full name or username of the repository owner -* `[login]` - The repository owner's username -* `[email]` - The repository owner's primary email address -* `[project]` - The repository name -* `[description]` - The description of the repository -* `[year]` - The current year +* `title` - The license full name specified by https://spdx.org/licenses/ +* `spdx-id` - Short identifier specified by https://spdx.org/licenses/ +* `description` - A human-readable description of the license +* `how` - Instructions on how to implement the license +* `using` - A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url` +* `permissions` - Bulleted list of permission rules +* `conditions` - Bulleted list of condition rules +* `limitations` - Bulleted list of limitation rules -# Rules +#### Optional fields -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. +* `featured` - Whether the license should be featured on the main page (defaults to false) +* `hidden` - Whether the license is neither [popular](https://opensource.org/licenses) nor fills out the [spectrum of licenses](https://choosealicense.com/licenses/) from strongly conditional to unconditional (defaults to true) +* `nickname` - Customary short name if applicable (e.g, GPLv3) +* `note` - Additional information about the licenses +* `redirect_from` - Relative path(s) to redirect to the license from, to prevent breaking old URLs -# License +### Auto-populated fields -The content of this project itself is licensed under the -[Creative Commons Attribution 3.0 license](http://creativecommons.org/licenses/by/3.0/us/deed.en_US), -and the underlying source code used to format and display that content -is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php). +The licenses on choosealicense.com are regularly imported to GitHub.com to be used as the list of licenses available when creating a repository. When we create a repository, we will replace certain strings in the license with variables from the repository. These can be used to create accurate copyright notices. The available variables are: + +#### Fields + +* `fullname` - The full name or username of the repository owner +* `login` - The repository owner's username +* `email` - The repository owner's primary email address +* `project` - The repository name +* `description` - The description of the repository +* `year` - The current year +* `projecturl` - The repository URL or other project website + +## License properties + +The license properties (rules) are stored as a bulleted list within the licenses YAML front matter. 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 `_data/rules.yml` and reference it in the appropriate license. + +### Rules + +#### Permissions + +* `commercial-use` - This software and derivatives may be used for commercial purposes. +* `modifications` - This software may be modified. +* `distribution` - This software may be distributed. +* `private-use` - This software may be used and modified in private. +* `patent-use` - This license provides an express grant of patent rights from contributors. + +#### Conditions + +* `include-copyright` - A copy of the license and copyright notice must be included with the software. +* `document-changes` - Changes made to the code must be documented. +* `disclose-source` - Source code must be made available when the software is distributed. +* `network-use-disclose` - Users who interact with the software via network are given the right to receive a copy of the source code. +* `same-license` - Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used. +* `same-license--file` - Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used. +* `same-license--library` - Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used, or this condition may not apply to works that use the software as a library. + +#### Limitations + +* `trademark-use` - This license explicitly states that it does NOT grant trademark rights, even though licenses without such a statement probably do not grant any implicit trademark rights. +* `liability` - This license includes a limitation of liability. +* `patent-use` - This license explicitly states that it does NOT grant any rights in the patents of contributors. +* `warranty` - The license explicitly states that it does NOT provide any warranty. + +## License + +The content of this project itself is licensed under the [Creative Commons Attribution 3.0 Unported license](https://creativecommons.org/licenses/by/3.0/), and the underlying source code used to format and display that content is licensed under the [MIT license](LICENSE.md). diff --git a/Rakefile b/Rakefile index ed29cdb..42c56e3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,34 @@ -require "html/proofer" +# frozen_string_literal: true + +require 'html-proofer' +require 'rspec/core/rake_task' + +desc 'Run specs' +RSpec::Core::RakeTask.new do |t| + t.pattern = 'spec/**/*_spec.rb' + t.rspec_opts = ['--order', 'rand', '--color'] +end task :test do - sh "bundle exec jekyll build --trace" - # ignore href="#" for the "Copy to clipboard" button - HTML::Proofer.new("./_site").run + sh 'bundle exec jekyll build' + Rake::Task['spec'].invoke + HTMLProofer.check_directory('./_site', + check_html: true, + validation: { ignore_script_embeds: true }, + url_swap: { %r{https://choosealicense.com} => '' }, + hydra: { max_concurrency: 10 }, + check_img_http: true).run +end + +task :approved_licenses do + require './spec/spec_helper' + approved = approved_licenses + approved.select! { |l| spdx_ids.include?(l) } + puts "#{approved.count} approved licenses:" + puts approved.join(', ') + puts "\n" + + potential = approved - (licenses.map { |l| l['id'] }) + puts "#{potential.count} potential additions:" + puts potential.join(', ') end diff --git a/_config.yml b/_config.yml index e38fb71..dffa752 100644 --- a/_config.yml +++ b/_config.yml @@ -1,77 +1,50 @@ --- -title: ChooseALicense.com +title: Choose a License +description: Non-judgmental guidance on choosing a license for your open source project relative_permalinks: false markdown: kramdown -url: "http://choosealicense.com" +url: "https://choosealicense.com" -rules: +collections: + licenses: + output: true + permalink: /licenses/:path/ - required: - - description: Include a copy of the license and copyright notice with the code. - label: License and copyright notice - tag: include-copyright - - description: Indicate significant changes made to the code. - label: State Changes - tag: document-changes - - description: Source code must be made available when distributing the software. In the case of LGPL, the source for the library (and not the entire program) must be made available. - label: Disclose Source - tag: disclose-source - - description: The library may be used within a non-open-source application. - label: Library usage - tag: library-usage - - description: You must change the name of the software if you modify it. - label: Rename - tag: rename - - permitted: - - description: This software and derivatives may be used for commercial purposes. - label: Commercial Use - tag: commercial-use - - description: This software may be modified. - label: Modification - tag: modifications - - description: You may distribute this software. - label: Distribution - tag: distribution - - description: You may grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: sublicense - - description: You may use and modify the software without distributing it. - label: Private Use - tag: private-use - - description: This license provides an express grant of patent rights from the contributor to the recipient. - label: Patent Grant - tag: patent-grant - - forbidden: - - description: While this may be implicitly true of all licenses, this license explicitly states that you may NOT use the names, logos, or trademarks of contributors. - label: Use Trademark - tag: trademark-use - - description: Software is provided without warranty and the software author/license owner cannot be held liable for damages. - label: Hold Liable - tag: no-liability - - description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: no-sublicense - - description: This software may not be modified. - label: Modification - tag: modifications - - description: You may not distribute this software. - label: Distribution - tag: distribution - - description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license. - label: Sublicensing - tag: sublicense +defaults: + - + scope: + path: "" + type: "licenses" + values: + hidden: true + layout: license exclude: -- app.coffee -- CNAME -- CONTRIBUTING.md -- Gemfile -- Gemfile.lock -- LICENSE.md -- licenses.json -- Rakefile -- README.md -- script -- bundle + - app.coffee + - CNAME + - CONTRIBUTING.md + - Gemfile + - Gemfile.lock + - LICENSE.md + - Rakefile + - README.md + - script + - vendor/bundle + - test + - tests + - assets/vendor/selectivizr/tests + - assets/vendor/clipboard/test + - assets/vendor/*/README.* + +plugins: + - jekyll-sitemap + - jekyll-redirect-from + - jekyll-seo-tag + - jekyll-coffeescript + - jekyll-github-metadata # For 'Improve this page' links + +sass: + style: :compressed + +twitter: + username: "@github" diff --git a/_data/fields.yml b/_data/fields.yml new file mode 100644 index 0000000..4e55d42 --- /dev/null +++ b/_data/fields.yml @@ -0,0 +1,26 @@ +# The licenses on choosealicense.com are regularly imported to GitHub.com to +# be used as the list of licenses available when creating a repository. When +# we create a repository, we will replace certain strings in the license with +# variables from the repository. These can be used to create accurate copyright +# notices. The available variables are: + +- name: fullname + description: The full name or username of the repository owner + +- name: login + description: The repository owner's username + +- name: email + description: The repository owner's primary email address + +- name: project + description: The repository name + +- name: description + description: The description of the repository + +- name: year + description: The current year + +- name: projecturl + description: The repository URL or other project website diff --git a/_data/meta.yml b/_data/meta.yml new file mode 100644 index 0000000..2a58872 --- /dev/null +++ b/_data/meta.yml @@ -0,0 +1,56 @@ +# Each license has YAML front matter describing the license's properties. +# The available fields are: + +- name: title + description: The license full name specified by https://spdx.org/licenses/ + required: true + +- name: spdx-id + description: Short identifier specified by https://spdx.org/licenses/ + required: true + +- name: description + description: A human-readable description of the license + required: true + +- name: how + description: Instructions on how to implement the license + required: true + +- name: conditions + description: Bulleted list of required rules + required: true + +- name: permissions + description: Bulleted list of permitted rules + required: true + +- name: limitations + description: Bulleted list of limited rules + required: true + +- name: using + description: 'A list of 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url`' + required: true + +# Optional fields + +- name: featured + description: Whether the license should be featured on the main page (defaults to false) + required: false + +- name: hidden + description: Whether the license is neither [popular](https://opensource.org/licenses) nor fills out the [spectrum of licenses](https://choosealicense.com/licenses/) from strongly conditional to unconditional (defaults to true) + required: false + +- name: nickname + description: Customary short name if applicable (e.g, GPLv3) + required: false + +- name: note + description: Additional information about the licenses + required: false + +- name: redirect_from + description: Relative path(s) to redirect to the license from, to prevent breaking old URLs + required: false diff --git a/_data/rules.yml b/_data/rules.yml new file mode 100644 index 0000000..3a20f10 --- /dev/null +++ b/_data/rules.yml @@ -0,0 +1,53 @@ +permissions: +- description: This software and derivatives may be used for commercial purposes. + label: Commercial use + tag: commercial-use +- description: This software may be modified. + label: Modification + tag: modifications +- description: This software may be distributed. + label: Distribution + tag: distribution +- description: This software may be used and modified in private. + label: Private use + tag: private-use +- description: This license provides an express grant of patent rights from contributors. + label: Patent use + tag: patent-use + +conditions: +- description: A copy of the license and copyright notice must be included with the software. + label: License and copyright notice + tag: include-copyright +- description: Changes made to the code must be documented. + label: State changes + tag: document-changes +- description: Source code must be made available when the software is distributed. + label: Disclose source + tag: disclose-source +- description: Users who interact with the software via network are given the right to receive a copy of the source code. + label: Network use is distribution + tag: network-use-disclose +- description: Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used. + label: Same license + tag: same-license +- description: Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used. + label: Same license (file) + tag: same-license--file +- description: Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used, or this condition may not apply to works that use the software as a library. + label: Same license (library) + tag: same-license--library + +limitations: +- description: This license explicitly states that it does NOT grant trademark rights, even though licenses without such a statement probably do not grant any implicit trademark rights. + label: Trademark use + tag: trademark-use +- description: This license includes a limitation of liability. + label: Liability + tag: liability +- description: This license explicitly states that it does NOT grant any rights in the patents of contributors. + label: Patent use + tag: patent-use +- description: The license explicitly states that it does NOT provide any warranty. + label: Warranty + tag: warranty diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html index ec8909f..1cc6bdc 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs.html @@ -8,4 +8,32 @@ {% endif %} -{% endunless %} \ No newline at end of file + +{% endunless %} diff --git a/_includes/css/jquery.qtip.min.css b/_includes/css/jquery.qtip.min.css deleted file mode 100644 index fc172a4..0000000 --- a/_includes/css/jquery.qtip.min.css +++ /dev/null @@ -1,2 +0,0 @@ -/* qTip2 v2.2.0 basic css3 | qtip2.com | Licensed MIT, GPL | Thu Nov 21 2013 20:35:00 */ -.qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;cursor:pointer;outline:medium none;border-width:1px;border-style:solid;border-color:transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-titlebar .ui-icon,.qtip-icon .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:transparent none no-repeat -100em -100em}.qtip-focus{}.qtip-hover{}.qtip-default{border-width:1px;border-style:solid;border-color:#F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111} .qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1} .qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030} .qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0} .qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon{border-color:#D95252}.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252} .qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0} .qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-rounded,.qtip-tipsy,.qtip-bootstrap{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.qtip-rounded .qtip-titlebar{-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.qtip-youtube{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;box-shadow:0 0 3px #333;color:#fff;border-width:0;background:#4A4A4A;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,#000));background-image:-webkit-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-moz-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-ms-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:#4A4A4A;background-color:rgba(0,0,0,0)}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(#717171),to(#232323));background-image:-moz-linear-gradient(top,#717171,#232323);background-image:-webkit-linear-gradient(top,#717171,#232323);background-image:-ms-linear-gradient(top,#717171,#232323);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 12px #333;-moz-box-shadow:0 0 12px #333;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323)"}.qtip-jtools .qtip-titlebar,.qtip-jtools .qtip-content{background:transparent;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{-webkit-box-shadow:4px 4px 5px rgba(0,0,0,.4);-moz-box-shadow:4px 4px 5px rgba(0,0,0,.4);box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-webkit-gradient(linear,left top,left bottom,from(#3A79B8),to(#2E629D));background-image:-webkit-linear-gradient(top,#3A79B8,#2E629D);background-image:-moz-linear-gradient(top,#3A79B8,#2E629D);background-image:-ms-linear-gradient(top,#3A79B8,#2E629D);background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:transparent}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}x:-o-prefocus,.qtip .qtip-tip{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:transparent;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"}.qtipmodal-ie6fix{position:absolute!important} \ No newline at end of file diff --git a/_includes/css/normalize.min.css b/_includes/css/normalize.min.css deleted file mode 100644 index 7f26c03..0000000 --- a/_includes/css/normalize.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/_includes/css/responsive.css b/_includes/css/responsive.css new file mode 100644 index 0000000..b104d27 --- /dev/null +++ b/_includes/css/responsive.css @@ -0,0 +1,172 @@ +/* iPads (landscape) ----------- */ +@media only screen and (max-width : 1050px) { + .container { + width: 100%; + padding: 0 20px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .triptych { + width: 100%; + } + .triptych li { + width: 33%; + margin-left: 0; + padding: 0 20px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .triptych h3 { + width: auto; + padding: 0 30px; + } + .home h2 { + line-height: 30px; + padding: 20px 100px; + position: relative; + } + .home h2 span { + position: absolute; + display: block; + float: left; + top: 50%; + margin-top: -22px; + } + .home h2 span:first-child { + left: 65px; + } + .home h2 span:last-child { + right: 65px; + } + .sidebar a.button { + margin: 14px 0 20px; + } + .license-body { + width: calc(100% - 250px); + } +} + +/* iPads (portrait) ----------- */ +@media only screen and (max-width : 800px), (max-device-width : 1050px) and (orientation : portrait) { + .triptych h3 { + width: auto; + padding: 0 10px; + margin-bottom: 10px; + } + .sidebar { + float: left; + width: 50%; + } + .license-body { + width: 100%; + } + .license-rules { + border-bottom: none; + } + .license-details { + width: 65%; + } +} + +/* Smartphones ----------- */ +@media only screen and (max-width : 680px) { + .triptych li { + float: none; + width: 100%; + margin-bottom: 50px; + } + .home h2 { + padding: 20px 70px; + } + .home h2 span:first-child { + left: 35px; + } + .home h2 span:last-child { + right: 35px; + } + .license-overview { + margin-bottom: 20px; + } + .license-overview-heading { + float: none; + width: 100%; + } + .license-details { + float: none; + width: 100%; + padding-left: 0; + } + .site-footer { + text-align: center; + } + .site-footer nav, .site-footer p, .with-love { + float: none; + } + .site-footer nav { + margin: 0 auto 10px; + } +} + +/* Smartphones (landscape) ----------- */ +@media only screen and (max-width : 481px) { + h1 { + font-size: 30px; + margin-bottom: 15px; + } + .home h1 { + font-size: 33px; + } + .home h2 { + font-size: 17px; + line-height: 20px; + padding: 20px 45px; + } + .home h2 span:first-child { + left: 0; + } + .home h2 span:last-child { + right: 0; + } + .home h2 span { + margin-top: -16px; + } + .sidebar { + width: 100%; + } + .license-body { + word-wrap: break-word; + } + .license-body pre { + font-size: 10px; + } + .license-rules:not(.license-rules-sidebar) li { + margin-right: 5px; + font-size: 10px; + -webkit-text-size-adjust: none; + } + .license-rules:not(.license-rules-sidebar) li span { + background-size: 44px; + width: 10px; + height: 10px; + top: 1px; + position: relative; + } + .license-rules:not(.license-rules-sidebar) .license-conditions span { + background-position: -34px 0; + } + .license-rules:not(.license-rules-sidebar) .license-permissions span { + background-position: -24px 0px; + } + .license-rules:not(.license-rules-sidebar) .license-limitations span { + background-position: -14px 0; + } +} + +/* Smartphones (portrait) ----------- */ +@media only screen and (max-width : 321px) { + .container { + padding: 0 10px; + } +} diff --git a/_includes/footer.html b/_includes/footer.html index c9c56c2..6a16215 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -2,31 +2,44 @@

- If you have questions or issues, it is always best to consult a legal professional.
- This site is licensed under the + The content of this site is licensed under the Creative Commons Attribution 3.0 Unported License.

- Demystified with <3 by GitHub, Inc. + Curated with <3 by GitHub, Inc. and You!
- {% if page.layout == "license" or page.class == "license-types" %} + {% if page.collection == "licenses" or page.class == "license-types" %} - - + + + {% endif %} +``` + +Or load it from a CDN. + +```html + +``` + +Now, you need to instantiate it using a DOM selector. This selector corresponds to the trigger element(s), for example ` +``` + +### Cut text from another element + +Additionally, you can define a `data-clipboard-action` attribute to specify if you want to either `copy` or `cut` content. + +If you omit this attribute, `copy` will be used by default. + +example-3 + +```html + + + + + +``` + +As you may expect, the `cut` action only works on `` or `