[Pcsclite-cvs-commit] r5140 - in /website: matrix.css matrix.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Aug 16 08:02:32 UTC 2010


Author: rousseau
Date: Mon Aug 16 08:02:26 2010
New Revision: 5140

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5140
Log:
Define supported, shouldwork and unsupported colors in matrix.css
instead of hardcoding them using bgcolor="" 

Modified:
    website/matrix.css
    website/matrix.py

Modified: website/matrix.css
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.css?rev=5140&op=diff
==============================================================================
--- website/matrix.css (original)
+++ website/matrix.css Mon Aug 16 08:02:26 2010
@@ -1,2 +1,5 @@
 a img{position:absolute;visibility:hidden}
 a:hover img{visibility:visible}
+tr.supported, td.supported {background-color:#ffffff;}
+tr.shouldwork, td.shouldwork {background-color:#a0ffff;}
+tr.unsupported, td.unsupported {background-color:#ffa0a0;}

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=5140&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Mon Aug 16 08:02:26 2010
@@ -321,6 +321,7 @@
     generate a web page with all the reader attributes
     readers are in the order given by index
     """
+
     header = """<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -330,6 +331,7 @@
     <link rel="stylesheet" type="text/css" href="matrix.css">
   </head>
   <body>"""
+
     footer = """
 <script type="text/javascript">
 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
@@ -343,13 +345,16 @@
     <p>Ludovic Rousseau</p>
   </body>
 </html>"""
+
     documentation = """
     <p>Click on the column header to sort by that column.</p>
     <p>The background color indicates the section of the reader:</p>
     <table border="1" summary="color codes">
-    <tr><td>supported</td>
-    <td bgcolor="#a0ffff">should work</td>
-    <td bgcolor="#ffa0a0">unsupported</td></tr></table>
+    <tr>
+    <td class="supported">supported</td>
+    <td class="shouldwork">should work</td>
+    <td class="unsupported">unsupported</td>
+    </tr></table>
     """
 
     file = open(field + ".html", "w")
@@ -370,12 +375,7 @@
     num = 0
     for r in index:
         num += 1
-        if readers[r]['section'] == "unsupported":
-            file.write('<tr bgcolor="#ffa0a0">')
-        elif readers[r]['section'] == "shouldwork":
-            file.write('<tr bgcolor="#a0ffff">')
-        else:
-            file.write('<tr>')
+        file.write('<tr class="%s">' % readers[r]['section'])
         file.write("<td>%d</td>" % num)
         for f in fields:
             if f == 'iProduct':




More information about the Pcsclite-cvs-commit mailing list