1.0.2 • Published 5 years ago
am-cookies-bar v1.0.2
Cookies bar
Npm package for easy implementation of a cookie bar.
Install
In a public folder (will be accessible in production env) run following command
npm i am-cookies-barInsert into a template (eg. for Nette)
<link rel="stylesheet" type="text/css" href="{$basePath}/node_modules/am-cookies-bar/dist/cookiesbar.css"/>
<script src="{$basePath}/node_modules/am-cookies-bar/dist/cookiesbar.min.js"></script>
<script>
$.cookiesBar.init({
// Options
// info_link: {plink Page:Cookies},
});
</script>Options
key: Cookies keymain_class: main wrapper CSS classclasses: another wrapper classestext: Text of the cookies baragree_classes: CSS classes of the agree buttonagree_text: Text of the agree buttoninfo: bool value - if you want to show additional info buttoninfo_text: Text of the info buttoninfo_classes: CSS classes of the info buttoninfo_link: Link for the info buttoninfo_target:_self | _blank(default_self)bar_html: HTMl template of the bar
Theming
Base style is in sass/cookiesbar.scss. If you want to change theme you can include your own css, or use sass and change default variables.