Skip to content

Instantly share code, notes, and snippets.

@automatonic
Created September 23, 2012 03:55
Show Gist options
  • 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
"[email protected]" //US Holidays
]
});
//and now, another
upcoming.render({
id : "multi",
feeds : [
"[email protected]", //Geek Holidays
"[email protected]", //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