[bknr-cvs] hans changed trunk/projects/quickhoney/

BKNR Commits bknr at bknr.net
Wed Aug 27 02:08:00 UTC 2008


Revision: 3739
Author: hans
URL: http://bknr.net/trac/changeset/3739

Make news entries wider, change archive rendering to suit Nana's taste.

U   trunk/projects/quickhoney/src/imageproc.lisp
U   trunk/projects/quickhoney/website/static/javascript.js
U   trunk/projects/quickhoney/website/static/styles.css

Modified: trunk/projects/quickhoney/src/imageproc.lisp
===================================================================
--- trunk/projects/quickhoney/src/imageproc.lisp	2008-08-27 01:13:34 UTC (rev 3738)
+++ trunk/projects/quickhoney/src/imageproc.lisp	2008-08-27 02:08:00 UTC (rev 3739)
@@ -107,7 +107,7 @@
 		  width height)
       thumbnail-image)))
 
-(defparameter +news-image-width+ 428
+(defparameter +news-image-width+ 486
   "Width of news images")
 (defparameter +news-image-corner-radius+ 8
   "Corner radius for news images")

Modified: trunk/projects/quickhoney/website/static/javascript.js
===================================================================
--- trunk/projects/quickhoney/website/static/javascript.js	2008-08-27 01:13:34 UTC (rev 3738)
+++ trunk/projects/quickhoney/website/static/javascript.js	2008-08-27 02:08:00 UTC (rev 3739)
@@ -288,10 +288,8 @@
     log('news year ' + year + ' month ' + month);
 
     map(function (element) {
-            if (element.href) {
-                ((element.href.match(/#news\/(\d+)/)[1] == year) ? addElementClass : removeElementClass)
-                    (element, 'active');
-            }
+            ((element.year == year && (month || element.month)) ? addElementClass : removeElementClass)
+                (element, 'active');
         }, $('archive-navigation').childNodes);
 
     for (i = 1; i <= 12; i++) {
@@ -315,19 +313,23 @@
         var currentYear;
         var activeYear = document.location.href.replace(/.*news\/(\d+).*/, "$1");
         replaceChildNodes('archive-navigation',
-                          SPAN({ 'class': 'title' }, 'Archive'), BR(),
                           map(function (entry) {
                                   var year = entry[0];
                                   var month = entry[1];
                                   var result = [];
                                   if (year != currentYear) {
                                       currentYear = year;
-                                      var link = A({ href: '#news/' + year, 'class': 'year' }, year, BR());
+                                      var link = A({ href: '#news/' + year,
+                                                     'class': 'year' + (year == activeYear ? ' active' : '') },
+                                                   year, BR());
+                                      link.year = year;
                                       result.push(link);
                                   }
                                   var link = A({ href: '#news/' + year + '/' + month,
                                                  'class': 'month ' + 'm' + month + (year == activeYear ? ' active' : '')},
                                                month_names[month - 1], BR());
+                                  link.month = month;
+                                  link.year = year;
                                   result.push(link);
                                   return result;
                               }, data.months));

Modified: trunk/projects/quickhoney/website/static/styles.css
===================================================================
--- trunk/projects/quickhoney/website/static/styles.css	2008-08-27 01:13:34 UTC (rev 3738)
+++ trunk/projects/quickhoney/website/static/styles.css	2008-08-27 02:08:00 UTC (rev 3739)
@@ -382,11 +382,11 @@
 /* news styles */
 
 #newsentries {
-	width: 428px;
+	width: 486px;
 }
 
 .newsentry {
-	width: 428px;
+	width: 486px;
 }
 
 .autonews {
@@ -417,7 +417,7 @@
 .news_vector { background-color: #00ccff; }
 .news_pixel { background-color: #ff00ff; }
 .autonews a { color: white }
-div.news_sep { width: 428px; height: 17px; background-image: url(/image/news-sep); }
+div.news_sep { width: 486px; height: 17px; background-image: url(/image/news-sep); }
 
 /* cms styles */
 
@@ -597,19 +597,21 @@
         visibility: hidden;
 }
 
-.archive span.title, .archive a.year { font-size: 1.5em; margin-bottom: 1em; }
+.archive span.title { font-size: 1.2em; padding-bottom: 5px; }
+.archive a.year { font-size: 1.2em; padding-bottom: 2em; }
+.archive a.year.active { color: #000; }
 .archive a.month.active { display: block; }
-.archive a.month { display: none; padding: 0px 5px 2px 5px; margin-top: 2px; }
-#archive-navigation.m1 a.m1 { color: #fff; background-color: #30be01; }
-#archive-navigation.m2 a.m2 { color: #fff; background-color: #30be01; }
-#archive-navigation.m3 a.m3 { color: #fff; background-color: #30be01; }
-#archive-navigation.m4 a.m4 { color: #fff; background-color: #30be01; }
-#archive-navigation.m5 a.m5 { color: #fff; background-color: #30be01; }
-#archive-navigation.m6 a.m6 { color: #fff; background-color: #30be01; }
-#archive-navigation.m7 a.m7 { color: #fff; background-color: #30be01; }
-#archive-navigation.m8 a.m8 { color: #fff; background-color: #30be01; }
-#archive-navigation.m9 a.m9 { color: #fff; background-color: #30be01; }
-#archive-navigation.m10 a.m10 { color: #fff; background-color: #30be01; }
-#archive-navigation.m11 a.m11 { color: #fff; background-color: #30be01; }
-#archive-navigation.m12 a.m12 { color: #fff; background-color: #30be01; }
+.archive a.month { display: none; padding: 0px 5px 2px 5px; margin-top: 2px; font-size: 0.8em; }
+#archive-navigation.m1 a.m1 { color: #000; }
+#archive-navigation.m2 a.m2 { color: #000; }
+#archive-navigation.m3 a.m3 { color: #000; }
+#archive-navigation.m4 a.m4 { color: #000; }
+#archive-navigation.m5 a.m5 { color: #000; }
+#archive-navigation.m6 a.m6 { color: #000; }
+#archive-navigation.m7 a.m7 { color: #000; }
+#archive-navigation.m8 a.m8 { color: #000; }
+#archive-navigation.m9 a.m9 { color: #000; }
+#archive-navigation.m10 a.m10 { color: #000; }
+#archive-navigation.m11 a.m11 { color: #000; }
+#archive-navigation.m12 a.m12 { color: #000; }
 .archive { padding-left: 1em; }




More information about the Bknr-cvs mailing list