Prettied up supported hardware table with alternating colors for table
rows.
This commit is contained in:
parent
109f81df7e
commit
f166b87038
2 changed files with 45 additions and 3 deletions
15
comedi-www.css
Normal file
15
comedi-www.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
body
|
||||
{
|
||||
background-color: White;
|
||||
}
|
||||
|
||||
tr.odd
|
||||
{
|
||||
background-color: White;
|
||||
}
|
||||
|
||||
tr.even
|
||||
{
|
||||
background-color: Lavender;
|
||||
}
|
||||
|
33
comedi.xsl
33
comedi.xsl
|
@ -9,6 +9,31 @@
|
|||
|
||||
<xsl:output method="html" encoding="UTF-8" version="4.01" />
|
||||
|
||||
<!-- alternate background color of table rows -->
|
||||
<xsl:template match="table">
|
||||
<xsl:copy>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:copy>
|
||||
<xsl:if test="name()='tr'">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">even</xsl:when>
|
||||
<xsl:otherwise>odd</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:for-each>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="page">
|
||||
<xsl:param name="title" select="Big_Kitten_LLC" />
|
||||
<xsl:param name="content" />
|
||||
|
@ -17,9 +42,10 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; Linux 2.3.50 i686) [Netscape]" />
|
||||
<title><xsl:copy-of select="title/node()" /></title>
|
||||
<xsl:apply-templates select="title"/>
|
||||
<link rel="stylesheet" href="comedi-www.css" type="text/css"/>
|
||||
</head>
|
||||
<body bgcolor="#000000">
|
||||
<body>
|
||||
|
||||
|
||||
<table border="0" width="99%" align="center" cellpadding="2" cellspacing="2"
|
||||
|
@ -68,7 +94,7 @@ Links
|
|||
|
||||
</td>
|
||||
<td valign="top" align="left">
|
||||
<xsl:copy-of select="body/node()" />
|
||||
<xsl:apply-templates select="body/*"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -76,5 +102,6 @@ Links
|
|||
</html>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue