add-to-calendar-button
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "add-to-calendar-button", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.", | ||
"main": "assets/js/atcb.js", | ||
"main": "npm_dist/atcb_npm.js", | ||
"types": "index.d.ts", | ||
@@ -7,0 +7,0 @@ "style": "assets/css/atcb.css", |
@@ -47,3 +47,3 @@ # Your next Add-to-Calendar Button | ||
![Screenshot](https://github.com/jekuer/add-to-calendar-button/blob/main/screenshot.png?raw=true) | ||
![Demo Screenshot](https://github.com/jekuer/add-to-calendar-button/blob/main/demo.gif?raw=true) | ||
@@ -56,7 +56,6 @@ | ||
1. Simply **download** the code from GitHub **or clone** the git repository. | ||
2. Copy the css (atcb.min.css) and js (atcb.min.js) files from the assets folders into your project (the **.min.** files are required, but it is recommended to also copy the raw and map files). | ||
3. Include those files in your project. As usual, the css goes into the <head> (`<link rel="stylesheet" href="./assets/css/atcb.min.css">`), the js into the <body> footer (`<script type="module" src="./assets/js/atcb.min.js"></script>`). You can also combine them with other files, if you want to. | ||
4. Mind that when using this in a Vanilla JS style, you need to either include `type="module"` within the script tag **or** remove the last line from the js file (*module.exports*), since this is only relevant for Option 2 and throws a console error otherwise. | ||
5. Create your button as can be seen in the "Configuration" section below. | ||
6. That is it. The script takes care of all the rest. :) | ||
2. Copy the css (atcb.min.css) and js (atcb.min.js) files from the assets (not the "npm_dist"!) folders into your project (the **.min.** files are required, but it is recommended to also copy the raw and map files). | ||
3. Include those files in your project. As usual, the css goes into the <head> (`<link rel="stylesheet" href="./assets/css/atcb.min.css">`), the js into the <body> footer (`<script src="./assets/js/atcb.min.js" defer></script>`). You can also combine them with other files, if you want to. | ||
4. Create your button as can be seen in the "Configuration" section below. | ||
5. That is it. The script takes care of all the rest. :) | ||
@@ -68,3 +67,5 @@ ### Option 2: NodeJS | ||
3. Import the module into your project/component. For example with Angular/React: `import { atcb_init } from 'add-to-calendar-button';`. | ||
4. Init the js with `atcb_init();`. | ||
4. Init the js after the DOM has been loaded. To determine the right moment and execute, ... | ||
1. with Angular, you would use `ngAfterViewInit()` with `atcb_init();`; | ||
2. with React, you might want to include an event listener like `document.addEventListener('DOMContentLoaded', atcb_init, false);`. | ||
5. Include the css. For example with Angular or React, add the following to the global style.css: `@import 'add-to-calendar-button/assets/css/atcb.min'`; | ||
@@ -77,5 +78,6 @@ 6. Create your button as can be seen in the "Configuration" section below. | ||
A button can be easily created by placing a respective placeholder, wherever you want the button to appear. | ||
A button can be easily created by placing a respective placeholder, wherever you want the button to appear. | ||
(The `style="display:none;"` theoretically is not necessary, but should be used for better compatibility.) | ||
```html | ||
<div class="atcb"> | ||
<div class="atcb" style="display:none;"> | ||
(...) | ||
@@ -90,3 +92,3 @@ </div> | ||
```html | ||
<div class="atcb"> | ||
<div class="atcb" style="display:none;"> | ||
{ | ||
@@ -106,3 +108,3 @@ "title":"Add the title of your event", | ||
```html | ||
<div class="atcb"> | ||
<div class="atcb" style="display:none;"> | ||
{ | ||
@@ -109,0 +111,0 @@ "label":"Add to Calendar", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172
79583
8
633
1