index: added recent updates
authorThomas Park <thomas@thomaspark.me>
Wed, 22 Aug 2012 14:35:15 +0000 (10:35 -0400)
committerThomas Park <thomas@thomaspark.me>
Wed, 22 Aug 2012 14:35:15 +0000 (10:35 -0400)
css/bootswatch.css
index.html
js/bootswatch.js

index 4031d3f..bfc3751 100644 (file)
@@ -25,7 +25,7 @@ body {
 
 .hero-unit {
        margin-top: 60px;
-       margin-bottom: 60px;
+       margin-bottom: 10px;
 }
 
 .hero-unit h1, .hero-unit p {
@@ -61,6 +61,10 @@ body {
        opacity: .65;
 }
 
+#ticker {
+       margin-bottom: 40px;
+}
+
 .about {
   margin-top: 20px;
 }
index 6939b92..35be18b 100644 (file)
@@ -53,9 +53,7 @@
 
        <div class="container">
 
-               <!-- Main hero unit for a primary marketing message or call to action -->
                <div class="hero-unit">
-
                        <h1>Bootswatch</h1>
                        <p id="tagline">&nbsp;</p>
 
                </div>
 
 
+               <div class="row">
+                       <div class="span12">
+                               <div class="" id="ticker">
+                               </div>
+                       </div>
+               </div>
+
+
                <div class="row about">
                        <div class="span4">
                                <img class="glyph" src="img/glyphicons_036_file.png">
                        <div class="span4">
                                <img class="glyph" src="img/glyphicons_032_wifi_alt.png">
                                <h3>Stay Updated</h3>
-                               <p>Be notified when new swatches are released by subscribing via <a href="http://feeds.feedburner.com/bootswatch">RSS feed</a>, <a href="http://feedburner.google.com/fb/a/mailverify?uri=bootswatch&loc=en_US">email</a>, or <a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Tumblr</a>.</p>
+                               <p>Be notified about updates by subscribing via <a href="http://feeds.feedburner.com/bootswatch">RSS feed</a>, <a href="http://feedburner.google.com/fb/a/mailverify?uri=bootswatch&loc=en_US">email</a>, or <a href="http://news.bootswatch.com" onclick="pageTracker._link(this.href); return false;">Tumblr</a>.</p>
                        </div>
                </div>
 
                                                                        <span class="caret"></span>
                                                                </a>
                                                                <ul class="dropdown-menu">
-                                                                       <!-- dropdown menu links -->
                                                                        <li><a target="_blank" href="readable/bootstrap.min.css" onClick="_gaq.push(['_trackEvent', 'bootswatch', 'readable', 'bootstrap.min.css']);">bootstrap.min.css</a></li>
                                                                        <li><a target="_blank" href="readable/bootstrap.css" onClick="_gaq.push(['_trackEvent', 'bootswatch', 'readable', 'bootstrap.css']);">bootstrap.css</a></li>
                                                                        <li class="divider"></li>
 
                var line = Math.floor((taglines.length) * Math.random());
                $('#tagline').html(taglines[line]);
+
+               parseRSS('http://feeds.feedburner.com/bootswatch', function(d){
+                       var h ='<strong>Recent updates:</strong> ';
+                       for (var i = 0; i < 4; i++){
+                               h = h + '<a href="' + d.entries[i].link + '">' + d.entries[i].title + '...</a>&nbsp;&nbsp;';
+                       }
+                       document.getElementById('ticker').innerHTML = h;
+               })
        </script>
-       <script type="text/javascript" src="http://www.assoc-amazon.com/s/impression-counter?tag=bootswatch-20&o=1"></script>
-       <noscript><img src="http://www.assoc-amazon.com/s/noscript?tag=bootswatch-20" alt="" /></noscript>
+       <!-- <script type="text/javascript" src="http://www.assoc-amazon.com/s/impression-counter?tag=bootswatch-20&o=1"></script>
+       <noscript><img src="http://www.assoc-amazon.com/s/noscript?tag=bootswatch-20" alt="" /></noscript> -->
 
 
 </body>
index 82faa2b..93b891f 100644 (file)
@@ -7,4 +7,14 @@ $('#main-menu').load('/js/snippets/main-menu.html', function(){
        $('a[rel=tooltip]').tooltip({
                'placement': 'bottom'
        });
-});
\ No newline at end of file
+});
+
+function parseRSS(url, callback) {
+  $.ajax({
+    url: 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url),
+    dataType: 'json',
+    success: function(data) {
+      callback(data.responseData.feed);
+    }
+  });
+}
\ No newline at end of file