2ab9d43924bfc746aee5a3b6db9b1c0252401d5b
[www/www.git] / xsl / common.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="2.0"
4     xmlns="http://www.w3.org/1999/xhtml"
5     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6     xmlns:xs="http://www.w3.org/2001/XMLSchema"
7     xmlns:fn="http://www.w3.org/2005/xpath-functions"
8     xmlns:csc="http://csclub.uwaterloo.ca/xslt">
9
10 <xsl:template match="cscpage">
11   <html>
12     <head>
13         <link rel="shortcut icon" href="/favicon.ico" />
14         <title><xsl:value-of select="@title" /></title>
15       <link rel="stylesheet" href="{$pre}default.css" type="text/css" />
16     </head>
17     <body><div>
18       <a id="pagetop" />
19       <xsl:apply-templates select="biglogo" />
20       <xsl:apply-templates select="header" />
21       <xsl:apply-templates select="section|menu" />
22       <xsl:apply-templates select="footer" />
23     </div></body>
24   </html>
25 </xsl:template>
26
27 <xsl:template match="section">
28   <xsl:if test="@anchor">
29     <a name="{@anchor}" />
30   </xsl:if>
31   <h2><xsl:value-of select="@title" /></h2>
32   <xsl:apply-templates />
33 </xsl:template>
34
35 <xsl:template match="biglogo">
36   <div class="biglogo">
37     <div class="uwlogo">
38       <a href="http://www.uwaterloo.ca/"><img src="{$pre}logos/uw_logo.gif"
39           alt="University of Waterloo" width="105" height="70" /></a>
40     </div>
41     <div class="acmlogo">
42       <a href="http://www.acm.org"><img src="{$pre}logos/acm_logo.gif"
43            alt="A Student Chapter of the ACM" width="82" height="88" /></a>
44     </div>
45   </div>
46 </xsl:template>
47
48 <xsl:template match="header" name="header">
49   <div id="vfeed" />
50   <div class="webtitle">
51     <div class="csclogo">
52       <a href="{$pre}"><img src="{$pre}logos/csc_80_35_white.png" 
53           alt="CSC Logo" /></a>
54     </div>
55     <div>
56       <a href="{$pre}"><img src="{$pre}logos/csc_title.png" 
57           alt="Computer Science Club" /></a>
58     </div>
59   </div>
60   <div class="template-header">
61     <xsl:apply-templates
62         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
63   </div>
64 </xsl:template>
65
66 <xsl:template match="footer" name="footer">
67   <a href="#pagetop" class="pagetop">Go to top</a>
68   <div class="footer">
69   <xsl:call-template name="menu" />
70   <div class="infobox"><p>
71     This page was generated on <xsl:value-of select="$g_date" /> at 
72     <xsl:value-of select="$g_time" />.
73     </p><p>
74     The overall layout is designed specially for modern browsers. If you
75     experience any problems, please report them, along with the version of
76     your browser and operating system, to the 
77     <a href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
78     </p><p>
79     This site supports TLS/SSL using a certificate signed by the 
80     "CSC Certificate Authority". Click <a href="{$pre}csclub.pem">here</a>
81     (PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to
82     install the certificate authority into your browser.
83   </p></div>
84   <p>
85     <a href="http://validator.w3.org/check?uri=referer">
86     <img src="http://www.w3.org/Icons/valid-xhtml10"
87         alt="Valid XHTML 1.0 Strict" height="31" width="88" />
88     </a>
89     <a href="http://jigsaw.w3.org/css-validator/check/referer">
90       <img style="border:0;width:88px;height:31px"
91           src="http://jigsaw.w3.org/css-validator/images/vcss" 
92           alt="Valid CSS!" />
93     </a>
94   </p>
95   <div class="footerlogo"><a href="{$pre}"><img src=
96       "{$pre}logos/csc_80_35.png" alt="CSC" /></a></div>
97     <p>
98       Copyright
99       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
100       2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
101       Computer Science Club of the University of Waterloo.<br />
102       KDE Crystal theme icons are copyright
103       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
104       2002 and following years KDE Artists. Sunflower image is copyright Manan 
105       Tuli. Horde image is copyright horde contributors. Both are available 
106       under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">
107       Creative Commons::Attribution-ShareAlike license</a>. Gopher image is 
108       copyright Elron6900 (Flickr) and is available under the <a
109       href="http://creativecommons.org/licenses/by-nc/2.0/">
110       Attribution-NonCommercial 2.0</a> license.
111     </p>
112   </div>
113 </xsl:template>
114
115 <xsl:template match="news-and-events">
116   <table cellspacing="1" cellpadding="2" class="newsandevents">
117     <xsl:call-template name="events" />
118     <xsl:call-template name="news" />
119  </table>
120 </xsl:template>
121
122 </xsl:stylesheet>