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