public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] NAND table: alternate row colors
@ 2013-03-04 11:03 Artem Bityutskiy
  2013-03-04 20:17 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Bityutskiy @ 2013-03-04 11:03 UTC (permalink / raw)
  To: Brian Norris; +Cc: MTD Maling List

From: Artem Bityutskiy <artem.bityutskiy@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@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-04 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 11:03 [PATCH] NAND table: alternate row colors Artem Bityutskiy
2013-03-04 20:17 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox