Change some http://www.csclub links to http://csclub links
[mspang/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   <p>This page was generated on <xsl:value-of select="$g_date" /> at 
71     <xsl:value-of select="$g_time" />.</p>
72   <p class="infobox">
73     The overall layout is designed specially for modern browsers. If you
74     experience any problems, please report them, along with the version of
75     your browser and operating system, to the 
76     <a href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
77     <br /><br />
78     This site supports TLS/SSL using a certificate signed by the 
79     "CSC Certificate Authority". Click <a href="{$pre}csclub.pem">here</a>
80     (PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to
81     install the certificate authority into your browser.
82   </p>
83   <p>
84     <a href="http://validator.w3.org/check?uri=referer">
85     <img src="http://www.w3.org/Icons/valid-xhtml10"
86         alt="Valid XHTML 1.0 Strict" height="31" width="88" />
87     </a>
88     <a href="http://jigsaw.w3.org/css-validator/check/referer">
89       <img style="border:0;width:88px;height:31px"
90           src="http://jigsaw.w3.org/css-validator/images/vcss" 
91           alt="Valid CSS!" />
92     </a>
93   </p>
94   <div class="footerlogo"><a href="{$pre}"><img src=
95       "{$pre}logos/csc_80_35.png" alt="CSC" /></a></div>
96     <p>
97       Copyright
98       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
99       2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
100       Computer Science Club of the University of Waterloo.<br />
101       KDE Crystal theme icons are copyright
102       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
103       2002 and following years KDE Artists. Sunflower image is copyright Manan 
104       Tuli. Horde image is copyright horde contributors. Both are available 
105       under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">
106       Creative Commons::Attribution-ShareAlike license</a>. Gopher image is 
107       copyright Elron6900 (Flickr) and is available under the <a
108       href="http://creativecommons.org/licenses/by-nc/2.0/">
109       Attribution-NonCommercial 2.0</a> license.
110     </p>
111   </div>
112 </xsl:template>
113
114 <xsl:template match="news-and-events">
115   <table cellspacing="1" cellpadding="2" class="newsandevents">
116     <xsl:call-template name="events" />
117     <xsl:call-template name="news" />
118  </table>
119 </xsl:template>
120
121 </xsl:stylesheet>