www/xsl/common.xsl

107 lines
3.3 KiB
XML
Raw Permalink Normal View History

<?xml version='1.0'?>
2007-11-22 03:44:33 -05:00
<xsl:stylesheet version="1.1"
2007-08-11 04:26:38 -04:00
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:csc="http://csclub.uwaterloo.ca/xsltproc"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="csc">
<xsl:output method="xml" />
<xsl:template match="cscpage">
<html>
<head>
<link rel="shortcut icon" href="/favicon.ico" />
2007-09-29 21:58:00 -04:00
<link rel="alternate" title="CSC Events Feed" href="{$g_pre}events.atom"
2007-09-26 04:49:01 -04:00
type="application/rss+xml" />
2007-09-29 21:58:00 -04:00
<link rel="alternate" title="CSC News Feed" href="{$g_pre}news.atom"
2007-09-26 04:49:01 -04:00
type="application/rss+xml" />
<title><xsl:value-of select="@title" /></title>
2007-09-29 21:58:00 -04:00
<link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head>
<body><div class="content">
<a id="pagetop" />
<xsl:apply-templates select="biglogo" />
<xsl:apply-templates select="header" />
2007-09-20 21:06:22 -04:00
<xsl:apply-templates select="section|menu" />
<xsl:apply-templates select="footer" />
</div></body>
</html>
</xsl:template>
<xsl:template match="section">
<xsl:if test="@anchor">
2007-10-09 20:04:09 -04:00
<a id="{@anchor}" />
</xsl:if>
<h2><xsl:value-of select="@title" /></h2>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="biglogo">
<div class="biglogo">
<div class="uwlogo">
<a href="http://www.uwaterloo.ca/"><img src="{$g_pre}logos/uw_logo.png"
alt="University of Waterloo" width="105" height="70" /></a>
</div>
<div class="csclogo">
<a href="{$g_pre}"><img src="{$g_pre}logos/csc_logo.png"
2007-10-22 04:32:45 -04:00
alt="Computer Science Club" width="420" height="79" /></a>
</div>
</div>
2007-11-28 02:16:00 -05:00
<div class="dirheader">
<xsl:apply-templates
select="document(concat($g_pwd, '/directory.xml'))/directory"/>
</div>
</xsl:template>
2007-09-19 04:43:46 -04:00
<xsl:template match="header">
<xsl:call-template name="header" />
</xsl:template>
<xsl:template name="header">
<xsl:param name="title" />
<xsl:param name="href" />
<div class="webtitle">
<a href="{$g_pre}"><img src="{$g_pre}logos/csc_title.png"
alt="CSC Logo" /></a>
</div>
2007-11-28 02:16:00 -05:00
<div class="dirheader">
<xsl:apply-templates
2007-08-11 04:26:38 -04:00
select="document(concat($g_pwd, '/directory.xml'))/directory"/>
2007-09-19 04:43:46 -04:00
<xsl:if test="$title">
<xsl:call-template name="diritem">
<xsl:with-param name="title" select="$title" />
<xsl:with-param name="href" select="$href" />
</xsl:call-template>
</xsl:if>
</div>
</xsl:template>
<xsl:template match="footer" name="footer">
<div class="footer">
2007-09-20 21:06:22 -04:00
<xsl:call-template name="menu" />
<a href="#pagetop" class="pagetop">Go to top</a>
<div class="infobox">
<p>
2010-09-22 16:54:46 -04:00
This site supports TLS/SSL using a certificate signed by GlobalSign.
</p><p>
This page was generated on <xsl:value-of select="$g_date" /> at
<xsl:value-of select="$g_time" />.
</p><p>
Copyright
<xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
2012-02-03 21:56:31 -05:00
2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2012
Computer Science Club of the University of Waterloo.
</p>
</div>
</div>
</xsl:template>
<xsl:template match="news-and-events">
<table cellspacing="1" cellpadding="2" class="newsandevents">
<xsl:call-template name="events" />
<xsl:call-template name="news" />
2008-01-15 23:06:56 -05:00
</table>
</xsl:template>
</xsl:stylesheet>