Fix centering problem on IE6 and cleanup css
[www/www.git] / xsl / common.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="1.0"
4     xmlns="http://www.w3.org/1999/xhtml"
5     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6     xmlns:csc="http://csclub.uwaterloo.ca/xsltproc">
7
8 <xsl:template match="cscpage">
9   <html>
10     <head>
11       <link rel="shortcut icon" href="/favicon.ico" />
12       <link rel="alternate" title="CSC Events Feed" href="{$g_pre}events.atom"
13           type="application/rss+xml" />
14       <link rel="alternate" title="CSC News Feed" href="{$g_pre}news.atom"
15           type="application/rss+xml" />
16       <title><xsl:value-of select="@title" /></title>
17       <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
18     </head>
19     <body><div class="content">
20       <a id="pagetop" />
21       <xsl:apply-templates select="biglogo" />
22       <xsl:apply-templates select="header" />
23       <xsl:apply-templates select="section|menu" />
24       <xsl:apply-templates select="footer" />
25     </div></body>
26   </html>
27 </xsl:template>
28
29 <xsl:template match="section">
30   <xsl:if test="@anchor">
31     <a id="{@anchor}" />
32   </xsl:if>
33   <h2><xsl:value-of select="@title" /></h2>
34   <xsl:apply-templates />
35 </xsl:template>
36
37 <xsl:template match="biglogo">
38   <div class="biglogo">
39     <div class="uwlogo">
40       <a href="http://www.uwaterloo.ca/"><img src="{$g_pre}logos/uw_logo.gif"
41           alt="University of Waterloo" width="105" height="70" /></a>
42     </div>
43     <div class="acmlogo">
44       <a href="http://www.acm.org"><img src="{$g_pre}logos/acm_logo.gif"
45            alt="A Student Chapter of the ACM" width="82" height="88" /></a>
46     </div>
47     <div class="csclogo">
48       <a href="{$g_pre}index.html"><img src="{$g_pre}logos/csc_logo.gif"
49           alt="Computer Science Club" width="420" height="79" /></a>
50     </div>
51   </div>
52   <div class="template-header">
53     <xsl:apply-templates
54         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
55   </div>
56 </xsl:template>
57
58 <xsl:template match="header">
59   <xsl:call-template name="header" />
60 </xsl:template>
61
62 <xsl:template name="header">
63   <xsl:param name="title" />
64   <xsl:param name="href" />
65   <div class="webtitle">
66     <a href="{$g_pre}"><img src="{$g_pre}logos/csc_title.gif"
67         alt="CSC Logo" /></a>
68   </div>
69   <div class="template-header">
70     <xsl:apply-templates
71         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
72     <xsl:if test="$title">
73       <xsl:call-template name="diritem">
74         <xsl:with-param name="title" select="$title" />
75         <xsl:with-param name="href" select="$href" />
76       </xsl:call-template>
77     </xsl:if>
78   </div>
79 </xsl:template>
80
81 <xsl:template match="footer" name="footer">
82   <div class="footer">
83     <xsl:call-template name="menu" />
84     <a href="#pagetop" class="pagetop">Go to top</a>
85     <div class="infobox">
86       <p>
87         This site supports TLS/SSL using a certificate signed by the
88         "CSC Certificate Authority". Click <a href="{$g_pre}csclub.pem">
89         here</a> (PEM format) or <a href="{$g_pre}csclub.der">here</a> (DER
90         format) to install the certificate authority into your browser.
91       </p><p>
92         This page was generated on <xsl:value-of select="$g_date" /> at
93         <xsl:value-of select="$g_time" />.
94       </p><p>
95         Copyright
96         <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
97         2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
98         Computer Science Club of the University of Waterloo.
99       </p>
100     </div>
101   </div>
102 </xsl:template>
103
104 <xsl:template match="news-and-events">
105   <table cellspacing="1" cellpadding="2" class="newsandevents">
106     <xsl:call-template name="events" />
107     <xsl:call-template name="news" />
108  </table>
109 </xsl:template>
110
111 </xsl:stylesheet>