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