]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
add alternating grey-background to make it easier to scan across the table left to...
authorZooko O'Whielacronx <zooko@zooko.com>
Mon, 8 Oct 2012 18:13:33 +0000 (12:13 -0600)
committerBrian Warner <warner@lothar.com>
Mon, 8 Oct 2012 19:08:50 +0000 (12:08 -0700)
misc/build_helpers/gen-package-table.py

index b2171ff3486cf8dbfaf899408b555ff6b4b34111..99a43ed02c9ca30659004978e652227177aac876 100644 (file)
@@ -66,6 +66,9 @@ platform_independent_pkgs = pkgs - platform_dependent_pkgs
 
 width = 100 / (len(platform_independent_pkgs) + 1)
 
+greybgstyle = '; background-color: #E0E0E0'
+nobgstyle = ''
+
 print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
 print '<html>'
 print '<head>'
@@ -78,6 +81,7 @@ print '<p>See <a href="https://tahoe-lafs.org/trac/tahoe-lafs/browser/docs/quick
 print '<h2>Software packages that Tahoe-LAFS depends on</h2>'
 print
 for pyver in reversed(sorted(python_versions)):
+    greybackground = False
     if pyver:
         print '<p>Packages for Python %s that have compiled C/C++ code:</p>' % (pyver,)
         print '<table border="1">'
@@ -89,9 +93,16 @@ for pyver in reversed(sorted(python_versions)):
 
         first = True
         for platform in sorted(matrix[pyver]):
+            if greybackground:
+                bgstyle = greybgstyle
+            else:
+                bgstyle = nobgstyle
+            greybackground = not greybackground
             row_files = sorted(matrix[pyver][platform])
-            style1 = first and 'border-top: 2px solid #000000; background-color: #FFFFF0' or 'background-color: #FFFFF0'
+            style1 = first and 'border-top: 2px solid #000000' or ''
+            style1 += bgstyle
             style2 = first and 'border-top: 2px solid #000000' or ''
+            style2 += bgstyle
             print '  <tr>'
             print '    <td style="%s">&nbsp;%s&nbsp;</td>' % (style1, platform,)
             for pkg in sorted(platform_dependent_pkgs):