You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2013/09/28 19:03:37 UTC

svn commit: r1527209 - /cloudstack/site/trunk/content/index.mdtext

Author: chipchilders
Date: Sat Sep 28 17:03:37 2013
New Revision: 1527209

URL: http://svn.apache.org/r1527209
Log:
Adding dynamic event listing

Modified:
    cloudstack/site/trunk/content/index.mdtext

Modified: cloudstack/site/trunk/content/index.mdtext
URL: http://svn.apache.org/viewvc/cloudstack/site/trunk/content/index.mdtext?rev=1527209&r1=1527208&r2=1527209&view=diff
==============================================================================
--- cloudstack/site/trunk/content/index.mdtext (original)
+++ cloudstack/site/trunk/content/index.mdtext Sat Sep 28 17:03:37 2013
@@ -134,17 +134,21 @@ Looking to other versions of Apache Clou
 
 <div class="panel-heading">
 
-CloudStack Collaboration Conference
+CloudStack Events
 
 </div>
 
-<div class="panel-body">
+<div class="panel-body" id="events">
+
+<h4>2013 CloudStack Collaboration Conference EU</h4>
 
 <p>
 The Apache CloudStack community will be coming together for our third collaboration conference in Amsterdam on November 20th through 22nd. If you're a CloudStack user, developer or integrator, this is the conference for you!
 </p>
 
-<a href="http://cloudstackcollab.org/"><button type="button" class="btn btn-info">Learn More</button></a>
+<p>Learn more about the conference on <a href="http://cloudstackcollab.org/">cloudstackcollab.org</a>.</p>
+
+<h4>Upcoming CloudStack Related Events</h4>
 
 </div>
 
@@ -206,3 +210,35 @@ function newFeed(id, file) {
 <script>
 newFeed("feed", "https://blogs.apache.org/cloudstack/feed/entries/atom?cat=%2FAnnouncements");
 </script>
+
+<script>
+var maxEvents = 3; // if 0 then there will be no limit
+
+/**
+ * This function appends rss feed items to divs with the same slug
+ * Name is the title of the feed, when slugged i use it as a div id
+ * File is the rss feed
+ */
+function newEventList(id, file) {
+ $.getJSON("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%22"+encodeURIComponent(file)+"%22&format=json&callback=?", function(d) {
+  var count = 0;
+  //grab ever rss item from the json result request
+  $(d.query.results.feed.entry).each(function() {
+    //if set up to be infinite or the limit is not reached, keep grabbing items
+    if(maxEvents == 0 || maxEvents>count){
+     var title = this.title;
+     var link = this.link.href;
+     // Format however you want, I only went for link and title
+     var anItem = "<p><a href='"+link+"' target='_blank'>"+title+"</a></p>";
+     //append to the div
+     $("#"+id).append(anItem);
+     count++;
+    }
+   });
+   $("#events").append("<p><small>For more events, take a look at the <a href='http://lanyrd.com/topics/apache-cloudstack/' target='_blank'>Apache CloudStack topic page</a> on Lanyrd.</small></p>");
+ });
+};
+
+newEventList("events", "http://lanyrd.com/topics/apache-cloudstack/feed/");
+
+</script>