forked from add2cal/add-to-calendar-button
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
596 lines (551 loc) · 43.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Add to Calendar">
<meta name="publisher" content="Add to Calendar">
<meta name="keywords" content="calendar, event, sharing, button, script, javascript, angular, react, vue, outlook, ical, microsoft, teams, apple, google, yahoo, code, free, open source">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://add-to-calendar-button.com">
<link rel="icon" type="image/png" sizes="32x32" href="./demo_assets/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./demo_assets/favicons/favicon-16x16.png">
<link rel="icon" type="image/svg+xml" href="./demo_assets/favicons/favicon.svg">
<link rel="shortcut icon" href="./demo_assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="./demo_assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./demo_assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./demo_assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./demo_assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="./demo_assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./demo_assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./demo_assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./demo_assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./demo_assets/favicons/apple-touch-icon-180x180.png">
<link rel="mask-icon" href="./demo_assets/favicons/safari-pinned-tab.svg" color="#9755ff">
<meta name="msapplication-TileColor" content="#9755ff">
<meta name="msapplication-TileImage" content="./demo_assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="./browserconfig.xml">
<meta name="mobile-web-app-capable" content="yes">
<link rel="manifest" href="https://add-to-calendar-button.com/manifest.json" crossOrigin="use-credentials">
<meta name="theme-color" content="#9755ff">
<meta name="apple-mobile-web-app-title" content="Add to Calendar Button">
<meta name="application-name" content="Add to Calendar Button">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#9755ff">
<title>Add to Calendar Button | The free open source tool for more convenient event sharing</title>
<meta name="description" content="Check out the demo page for the maybe most convenient way of to enable your users adding events to their calendars. Free and open source. Used by thousands of projects.">
<meta property="og:type" content="website">
<meta property="og:title" content="Add to Calendar Button | The free open source tool for more convenient event sharing">
<meta property="og:site_name" content="Add to Calendar Button">
<meta property="og:description" content="Check out the demo page for the maybe most convenient way of to enable your users adding events to their calendars. Free and open source. Used by thousands of projects.">
<meta property="og:image" content="https://add-to-calendar-button.com/demo_assets/img/fb.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="https://add-to-calendar-button.com">
<meta name="twitter:creator" content="add2calendar">
<meta name="twitter:title" content="Add to Calendar Button | The free open source tool for more convenient event sharing">
<meta name="twitter:description" content="Check out the demo page for the maybe most convenient way of to enable your users adding events to their calendars. Free and open source. Used by thousands of projects.">
<meta name="twitter:image" content="https://add-to-calendar-button.com/demo_assets/img/tw.png">
<link rel="dns-prefetch" href="https://a.add-to-calendar-button.com/">
<link rel="dns-prefetch" href="https://caldn.net/">
<link rel="preload" href="https://add-to-calendar-button.com/demo_assets/fonts/inter-v12-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://add-to-calendar-button.com/demo_assets/fonts/fira-mono-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
<script async defer data-website-id="a94d2790-d17a-48fd-85df-086399cdb1e5" src="./demo_assets/js/a.min.js" data-host-url="https://a.add-to-calendar-button.com" data-domains="add-to-calendar-button.com"></script>
<!-- load some basic css just for this demo page here -->
<link rel="stylesheet" href="./demo_assets/css/demopage.min.css?v=1.15.5">
<!-- load the general button css -->
<link rel="stylesheet" href="./assets/css/atcb.min.css?v=1.15.5">
</head>
<body>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://add-to-calendar-button.com",
"image": [
"https://add-to-calendar-button.com/demo_assets/img/website1×1.png",
"https://add-to-calendar-button.com/demo_assets/img/website1×14×3.png",
"https://add-to-calendar-button.com/demo_assets/img/website1×116×9.png"
]
}
</script>
<div id="header">
<div id="header-left">
<h1>
<span id="logo">
<svg title="Add to Calendar Button" role="img" viewBox="0 0 2004.5 950.12" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<clipPath id="clipPath26"><path d="m1643.1 1993.2h974v-974h-974z"/></clipPath>
<linearGradient id="linearGradient98" x2="1" gradientTransform="matrix(-954.57,-1344.1,-1344.1,954.57,2718.3,2351.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#ffffff" offset="0"/><stop stop-color="#ffffff" offset=".36806"/><stop stop-color="#6900ff" offset=".70985"/><stop stop-color="#6900ff" offset="1"/></linearGradient>
<linearGradient id="linearGradient138" x1="-.24131" x2="1" y1="-.13177" gradientTransform="matrix(-270.32,-530.31,-530.31,270.32,2159.1,1536.1)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient98"><stop stop-color="#ffffff" offset="0"/><stop stop-color="#ffffff" offset=".4081"/><stop stop-color="#6900ff" offset=".80205"/><stop stop-color="#6900ff" offset="1"/></linearGradient>
<linearGradient id="linearGradient8965" x2="1" gradientTransform="matrix(-954.57,-1344.1,-1344.1,954.57,2718.3,2351.6)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient98"/>
</defs>
<g transform="translate(-191.47 -138.27)"><g transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" clip-path="url(#clipPath26)" opacity=".5"><g transform="translate(1998.3,1849.5)"><path d="m0 0c-116.88 0-211.63-94.748-211.63-211.63v-460.94h460.94c29.86 0 58.27 6.203 84.072 17.394 75.083 32.468 127.56 107.2 127.56 194.23v460.94z" fill="#ffffff"/></g></g><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2013.2 1809.1c-102.86 0-186.23-83.371-186.23-186.23v-145.41l0.051-0.154c0.357-1.531 3.215-12.246 10.765-28.419 30.669-58.957 137.3-219.65 468.79-216.34 66.074 28.572 112.25 94.34 112.25 170.92v405.63z" fill="url(#linearGradient8965)"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m1827.5 1217.8v256.09c1.349-4.48 4.324-13.29 9.864-25.157 30.283-65.146 135.61-216.67 458.77-216.68h0.018c2.64 0 5.288 0.01 7.954 0.03-22.68-9.479-46.716-14.284-71.48-14.284z" fill="#ffffff"/><g transform="matrix(1.3333,0,0,-1.3333,245.27,687.68)"><path d="m0 0v-260.21h405.63c26.276 0 51.277 5.46 73.982 15.307-3.521-0.035-7.001-0.053-10.471-0.053-323.27 0-428.29 151.77-458.32 216.39-7.551 16.175-10.408 26.889-10.766 28.42zm1-6.866c1.633-4.953 4.439-12.552 8.91-22.128 30.325-65.235 135.78-216.97 459.23-216.97 1.784 0 3.586 5e-3 5.39 0.014-21.918-8.807-45.07-13.268-68.901-13.268h-404.63z" fill="#ffffff"/></g><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m1837.8 1448.9c31.855-67.246 157.36-245.6 468.79-216.34-183.68-3.216-192.4 114.8-161.34 175.23-168.27-24.717-285.78-5.224-318.27 69.675 0.357-1.532 3.175-12.442 10.817-28.573" fill="url(#linearGradient138)"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2343.5 1849.5c0-11.063 0.6-24.101 0.6-39.063 0-39.652-4.265-73.088-11.627-73.088" fill="none" opacity=".56" stroke="#7717ff" stroke-miterlimit="10" stroke-opacity=".3" stroke-width="10"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2367.7 1735.1c0-14.115-11.442-25.558-25.557-25.558-14.116 0-25.558 11.443-25.558 25.558s11.442 25.557 25.558 25.557c14.115 0 25.557-11.442 25.557-25.557" fill="#ffffff"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2197.2 1521.1h-58.393v-57.053h-43.293v57.053h-58.057v40.941h58.057v57.053h43.293v-57.053h58.393z" fill="#000000" opacity=".22"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2211.8 1535.2h-58.393v-57.053h-43.293v57.053h-58.058v40.941h58.058v57.053h43.293v-57.053h58.393z" fill="#ffffff"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m2330.6 1849.5c0 21.467 6.667 34.324 11.521 34.324 7.362 0 13.33-32.144 13.33-71.796 0-39.653-5.968-71.797-13.33-71.797" fill="none" stroke="#ffffff" stroke-miterlimit="10" stroke-width="11.434"/><path transform="matrix(1.3333,0,0,-1.3333,-2190.7,2657.6)" d="m1861.5 1280.2v-37.154h11.61v14.618h12.932v6.8613h-12.932v7.4941h13.986v8.1812zm30.822 0v-37.156h11.823v14.093h2.5327l1.4766-6.0176c1.672-5.947 5.7708-8.9194 12.299-8.9194 1.02 0 2.6814 0.3172 4.9863 0.9492v8.814l-1.2012-0.1583c-0.3079-0.036-0.5323-0.053-0.6723-0.053-0.898 0-1.6582 0.066-2.2822 0.1978s-1.1483 0.3428-1.5704 0.6328-0.7695 0.6693-1.0414 1.1353-0.5156 1.0331-0.7266 1.7021l-0.2915 1.1353-0.1304 0.5273c-0.053 0.211-0.1052 0.4672-0.1582 0.7661l-0.2373 1.292c1.125 0.493 2.1315 1.055 3.0205 1.689s1.6399 1.3592 2.2559 2.1782 1.0861 1.742 1.4121 2.77 0.4878 2.1946 0.4878 3.4966c0 1.759-0.3997 3.3164-1.1997 4.6714s-1.8999 2.492-3.2988 3.416-3.039 1.6273-4.9219 2.1123-3.8969 0.7251-6.044 0.7251zm37.71 0v-37.154h26.071v8.127h-12.983v7.2831h11.874v6.8072h-11.874v6.7558h12.983v8.1812zm32.14 0v-37.154h26.073v8.127h-12.983v7.2831h11.874v6.8072h-11.874v6.7558h12.983v8.1812zm-58.027-8.0215h3.6928c0.792 0 1.5304-0.049 2.2164-0.145s1.2859-0.2738 1.7959-0.5288 0.9097-0.6072 1.1997-1.0561 0.435-1.0152 0.435-1.7022c0-0.756-0.1576-1.3749-0.4746-1.8589s-0.739-0.8706-1.267-1.1616-1.1213-0.5009-1.7813-0.6329-1.3315-0.2253-2.0185-0.2783l-1.7403-0.079h-2.0581z" fill="#7717ff"/>
<path d="m1513.6 473.01-40.43 5.9395v48.281c-3.1945-6.7691-7.3762-11.686-12.547-14.754-5.1734-3.064-11.466-4.5957-18.875-4.5957-8.1747 0-15.871 2.1744-23.086 6.5157-7.2186 4.344-12.967 10.314-17.244 17.91-4.2826 7.6027-6.4198 15.938-6.4198 25.006 0 8.5587 2.0454 16.638 6.1346 24.238 4.0856 7.5987 9.6744 13.697 16.764 18.297 7.0893 4.5988 14.973 6.8985 23.662 6.8985 15.069 0 25.607-6.4509 31.611-19.353v17.818h40.43zm133.54 0-40.43 5.9395v48.281c-3.1947-6.7691-7.3782-11.686-12.549-14.754-5.1747-3.064-11.464-4.5957-18.873-4.5957-8.1747 0-15.871 2.1744-23.086 6.5157-7.2188 4.344-12.968 10.314-17.244 17.91-4.2828 7.6027-6.42 15.938-6.42 25.006 0 8.5587 2.0435 16.638 6.1328 24.238 4.0853 7.5987 9.6763 13.697 16.766 18.297 7.0892 4.5988 14.972 6.8985 23.66 6.8985 15.071 0 25.609-6.4509 31.613-19.353v17.818h40.43zm-353.69 0.38093-36.402 131.82h43.108l5.5585-25.291h34.102l4.9844 25.291h45.025l-38.131-131.82zm450.96 5.4569-17.252 35.061h-14.658v23.004h11.873v36.174c0 11.011 3.0318 19.635 9.0918 25.881 6.0572 6.2453 14.527 9.3692 25.414 9.3692 4.5747 0 9.3075-0.59173 14.192-1.7637 4.884-1.1733 8.8733-2.6903 11.967-4.5449l-1.4844-25.973c-2.7213 1.4852-5.7531 2.2245-9.0919 2.2245-3.5866 0-6.3696-0.86174-8.3456-2.5937-1.98-1.732-2.9688-4.1444-2.9688-7.2364v-31.537h21.52v-23.004h-21.52v-35.061zm-421.65 19.836 12.453 57.67h-25.482zm523.31 13.928c-10.392 0-19.636 1.9796-27.734 5.9356-8.1027 3.9587-14.441 9.5531-19.016 16.789-4.5786 7.2333-6.8652 15.554-6.8652 24.951 0 9.4 2.255 17.715 6.7694 24.951 4.516 7.2332 10.825 12.893 18.924 16.975 8.1 4.0813 17.346 6.1231 27.734 6.1231 10.511 0 19.819-2.0107 27.922-6.0293 8.096-4.0187 14.405-9.6468 18.924-16.883 4.512-7.2373 6.7696-15.611 6.7696-25.137 0-9.3973-2.2277-17.684-6.6797-24.861-4.4533-7.1707-10.728-12.767-18.828-16.785-8.1027-4.0187-17.409-6.0293-27.92-6.0293zm-391.88 25.541c4.9828 0 9.3874 1.8189 13.221 5.4589 3.8307 3.6427 5.7461 7.9529 5.7461 12.936v0.7656c0 5.1093-1.817 9.5788-5.457 13.412-3.64 3.8307-8.1458 5.7461-13.51 5.7461-5.1092 0-9.5469-1.8468-13.316-5.5548-3.7692-3.704-5.6524-8.2381-5.6524-13.603 0-5.2347 1.821-9.7385 5.461-13.508 3.64-3.7656 8.1426-5.6524 13.508-5.6524zm133.54 0c4.9825 0 9.3893 1.8189 13.222 5.4589 3.8308 3.6427 5.7462 7.9529 5.7462 12.936v0.7656c0 5.1093-1.819 9.5788-5.459 13.412-3.64 3.8307-8.1457 5.7461-13.51 5.7461-5.1095 0-9.5465-1.8468-13.314-5.5548-3.7694-3.704-5.6523-8.2381-5.6523-13.603 0-5.2347 1.8209-9.7385 5.4609-13.508 3.64-3.7656 8.1404-5.6524 13.506-5.6524zm258.52 1.912c5.0694 0 9.2442 1.8896 12.521 5.6603 3.2774 3.7747 4.916 8.6237 4.916 14.563 0 5.9347-1.6386 10.792-4.916 14.562-3.2772 3.7748-7.452 5.6583-12.521 5.6583-5.072 0-9.2462-1.8835-12.52-5.6583-3.2813-3.7707-4.918-8.6277-4.918-14.562 0-5.9388 1.6367-10.788 4.918-14.563 3.2733-3.7707 7.4475-5.6603 12.52-5.6603zm-519.17 101.27c-13.264 0-25.203 3.0839-35.812 9.2519-10.615 6.168-18.971 14.693-25.072 25.566-6.104 10.878-9.1504 23.084-9.1504 36.613 0 13.264 3.1479 25.365 9.4492 36.309 6.2987 10.944 14.855 19.567 25.668 25.865 10.81 6.2987 22.848 9.4532 36.113 9.4532 13.66 0 26.264-3.3832 37.801-10.149l-5.5702-31.435c-5.172 2.1224-9.5494 3.5784-13.131 4.3768-3.5812 0.7948-7.4289 1.1935-11.541 1.1935-10.741 0-19.135-3.1479-25.168-9.4492-6.0374-6.2987-9.0527-15.089-9.0527-26.365 0-11.537 2.8513-20.393 8.5527-26.561 5.7013-6.168 13.863-9.2539 24.474-9.2539 7.6908 0 16.316 1.7904 25.865 5.3731l5.373-30.84c-4.9105-3.1853-10.813-5.6373-17.709-7.3613-6.8986-1.724-13.926-2.5879-21.09-2.5879zm232.2 2.5879-41.98 6.168v92.916c0 12.336 3.082 22.057 9.25 29.15 6.168 7.0973 14.888 10.645 26.164 10.645 11.008 0 20.958-2.2537 29.846-6.7657l-1.3966-27.857c-3.1824 1.5933-6.4308 2.3887-9.744 2.3887-4.512 0-7.6625-0.8244-9.4532-2.4844-1.7906-1.656-2.6856-4.3425-2.6856-8.0585zm399.32 0-41.984 6.168v50.139c-3.3176-7.0307-7.66-12.136-13.029-15.322-5.3735-3.1827-11.907-4.7716-19.602-4.7716-8.488 0-16.481 2.2557-23.973 6.7637-7.496 4.5107-13.468 10.712-17.908 18.602-4.4466 7.8947-6.6679 16.549-6.6679 25.967 0 8.888 2.1237 17.28 6.3691 25.172 4.2426 7.892 10.049 14.224 17.412 19 7.3613 4.776 15.549 7.164 24.57 7.164 15.649 0 26.593-6.6989 32.828-20.098v18.504h41.984zm-535.42 36.213c-8.492 0-16.514 2.1865-24.074 6.5625-7.5626 4.3775-13.601 10.448-18.107 18.205-4.512 7.7616-6.7656 16.418-6.7656 25.967 0 9.6853 2.2536 18.473 6.7656 26.365 4.5065 7.8908 10.51 14.123 18.006 18.701 7.492 4.5748 15.551 6.8653 24.176 6.8653 15.12 0 25.996-6.6971 32.631-20.096v18.504h41.781v-101.07h-41.781v23.078c-3.052-7.6895-7.5308-13.46-13.434-17.311-5.904-3.8464-12.301-5.7676-19.197-5.7676zm219.86 0c-10.216 0-19.499 2.1227-27.857 6.3653-8.3548 4.2467-14.988 10.28-19.895 18.105-4.9106 7.828-7.3632 16.783-7.3632 26.861 0 9.816 2.388 18.604 7.164 26.361 4.776 7.7613 11.44 13.865 19.996 18.305 8.556 4.448 18.337 6.668 29.348 6.668 14.724 0 28.252-2.7201 40.588-8.1601l-4.9727-26.66c-10.481 4.6455-20.231 6.9629-29.25 6.9629-5.836 0-10.546-1.026-14.127-3.082-3.5786-2.056-6.1671-5.4035-7.7578-10.049l59.691-7.7599c0.264-1.06 0.3946-2.7839 0.3946-5.1719 0-9.152-1.7252-17.411-5.172-24.773-3.452-7.3613-8.6524-13.196-15.619-17.506-6.9627-4.3104-15.353-6.4668-25.168-6.4668zm137.09 0c-16.713 0-28.921 7.6928-36.611 23.078v-20.295h-39.992v98.289h41.982v-46.559c0-4.904 0.9614-9.2841 2.8866-13.131 1.9214-3.8467 4.4071-6.7936 7.4591-8.8536 3.052-2.056 6.1681-3.0859 9.3535-3.0859 4.3773 0 7.7874 1.5288 10.246 4.5781 2.452 3.052 3.6797 7.4281 3.6797 13.131v53.92h41.783v-49.74c0-16.048-3.6152-28.616-10.842-37.705-7.232-9.0813-17.215-13.627-29.945-13.627zm242.74 0c-8.492 0-16.514 2.1865-24.074 6.5625-7.5627 4.3775-13.601 10.448-18.107 18.205-4.512 7.7616-6.7657 16.418-6.7657 25.967 0 9.6853 2.2537 18.473 6.7657 26.365 4.5064 7.8908 10.512 14.123 18.008 18.701 7.492 4.5748 15.548 6.8653 24.174 6.8653 15.12 0 25.996-6.6971 32.631-20.096v18.504h41.783v-101.07h-41.783v23.078c-3.052-7.6895-7.5289-13.46-13.432-17.311-5.9026-3.8464-12.303-5.7676-19.199-5.7676zm167.33 0c-7.0333 0-13.17 1.888-18.408 5.668-5.2426 3.78-9.3835 9.5848-12.436 17.41v-20.295h-41.98v98.289h41.98v-51.731c0-5.836 2.9508-10.111 8.8535-12.834 5.904-2.7176 15.154-4.0783 27.758-4.0783zm-547.16 24.074c7.96 0 12.997 4.1784 15.119 12.533l-30.838 6.7656c0.1306-5.7028 1.591-10.348 4.375-13.93 2.7867-3.5787 6.5678-5.3691 11.344-5.3691zm-206.92 7.3612c5.0372 0 9.5132 1.8604 13.428 5.5724 3.9095 3.7132 6.0016 8.2239 6.2696 13.529v1.5899c-0.268 5.1747-2.2896 9.6516-6.0724 13.432-3.78 3.78-8.3222 5.668-13.625 5.668-5.44 0-10.15-1.9183-14.127-5.7676-3.9815-3.848-5.9707-8.5569-5.9707-14.129 0-5.436 1.9557-10.112 5.8691-14.025 3.9106-3.9107 8.6577-5.8692 14.228-5.8692zm460.8 0c5.1747 0 9.7489 1.888 13.73 5.668 3.9784 3.7827 5.9668 8.2589 5.9668 13.434v0.79493c0 5.3067-1.888 9.9464-5.668 13.928-3.78 3.9773-8.4586 5.9668-14.029 5.9668-5.3053 0-9.9148-1.9191-13.828-5.7695-3.9147-3.8468-5.8692-8.5544-5.8692-14.125 0-5.436 1.8914-10.112 5.6698-14.025 3.78-3.9108 8.4568-5.8712 14.028-5.8712zm138.88 0c5.0372 0 9.515 1.8604 13.43 5.5724 3.9108 3.7132 5.9996 8.2239 6.2676 13.529v1.5899c-0.268 5.1747-2.2876 9.6516-6.0702 13.432-3.78 3.78-8.3243 5.668-13.627 5.668-5.44 0-10.15-1.9183-14.127-5.7676-3.9814-3.848-5.9707-8.5569-5.9707-14.129 0-5.436 1.9559-10.112 5.8692-14.025 3.9107-3.9107 8.6577-5.8692 14.228-5.8692zm-524.54 116.05-15.998 32.672h-13.642v21.389h10.947l-0.168 31.828c0 5.3328 0.674 10.134 2.0215 14.4 1.3471 4.2105 3.312 7.8301 5.8945 10.861 2.6383 2.9753 5.866 5.2784 9.6836 6.9063 3.8172 1.5719 8.1668 2.3573 13.051 2.3573 9.4872 0 18.133-1.9648 25.936-5.8944l-1.3476-24.082c-2.6383 1.3471-5.2755 2.0195-7.9141 2.0195-3.3683 0-6.0352-0.75787-8-2.2735-1.9648-1.5159-2.9472-3.7888-2.9472-6.8204v-29.303h19.873v-21.389h-19.873v-32.672zm74.944 0-15.998 32.672h-13.643v21.389h10.947l-0.1678 31.828c0 5.3328 0.674 10.134 2.0214 14.4 1.3472 4.2105 3.312 7.8301 5.8946 10.861 2.6385 2.9753 5.8662 5.2784 9.6836 6.9063 3.8172 1.5719 8.1669 2.3573 13.051 2.3573 9.4872 0 18.133-1.9648 25.935-5.8944l-1.3476-24.082c-2.6382 1.3471-5.2774 2.0195-7.916 2.0195-3.3684 0-6.0352-0.75787-8-2.2735-1.9648-1.5159-2.9472-3.7888-2.9472-6.8204v-29.303h19.873v-21.389h-19.873v-32.672zm-329.16 0.50586v118.73c26.16 1.6843 45.696 2.5273 58.608 2.5273 7.1854 0 13.836-1.0104 19.955-3.0313 6.1192-2.0772 11.425-4.8575 15.916-8.3379 4.491-3.5367 7.9993-7.6335 10.525-12.293 2.526-4.7155 3.7891-9.7392 3.7891-15.072 0-8.4765-2.0764-15.157-6.2305-20.041-4.1544-4.884-10.161-7.6919-18.02-8.422 6.2873-0.95413 11.003-3.5915 14.146-7.914 3.1439-4.3225 4.7149-10.106 4.7149-17.348 0-4.4349-1.1236-8.4204-3.3692-11.957-2.1892-3.5928-5.2481-6.624-9.1777-9.0937-3.9296-2.4701-8.5895-4.3792-13.978-5.7265-5.3891-1.3472-11.254-2.0196-17.598-2.0196zm38.396 22.902h13.979c10.105 0 15.158 4.0432 15.158 12.127 0 1.7964-0.3936 3.4232-1.1796 4.8828-0.7859 1.4596-1.8797 2.6944-3.2832 3.7051-1.3475 1.0103-2.9764 1.7961-4.8848 2.3573-1.9088 0.56174-3.9572 0.84387-6.1464 0.84387h-13.643zm387.01 8c-6.6805 0-12.997 0.9548-18.947 2.8633-5.8943 1.9087-11.087 4.7445-15.578 8.5057s-8.1106 8.3915-10.861 13.893c-2.6934 5.5015-4.1812 11.874-4.4629 19.115 0 6.6241 1.1775 12.686 3.5352 18.187 2.4137 5.4452 5.8105 10.133 10.189 14.063 4.3787 3.9296 9.5994 6.9884 15.662 9.1777 6.1189 2.1332 12.883 3.2011 20.293 3.2011 3.9296 0 7.8595-0.36586 11.789-1.0956 3.9857-0.72973 7.8319-1.8513 11.537-3.3672 3.7049-1.5716 7.1576-3.5644 10.357-5.9785 3.1999-2.4137 5.9782-5.2499 8.336-8.5059 2.3576-3.3123 4.2092-7.1007 5.5566-11.367 1.4032-4.2661 2.1054-9.0373 2.1054-14.314 0-6.5119-1.2073-12.49-3.621-17.936-2.4138-5.4455-5.8087-10.105-10.188-13.978-4.3787-3.9297-9.5993-6.9885-15.662-9.1779-6.063-2.1893-12.743-3.2851-20.041-3.2851zm128.83 0c-7.1295 0-13.362 1.6568-18.695 4.9687-5.2767 3.312-9.5986 8.3637-12.967 15.156v-17.598h-34.691v85.131h36.377v-45.639c0.2805-1.3471 0.8973-2.9483 1.8514-4.8008 0.9547-1.9087 2.1896-3.7323 3.7052-5.4725 1.5719-1.7401 3.3958-3.2 5.4727-4.3789 2.0772-1.2351 4.3501-1.8536 6.8203-1.8536 2.0208 0 3.7332 0.3936 5.1366 1.1797 1.4036 0.72974 2.555 1.796 3.4532 3.1992 0.9543 1.3475 1.6286 2.976 2.0215 4.8848 0.4492 1.9084 0.6737 3.9848 0.6737 6.2304v46.65h36.207v-43.113c0-6.6803-0.7856-12.742-2.3576-18.188-1.5154-5.5012-3.7888-10.189-6.8202-14.062-2.9754-3.9296-6.6527-6.9625-11.031-9.0957-4.3786-2.1331-9.4303-3.1992-15.156-3.1992zm-433.32 1.2636v49.344c0 6.0629 1.2054 11.48 3.6192 16.252 2.47 4.7715 5.8112 8.8128 10.021 12.125 4.2105 3.256 9.1506 5.7541 14.82 7.4943 5.6698 1.6843 11.732 2.5272 18.187 2.5272 6.5679 0 12.632-0.87093 18.19-2.6112 5.5576-1.7964 10.356-4.3503 14.398-7.6621 4.0981-3.3123 7.2983-7.3256 9.5997-12.041 2.3016-4.7717 3.4511-10.133 3.4511-16.084v-49.344h-34.86v50.523c0 1.4595-0.2804 2.8059-0.8416 4.0411-0.5614 1.2349-1.3209 2.3308-2.2754 3.2852-0.9543 0.898-2.0762 1.628-3.3672 2.1893-1.2911 0.50533-2.6672 0.75786-4.127 0.75786-1.5156 0-2.9754-0.25253-4.3789-0.75786-1.3471-0.50534-2.5525-1.2073-3.6191-2.1055-1.0106-0.89827-1.826-1.9661-2.4434-3.2011-0.5614-1.2912-0.8418-2.6935-0.8418-4.2091v-50.523zm304.57 24.336c2.0209 0 3.9857 0.39187 5.8945 1.1777 1.9648 0.78574 3.7052 1.9652 5.2208 3.5371 1.5719 1.5156 2.8068 3.4525 3.705 5.8105 0.9542 2.3577 1.4297 5.1084 1.4297 8.252 0 3.1437-0.4755 5.8943-1.4297 8.252-0.8982 2.3576-2.1331 4.3225-3.705 5.8944-1.5156 1.5716-3.256 2.7511-5.2208 3.5372-1.9088 0.78574-3.8736 1.1777-5.8945 1.1777-2.0208 0-4.0137-0.392-5.9785-1.1777-1.9648-0.78613-3.7048-1.9656-5.2207-3.5372-1.5156-1.5719-2.7508-3.5368-3.7051-5.8944-0.8982-2.3577-1.3476-5.1083-1.3476-8.252 0-3.1436 0.4494-5.8943 1.3476-8.252 0.9543-2.358 2.1895-4.2949 3.7051-5.8105 1.5159-1.5719 3.2559-2.7513 5.2207-3.5371 1.9648-0.78586 3.9577-1.1777 5.9785-1.1777zm-387.26 9.3457h14.82c2.6384 0 5.0527 0.308 7.2423 0.92574 2.1893 0.61733 4.0706 1.5163 5.6425 2.6953 1.5716 1.1787 2.7771 2.6665 3.6192 4.4629 0.898 1.7957 1.3473 3.8735 1.3476 6.2304-3e-4 2.0764-0.4217 3.9572-1.2636 5.6407-0.7859 1.6279-1.8797 3.0319-3.2832 4.2109-1.4036 1.1787-3.0584 2.0756-4.9668 2.6933-1.9088 0.61733-3.9592 0.92573-6.1484 0.92573h-13.221c-1.2351 0-2.498-0.0267-3.7891-0.0827z" fill="#fff"/></g>
</svg>
</span>
</h1>
<h2>The convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.</h2>
</div>
<div id="header-right">
<a target="_blank" rel="noopener" href="https://github.com/add2cal/add-to-calendar-button" class="github">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="50px" width="50px">
<path d="M256 0C115.39 0 0 115.39 0 256c0 119.988 84.195 228.984 196 256v-84.695c-11.078 2.426-21.273 2.496-32.55-.828-15.13-4.465-27.422-14.543-36.547-29.9-5.816-9.812-16.125-20.453-26.88-19.672l-2.637-29.883c23.254-1.992 43.37 14.168 55.313 34.23 5.305 8.922 11.4 14.152 19.246 16.465 7.574 2.23 15.707 1.16 25.184-2.187 2.38-18.973 11.07-26.074 17.637-36.074v-.016c-66.68-9.945-93.254-45.32-103.8-73.242-13.977-37.074-6.477-83.39 18.238-112.66.48-.57 1.348-2.062 1.012-3.105-11.332-34.23 2.477-62.547 2.984-65.55 13.078 3.867 15.203-3.89 56.81 21.387l7.19 4.32c3.008 1.793 2.063.77 5.07.543 17.37-4.72 35.684-7.324 53.727-7.56 18.18.234 36.375 2.84 54.465 7.75l2.328.234c-.203-.03.633-.148 2.035-.984 51.973-31.48 50.105-21.19 64.043-25.723.504 3.008 14.13 31.785 2.918 65.582-1.512 4.656 45.06 47.3 19.246 115.754-10.547 27.934-37.117 63.31-103.797 73.254v.016c8.547 13.027 18.816 19.957 18.762 46.832V512c111.81-27.016 196-136.012 196-256C512 115.39 396.61 0 256 0zm0 0"/>
</svg>
<br>
Get the Code!
</a>
</div>
</div>
<button id="light-mode-switch-header" class="light-mode-switch" aria-label="Light/Dark Mode Switch">
<div></div>
</button>
<div class="container">
<h3>Example 1: The usual One</h3>
<p class="description">
This is a more or less standard setup with all available calendar types, a custom iCal/ics file name and a time zone set.
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"2023-02-14",
"endDate":"2023-02-14",
"startTime":"10:15",
"endTime":"23:30",
"location":"World Wide Web",
"options":[
"Apple",
"Google",
"iCal",
"Microsoft365",
"MicrosoftTeams",
"Outlook.com",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"iCalFileName":"Reminder-Event"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"2023-02-14",
"endDate":"2023-02-14",
"startTime":"10:15",
"endTime":"23:30",
"location":"World Wide Web",
"options":[
"Apple",
"Google",
"iCal",
"Microsoft365",
"MicrosoftTeams",
"Outlook.com",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"iCalFileName":"Reminder-Event"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 2: Going All-Day</h3>
<p class="description">
For an all-day event, you would simply leave out the time information.<br>
Here, we also let the button adapt to the page's dark/light mode.
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website:\n→ [url]https://github.com/add2cal/add-to-calendar-button|Click here![/url]",
"startDate":"2022-01-14",
"endDate":"2022-01-18",
"location":"World Wide Web",
"options":[
"Apple",
"Google",
"iCal",
"Microsoft365",
"MicrosoftTeams",
"Outlook.com",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"lightMode":"bodyScheme",
"iCalFileName":"Reminder-Event"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website:\n→ [url]https://github.com/add2cal/add-to-calendar-button|Click here![/url]",
"startDate":"2022-01-14",
"endDate":"2022-01-18",
"location":"World Wide Web",
"options":[
"Apple",
"Google",
"iCal",
"Microsoft365",
"MicrosoftTeams",
"Outlook.com",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"iCalFileName":"Reminder-Event"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 3: Customizing Labels</h3>
<p class="description">
You can customize the button text as well as each option label.<br>
Here, we also set the listStyle to an overlay list, enlarge the size, as well as removed the custom iCal/ics name and explicitly set a static downloadable ics file instead.<br>
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button|Click here![/url]",
"startDate":"2022-01-14",
"endDate":"2022-01-18",
"location":"World Wide Web",
"label":"Hit me to save!",
"options":[
"Google|Add to Google Cal",
"Microsoft365|Use Microsoft instead",
"Yahoo|Yahoo, really?",
"iCal|iCall ftw!"
],
"icsFile":"https://add-to-calendar-button.com/demo-event.ics",
"listStyle":"overlay",
"size":"8",
"timeZone":"Europe/Berlin"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button|Click here![/url]",
"startDate":"2022-01-14",
"endDate":"2022-01-18",
"location":"World Wide Web",
"label":"Hit me to save!",
"options":[
"Google|Add to Google Cal",
"Microsoft365|Use Microsoft instead",
"Yahoo|Yahoo, really?",
"iCal|iCall ftw!"
],
"icsFile":"https://add-to-calendar-button.com/demo-event.ics",
"listStyle":"overlay",
"size":"8",
"timeZone":"Europe/Berlin"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 4: Dynamic Dates</h3>
<p class="description">
Instead of using a fixed date, you can also go with dynamic ones.<br>
Here, the date will also use the current day + 2 days; with the end date 2 days later.<br>
This example also generates online-event-rich-schema in the background, since the location is a URL.
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"today+2",
"endDate":"today+4",
"location":"https://github.com/add2cal/add-to-calendar-button",
"options":[
"Google",
"Microsoft365",
"Yahoo"
],
"timeZone":"Europe/Berlin"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"today+2",
"endDate":"today+4",
"location":"World Wide Web",
"options":[
"Google",
"Microsoft365",
"Yahoo"
],
"timeZone":"Europe/Berlin"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 5: Click Trigger</h3>
<p class="description">
Per default, the options unfold on hover, when you are on a desktop device.<br>
You can opt for triggering on click, if you want to. Mind that on touch devices, of course, it will be always on tap.<br>
<em>In this example, it is also included with the inline option and the modal option (which prevents the dropdown).</em>
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<span style="padding:5px;">Do it! →</span>
<div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"today+2",
"endDate":"today+4",
"location":"World Wide Web",
"label":"Click me hard!",
"options":[
"Google",
"Microsoft365",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"inline":true,
"trigger":"click",
"listStyle":"modal"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"today+2",
"endDate":"today+4",
"location":"World Wide Web",
"label":"Click me hard!",
"options":[
"Google",
"Microsoft365",
"Yahoo"
],
"timeZone":"Europe/Berlin",
"inline":true,
"trigger":"click"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 6: Recurring Events</h3>
<p class="description">
You can define recurring events by setting an <a href="https://www.rfc-editor.org/rfc/rfc5545" target="_blank" rel="noopener">RRULE</a>.<br>
Mind that the rule needs to be valid (technically and logically) and that it is not supported by all calendar types - in this example, the specified Yahoo option won't show up for that reason.<br>
You can also specify the rule in more simple terms. Check the <a href="https://github.com/add2cal/add-to-calendar-button#important-information-and-hidden-features" target="_blank" rel="noopener"></a>README</a> for more details on that<br>
(Setting a URL as location makes it an online event from a data point of view.)
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<div class="atcb" style="display:none;">
{
"name":"Recurring reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"2022-07-13",
"endDate":"2022-07-13",
"startTime":"10:45",
"endTime":"15:00",
"location":"https://github.com/add2cal/add-to-calendar-button",
"options":[
"Apple",
"Google",
"Yahoo",
"iCal"
],
"timeZone":"Europe/Berlin",
"recurrence":"RRULE:FREQ=WEEKLY;INTERVAL=1;WKST=MO;BYDAY=WE,FR;COUNT=10",
"iCalFileName":"Reminder-Event"
}
</div>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><div class="atcb" style="display:none;">
{
"name":"Recurring reminder to star the add to calendar button repo",
"description":"Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
"startDate":"2022-07-13",
"endDate":"2022-07-13",
"startTime":"10:45",
"endTime":"15:00",
"location":"https://github.com/add2cal/add-to-calendar-button",
"options":[
"Apple",
"Google",
"Yahoo",
"iCal"
],
"timeZone":"Europe/Berlin",
"recurrence":"RRULE:FREQ=WEEKLY;INTERVAL=1;WKST=MO;BYDAY=WE,FR;COUNT=10",
"iCalFileName":"Reminder-Event"
}
</div></code></pre>
</div>
</div>
<hr>
<h3>Example 7: Bring-Your-Own Button</h3>
<p class="description">
If you can't or don't want to use "atcb_init", you can use the "atcb_action" function and apply it to your own button.
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<button id="default-button">
Add to calendar
</button>
<script type="application/javascript">
const config = {
name: "Reminder to star the add to calendar button repo",
description: "Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
startDate: "2022-01-14",
endDate: "2022-08-18",
options: ["Google", "iCal"],
timeZone: "Europe/Berlin",
trigger: "click",
iCalFileName: "Reminder-Event",
};
const button = document.querySelector('#default-button');
button.addEventListener('click', () => atcb_action(config, button));
</script>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><button id="default-button">Add to calendar</button>
<script type="application/javascript">
const config = {
name: "Reminder to star the add to calendar button repo",
description: "Check out the maybe easiest way to include add to calendar buttons to your website at:<br>→ [url]https://github.com/add2cal/add-to-calendar-button[/url]",
startDate: "2022-01-14",
endDate: "2022-01-18",
options: ["Google", "iCal"],
timeZone: "Europe/Berlin",
trigger: "click",
iCalFileName: "Reminder-Event",
};
const button = document.querySelector('#default-button');
button.addEventListener('click', () => atcb_action(config, button));
</script></code></pre>
</div>
</div>
<hr>
<h3>Example 8: Bring-Your-Own Anything</h3>
<p class="description">
When using "atcb_action", you don't need to use a button. A form, a link, an image — whatever element you want to trigger the dropdown, you can use it (though not all of them are good for accessibility).<br>
If you don't provide a second argument, the dropdown list will appear as a modal in the middle of the viewport.<br>
However, for better compatibility and stability, define a triggering element, wich then gets focused on closing the modal; and set the listStyle option to "modal".<br>
Use of the 'click' trigger is highly recommended here.
</p>
<div class="example">
<div class="example-left">
<!-- start of button code -->
<form id="event-form">
<label>
Event name:
<input name="name" value="Some cool event" />
</label>
<input id="myTriggerElement" type="submit" value="Save" />
</form>
<script type="application/javascript">
const triggerEl = document.querySelector('#myTriggerElement');
document.querySelector('#event-form')
.addEventListener('submit', (e) => {
e.preventDefault();
atcb_action({
name: e.currentTarget.elements.name.value,
startDate: "2022-01-14",
endDate: "2022-01-18",
options: ["Apple", "Google", "iCal", "Microsoft365", "Outlook.com", "MicrosoftTeams", "Yahoo"],
timeZone: "Europe/Berlin",
listStyle: "modal",
iCalFileName: "Reminder-Event",
}, triggerEl);
});
</script>
<!-- end of button code -->
</div>
<div class="example-right">
<pre><code class="language-html"><form id="event-form">
<label>
Event name:
<input name="name" value="Some cool event" />
</label>
<input id="myTriggerElement" type="submit" value="Save" />
</form>
<script type="application/javascript">
const triggerEl = document.querySelector('#myTriggerElement');
document.querySelector('#event-form')
.addEventListener('submit', (e) => {
e.preventDefault();
atcb_action({
name: e.currentTarget.elements.name.value,
startDate: "2022-01-14",
endDate: "2022-01-18",
options: ["Apple", "Google", "iCal", "Microsoft365", "Outlook.com", "MicrosoftTeams", "Yahoo"],
timeZone: "Europe/Berlin",
listStyle: "modal",
iCalFileName: "Reminder-Event",
}, triggerEl);
});
</script></code></pre>
</div>
</div>
<hr>
<a target="_blank" href="https://github.com/add2cal/add-to-calendar-button" class="github">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="50px" width="50px"><path d="M256 0C115.39 0 0 115.39 0 256c0 119.988 84.195 228.984 196 256v-84.695c-11.078 2.426-21.273 2.496-32.55-.828-15.13-4.465-27.422-14.543-36.547-29.9-5.816-9.812-16.125-20.453-26.88-19.672l-2.637-29.883c23.254-1.992 43.37 14.168 55.313 34.23 5.305 8.922 11.4 14.152 19.246 16.465 7.574 2.23 15.707 1.16 25.184-2.187 2.38-18.973 11.07-26.074 17.637-36.074v-.016c-66.68-9.945-93.254-45.32-103.8-73.242-13.977-37.074-6.477-83.39 18.238-112.66.48-.57 1.348-2.062 1.012-3.105-11.332-34.23 2.477-62.547 2.984-65.55 13.078 3.867 15.203-3.89 56.81 21.387l7.19 4.32c3.008 1.793 2.063.77 5.07.543 17.37-4.72 35.684-7.324 53.727-7.56 18.18.234 36.375 2.84 54.465 7.75l2.328.234c-.203-.03.633-.148 2.035-.984 51.973-31.48 50.105-21.19 64.043-25.723.504 3.008 14.13 31.785 2.918 65.582-1.512 4.656 45.06 47.3 19.246 115.754-10.547 27.934-37.117 63.31-103.797 73.254v.016c8.547 13.027 18.816 19.957 18.762 46.832V512c111.81-27.016 196-136.012 196-256C512 115.39 396.61 0 256 0zm0 0"/></svg><br>
Get the Code!
</a>
<hr>
<div id="legal">
<button id="light-mode-switch-footer" class="light-mode-switch" aria-label="Light/Dark Mode Switch">
<div></div>
</button>
<p>
This page has been built and is maintained by Jens Kürschner. See <a target="_blank" rel="noopener" href="https://jenskuerschner.de/legal-notice/">jenskuerschner.de/legal-notice</a> for a full legal notice.<br>
This page is hosted via "GitHub Pages". It includes some very basic analytics, that still preserves your anonymity and does not use any cookies. However, mind that the GitHub privacy policy applies additionally (<a target="_blank" rel="noopener" href="https://docs.github.com/en/github/site-policy/github-privacy-statement">click here for details</a>).
</p>
</div>
<div id="tiny-version">v1.15.5</div>
</div>
<!-- load the button js and more -->
<script type="application/javascript" src="./demo_assets/js/demopage.min.js?v=1.15.5" defer></script>
<script type="application/javascript" src="./dist/atcb.min.js?v=1.15.5" async defer></script>
</body>
</html>