cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject [4/6] docs commit: Adding icon to new blogs only
Date Wed, 12 Aug 2015 08:03:59 GMT
Adding icon to new blogs only


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/847af700
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/847af700
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/847af700

Branch: refs/heads/cordova-website
Commit: 847af700a54eea3f4c8bd8f80238547f77bb1ccd
Parents: 400cb17
Author: Raghav Katyal <rakatyal@microsoft.com>
Authored: Tue Aug 11 14:34:00 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Wed Aug 12 01:00:45 2015 -0700

----------------------------------------------------------------------
 www/blog/index.html          | 2 +-
 www/static/css-src/blog.scss | 2 +-
 www/static/js/index.js       | 9 ++++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/847af700/www/blog/index.html
----------------------------------------------------------------------
diff --git a/www/blog/index.html b/www/blog/index.html
index 9ab19d0..47f0f47 100644
--- a/www/blog/index.html
+++ b/www/blog/index.html
@@ -18,7 +18,7 @@ title: Apache Cordova Blog
               {% for post in site.posts %}
               <li>
                 <header>
-                  <div class="adorner"></div>
+                  <div class="adorner" blogTime="{{ post.date }}"></div>
                   <div>
                     <div class="title"><a href="{{ site.baseurl }}{{ post.url }}">{{
post.title }}</a></div>
                     <div>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/847af700/www/static/css-src/blog.scss
----------------------------------------------------------------------
diff --git a/www/static/css-src/blog.scss b/www/static/css-src/blog.scss
index 358ed32..3f2d119 100644
--- a/www/static/css-src/blog.scss
+++ b/www/static/css-src/blog.scss
@@ -37,7 +37,7 @@
 		
 		.posts{
 	
-			li:first-child header .adorner
+			li .newBlog
 			{
 				background-color: #3992ab;
 			} 		

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/847af700/www/static/js/index.js
----------------------------------------------------------------------
diff --git a/www/static/js/index.js b/www/static/js/index.js
index d4954f8..0da1d7e 100644
--- a/www/static/js/index.js
+++ b/www/static/js/index.js
@@ -74,8 +74,8 @@ function getCookie(cname) {
     return "";
 }
 
+var lastVisit = getCookie("visitTime");
 function checkNotification() {
-    var lastVisit = getCookie("visitTime");
     var dates = [];
     if (lastVisit != "") {
         {% for post in site.posts %}
@@ -105,5 +105,12 @@ if(new_blog_count) {
     document.getElementById("new_blog_count").innerHTML = new_blog_count;
 }
 
+$('.adorner').each(function(i) {
+    var blog_time = new Date($(this).attr('blogTime')).getTime();
+    if(blog_time > lastVisit) {
+        this.style.backgroundColor = "#3992ab";
+    }
+});
+
 $(document).ready(function () {
 });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message