Updated readme and demo
This commit is contained in:
+6
-2
@@ -40,12 +40,16 @@
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
font-family: sans-serif;
|
||||
width: 120px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<a href="javascript:cal.download('christmas')">Download iCal</a>
|
||||
Look at the console too!
|
||||
<a href="javascript:cal_single.download('Awesome Day')">Single Event</a>
|
||||
<br>
|
||||
<a href="javascript:cal.download('Holidays')">Multiple Events</a>
|
||||
<br>
|
||||
<a href="javascript:makelogs(cal)">Console Output</a>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
+16
-2
@@ -2,5 +2,19 @@
|
||||
var cal = ics();
|
||||
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2013', '12/25/2013');
|
||||
cal.addEvent('Christmas', 'Christian holiday celebrating the birth of Jesus Christ', 'Bethlehem', '12/25/2014', '12/25/2014');
|
||||
console.log('Events\n' + cal.events());
|
||||
console.log('Calendar\n' + cal.calendar());
|
||||
cal.addEvent('New Years', 'Watch the ball drop!', 'New York', '01/01/2015', '01/01/2015');
|
||||
cal.addEvent('New Years', 'Watch the ball drop!', 'New York', '01/01/2016', '01/01/2016');
|
||||
|
||||
var cal_single = ics();
|
||||
cal_single.addEvent('Best Day', 'This is the best day to demonstrate a single event.', 'New York', '11/12/1987', '11/12/1987');
|
||||
|
||||
|
||||
// You can use this for easy debugging
|
||||
var makelogs = function(obj) {
|
||||
console.log('Events Array');
|
||||
console.log('=================');
|
||||
console.log(obj.events());
|
||||
console.log('Calendar With Header');
|
||||
console.log('=================');
|
||||
console.log(obj.calendar());
|
||||
}
|
||||
Reference in New Issue
Block a user