cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r880250 - in /websites/staging/cloudstack/trunk/content: ./ index.html
Date Sat, 28 Sep 2013 16:01:01 GMT
Author: buildbot
Date: Sat Sep 28 16:01:00 2013
New Revision: 880250

Log:
Staging update by buildbot for cloudstack

Modified:
    websites/staging/cloudstack/trunk/content/   (props changed)
    websites/staging/cloudstack/trunk/content/index.html

Propchange: websites/staging/cloudstack/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Sep 28 16:01:00 2013
@@ -1 +1 @@
-1527199
+1527203

Modified: websites/staging/cloudstack/trunk/content/index.html
==============================================================================
--- websites/staging/cloudstack/trunk/content/index.html (original)
+++ websites/staging/cloudstack/trunk/content/index.html Sat Sep 28 16:01:00 2013
@@ -122,6 +122,20 @@
 
 <div class="panel-heading">
 
+Latest Announcement
+
+</div>
+
+<div id="headline" class="panel-body">
+
+</div>
+
+</div>
+
+<div class="panel panel-default">
+
+<div class="panel-heading">
+
 About CloudStack
 
 </div>
@@ -229,7 +243,51 @@ The Apache CloudStack community will be 
 
 </div>
 
-</div> 
+</div>
+
+<script>
+var maxEntries = 3; // if 0 then there will be no limit
+
+function slug(str){
+ return str.replace(/\s/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase();
+}
+/**
+ * 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 newFeed(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(maxEntries == 0 || maxEntries>count){
+     var title = this.title.content;
+     var content = this.content.content;
+     var pubDate = new Date(this.published);
+     // Format however you want, I only went for link and title
+     var anItem = "<h3>"+title+"</h3><p>"+pubDate+"</p>"+content;
+     //append to the div
+     $("#"+id).append(anItem);
+     if (count==0)
+      $("#headline").append("<p>"+title+"<br/><a href='#news'>Read more
here.</a></p>");
+     count++;
+    }
+   });
+ });
+};
+</script>
+
+<p><a name='news'></a><br /> </p>
+
+<p> </p>
+
+<div id="feed"><h1>Announcements from the Project</h1></div>
+
+<script>
+newFeed("feed", "https://blogs.apache.org/cloudstack/feed/entries/atom?cat=%2FAnnouncements");
+</script> 
 
             <footer>
                 <p>Copyright © 2013 The Apache Software Foundation, Licensed under
the Apache License, Version 2.0. <br/>



Mime
View raw message