changeset 350:987caba84824

downloads: highlight preferred options with <em>
author David Champion <dgc@uchicago.edu>
date Sun, 21 Nov 2010 01:26:01 -0600
parents fb3ce83c1a48
children a6c7665d9f67
files static/css/styles.css static/js/download.js
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/static/css/styles.css	Sat Nov 20 19:53:07 2010 -0600
+++ b/static/css/styles.css	Sun Nov 21 01:26:01 2010 -0600
@@ -66,6 +66,7 @@
 .latest thead td, .latest thead th { background: #00B5F1; color: #fff; font-weight: bold; }
 thead td, thead th { background: #999; color: #fff; font-weight: bold; }
 tbody td { border-bottom: 1px solid #ccc; }
+tbody td em { font-style: normal; font-weight: bolder; }
 
 /*
  * Quotes
--- a/static/js/download.js	Sat Nov 20 19:53:07 2010 -0600
+++ b/static/js/download.js	Sun Nov 21 01:26:01 2010 -0600
@@ -57,9 +57,15 @@
             return (b < a) - (a < b);
         });
 
+        var desc;
         for (i in downloads) {
             var dl = downloads[i];
-            document.write('<tr>\n<td>' + dl.desc + '</td>' +
+            var ua = navigator.userAgent;
+            if (dl.matches(ua))
+                desc = '<em>' + dl.desc + '</em>';
+            else
+                desc = dl.desc;
+            document.write('<tr>\n<td>' + desc + '</td>' +
                            '<td></td>' +
                            '<td><a href="' + dl.url + '">download</a></td>' +
                            '</tr>');