1.0.2 • Published 4 years ago

creative-commons-web-component v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Creative Commons license generator as web component

Encapsulate the html code from the Creative Commons license 'Choose a license' form in a web component.

You can define your license and license metadata through the component attributes.

Use

There are two options to use the component.

Integrate it in your javascript project

npm i creative-commons-web-component

And import it in your js file:

import 'creative-commons-web-component'

Then use it in your html or js template

<cc-license [attributes?]></cc-license>

Use it directly in your page

<script src="https://unpkg.com/creative-commons-web-component/ccLicense.dist.js"></script>
<cc-license [attributes?]></cc-license>

Attributes

All attributes are optional

AttributeTypeDescription
license'by' | 'by-nc' | 'by-nc-nd' | 'by-nc-sa' | 'by-nd' | 'by-sa'Choose the license (overwrites adaptations & commercial)
adaptations'yes' | 'no' | 'share-alike'Allow adaptations of your work to be shared?
commercialBooleanAllow commercial uses of your work?
icon'88x31' | '80x15'The icon size
work-titleStringThe title of the work you are licensing.
attribution-titleStringThe name of the person who should receive attribution for the work. Most often, this is the author.
attribution-urlStringThe URL to which the work should be attributed.
permissionsStringA URL where a user can find information about obtaining rights that are not already permitted by the CC license.
sourceStringThe URL of the work upon which this work is based or derived.
format'audio' | 'video' | 'image' | 'text' | 'dataset' | 'interactive'Describes what kind of work is being licensed.
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago