[PATCH] NAND table: alternate row colors
Artem Bityutskiy
dedekind1 at gmail.com
Mon Mar 4 06:03:47 EST 2013
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
The truly great NAND table that we have is rather difficult to follow because
it is big. Make this a bit easier by applying different background colors to
different rows. Alternate the colors with period = 4.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
nand-data/csvtohtml.py | 2 +-
nand-data/header.tmpl | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/nand-data/csvtohtml.py b/nand-data/csvtohtml.py
index 06b010b..36c72aa 100755
--- a/nand-data/csvtohtml.py
+++ b/nand-data/csvtohtml.py
@@ -21,7 +21,7 @@ def csvToHTML(file):
tmp = open(head, 'r')
fdout.write(tmp.read())
tmp.close()
- fdout.write('<table>\n')
+ fdout.write('<table class="zebra">\n')
row = reader.next()
for i in range(len(row)):
if (row[i] == "All but Size"):
diff --git a/nand-data/header.tmpl b/nand-data/header.tmpl
index d0b3423..a9d5420 100644
--- a/nand-data/header.tmpl
+++ b/nand-data/header.tmpl
@@ -22,6 +22,9 @@
table th { background-color: #eee; }
.wrong-size { color: #0066FF; }
.exception { color: red; }
+ .zebra tbody tr:nth-child(4n+1) { background-color: #ffffef;}
+ .zebra tbody tr:nth-child(4n+2) { background-color: #ffefff;}
+ .zebra tbody tr:nth-child(4n+3) { background-color: #efffff;}
#footer { text-align: left; }
</style>
<!--
--
1.8.1.2
More information about the linux-mtd
mailing list