divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb
Log | Files | Refs | README | LICENSE

commit 9268db5901bad17e7a311c3675e15b66de0d9e64
parent 3a65df5297bee551a8359b6c1adce6e2cdc24f6c
Author: lostd <lostd@2f30.org>
Date:   Wed, 19 Feb 2014 20:21:00 +0200

Misc configuration

Diffstat:
Aconf/divzero.xsl | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/conf/divzero.xsl b/conf/divzero.xsl @@ -0,0 +1,32 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="html"/> + +<xsl:template match="/icestats"> +<!-- only show the first source --> +<xsl:apply-templates select="source[1]"/> +</xsl:template> + +<xsl:template match="source"> +<html> +<head> +<link rel="stylesheet" href="http://www.2f30.org/css/bootstrap.min.css" /> +</head> +<body> +<table class="table table-bordered table-striped"> +<tr><td>What</td><td> +<xsl:choose> +<xsl:when test="title or artist"> +<xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if> +<xsl:value-of select="title" /> +</xsl:when> +<xsl:otherwise>SIGFPE</xsl:otherwise> +</xsl:choose> +</td></tr> +<tr><td>Listeners</td><td><xsl:value-of select="listeners"/></td></tr> +<tr><td>Who</td><td><xsl:value-of select="server_name"/></td></tr> +</table> +</body> +</html> +</xsl:template> + +</xsl:stylesheet>