CreativeCommons.org Vue.js components library.
Generated using vue-cli-template-library.
npm install vue-creativecommons
vue-creativecommons can be used as a module in both CommonJS and ES modular environments.
When in non-modular environment, vue-creativecommons will register all the components to vue by itself.
//
// You can register a component manually
//
import { CreativeCommonsIcon, CreativeCommonsLabel } from 'vue-creativecommons';
export default {
...
components: {
CreativeCommonsIcon,
CreativeCommonsLabel
},
...
};
//
// or register the whole module with vue
//
import vueCreativeCommons from 'vue-creativecommons';
// Install this library
Vue.use(vueCreativeCommons);
//
// You can register a component manually
//
var Vue = require('vue');
var vueCreativeCommons = require('vue-creativecommons');
var YourComponent = Vue.extend({
...
components: {
'cc-icon': vueCreativeCommons.CreativeCommonsIcon,
'cc-label': vueCreativeCommons.CreativeCommonsLabel
},
...
});
//
// or register the whole module with vue
//
var Vue = require('vue');
var vueCreativeCommons = require('vue-creativecommons');
// Install this library
Vue.use(vueCreativeCommons);
<script src="path/to/vue/vue.min.js"></script>
<script src="path/to/vue-creativecommons/dist/vue-creativecommons.min.js"></script>
<!-- Components are registered globally -->
<!-- normal icon -->
<cc-icon allow-adaptations="yes" allow-commercial-use="yes" icon-size="normal"></cc-icon>
<!-- compact icon -->
<cc-icon allow-adaptations="yes" allow-commercial-use="yes" icon-size="compact"></cc-icon>
- allowAdaptations(required) - Allow adaptations of your work to be shared?
yes
,no
orshare-alike
- allowCommercialUse(required) - Allow commercial uses of your work?
yes
orno
- iconSize(required) :
compact
ornormal
<cc-label allow-adaptations="yes" allow-commercial-use="yes"></cc-label>
This work is licensed under a Creative Commons Attribution 4.0 International License.
- allowAdaptations(required) - Allow adaptations of your work to be shared?
yes
,no
orshare-alike
- allowCommercialUse(required) - Allow commercial uses of your work?
yes
orno
See the GitHub release history.
See CONTRIBUTING.md.