Skip to content

Instantly share code, notes, and snippets.

@automatonic
Created September 23, 2012 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save automatonic/3768803 to your computer and use it in GitHub Desktop.
Save automatonic/3768803 to your computer and use it in GitHub Desktop.
upcoming.js examples
<html>
<head>
<!-- Project Page - http://github.com/automatonic/upcoming -->
<title>upcoming.js Example</title>
<!-- include the default styling file for upcoming.js-->
<link rel="stylesheet" type="text/css" media="all" href="upcoming.css" title="system" />
<!-- include the JavaScript routines that make upcoming.js work-->
<script type="text/javascript" src="upcoming.js"></script>
</head>
<body>
<div style="width:30%; float:left; margin:10%;">
<h3>US Holidays</h3>
<p>This is a single public calendar feed of US Holidays:</p>
<!--A div to house a simple public calendar-->
<div id="simple"></div>
</div>
<div style="width:30%; float:right; margin:10%;">
<h3>Geek Holidays + Phases of the Moon</h3>
<p>This one aggregates Geek Holidays and Phases of the Moon:</p>
<!--Multiple calendar feeds-->
<div id="multi"></div>
</div>
<!--Inline Javascript to initialize upcoming.js-->
<script type="text/javascript">
//render the first calendar
upcoming.render({
//pass the id of the DIV container
id : "simple",
//list one or more Google Calendar IDs in an array
feeds :
[
//Calendar IDs are listed on the google calendar settings in the "calendar address" sections
"usa__en@holiday.calendar.google.com" //US Holidays
]
});
//and now, another
upcoming.render({
id : "multi",
feeds : [
"3nc7u0oo0k46pe6npe7k629ubhifjm3s@import.calendar.google.com", //Geek Holidays
"ht3jlfaac5lfd6263ulfh4tql8@group.calendar.google.com", //Phases of the Moon
]
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment