The menubar from hell is back again
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 21 Sep 2007 01:06:22 +0000 (21:06 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 21 Sep 2007 01:06:22 +0000 (21:06 -0400)
28 files changed:
buttons/calendar.png [new file with mode: 0644]
buttons/calendar.xcf [new file with mode: 0644]
buttons/clubs.png [new file with mode: 0644]
buttons/csc.png [new file with mode: 0644]
buttons/csc.xcf [new file with mode: 0644]
buttons/docs.png [new file with mode: 0644]
buttons/docs.xcf [new file with mode: 0644]
buttons/gallery.png [new file with mode: 0644]
buttons/gerbil.png [new file with mode: 0644]
buttons/gitweb.png [new file with mode: 0644]
buttons/gopher.png [new file with mode: 0644]
buttons/home.png [new file with mode: 0644]
buttons/homepage.png [new file with mode: 0644]
buttons/horde.png [new file with mode: 0644]
buttons/library.png [new file with mode: 0644]
buttons/mm-icon.png [new file with mode: 0644]
buttons/office.png [new file with mode: 0644]
buttons/office.xcf [new file with mode: 0644]
buttons/package_multimedia.png [new file with mode: 0644]
buttons/services.png [new file with mode: 0644]
buttons/stats.png [new file with mode: 0644]
buttons/stats.xcf [new file with mode: 0644]
buttons/sunflower.png [new file with mode: 0644]
cscweb.xsl
default.css
menu.xml [new file with mode: 0644]
xsl/common.xsl
xsl/menu.xsl [new file with mode: 0644]

diff --git a/buttons/calendar.png b/buttons/calendar.png
new file mode 100644 (file)
index 0000000..f2ec1be
Binary files /dev/null and b/buttons/calendar.png differ
diff --git a/buttons/calendar.xcf b/buttons/calendar.xcf
new file mode 100644 (file)
index 0000000..251b394
Binary files /dev/null and b/buttons/calendar.xcf differ
diff --git a/buttons/clubs.png b/buttons/clubs.png
new file mode 100644 (file)
index 0000000..b4fe204
Binary files /dev/null and b/buttons/clubs.png differ
diff --git a/buttons/csc.png b/buttons/csc.png
new file mode 100644 (file)
index 0000000..555c0a6
Binary files /dev/null and b/buttons/csc.png differ
diff --git a/buttons/csc.xcf b/buttons/csc.xcf
new file mode 100644 (file)
index 0000000..d956720
Binary files /dev/null and b/buttons/csc.xcf differ
diff --git a/buttons/docs.png b/buttons/docs.png
new file mode 100644 (file)
index 0000000..a75b3a0
Binary files /dev/null and b/buttons/docs.png differ
diff --git a/buttons/docs.xcf b/buttons/docs.xcf
new file mode 100644 (file)
index 0000000..0bd14bb
Binary files /dev/null and b/buttons/docs.xcf differ
diff --git a/buttons/gallery.png b/buttons/gallery.png
new file mode 100644 (file)
index 0000000..00a327b
Binary files /dev/null and b/buttons/gallery.png differ
diff --git a/buttons/gerbil.png b/buttons/gerbil.png
new file mode 100644 (file)
index 0000000..1b4fe23
Binary files /dev/null and b/buttons/gerbil.png differ
diff --git a/buttons/gitweb.png b/buttons/gitweb.png
new file mode 100644 (file)
index 0000000..16ae8d5
Binary files /dev/null and b/buttons/gitweb.png differ
diff --git a/buttons/gopher.png b/buttons/gopher.png
new file mode 100644 (file)
index 0000000..0fc14c3
Binary files /dev/null and b/buttons/gopher.png differ
diff --git a/buttons/home.png b/buttons/home.png
new file mode 100644 (file)
index 0000000..ffa3502
Binary files /dev/null and b/buttons/home.png differ
diff --git a/buttons/homepage.png b/buttons/homepage.png
new file mode 100644 (file)
index 0000000..9aa89ba
Binary files /dev/null and b/buttons/homepage.png differ
diff --git a/buttons/horde.png b/buttons/horde.png
new file mode 100644 (file)
index 0000000..428d054
Binary files /dev/null and b/buttons/horde.png differ
diff --git a/buttons/library.png b/buttons/library.png
new file mode 100644 (file)
index 0000000..d7f2f58
Binary files /dev/null and b/buttons/library.png differ
diff --git a/buttons/mm-icon.png b/buttons/mm-icon.png
new file mode 100644 (file)
index 0000000..10f5940
Binary files /dev/null and b/buttons/mm-icon.png differ
diff --git a/buttons/office.png b/buttons/office.png
new file mode 100644 (file)
index 0000000..94e8f6a
Binary files /dev/null and b/buttons/office.png differ
diff --git a/buttons/office.xcf b/buttons/office.xcf
new file mode 100644 (file)
index 0000000..65ca0bb
Binary files /dev/null and b/buttons/office.xcf differ
diff --git a/buttons/package_multimedia.png b/buttons/package_multimedia.png
new file mode 100644 (file)
index 0000000..97edf2f
Binary files /dev/null and b/buttons/package_multimedia.png differ
diff --git a/buttons/services.png b/buttons/services.png
new file mode 100644 (file)
index 0000000..2d9803c
Binary files /dev/null and b/buttons/services.png differ
diff --git a/buttons/stats.png b/buttons/stats.png
new file mode 100644 (file)
index 0000000..c11a5d6
Binary files /dev/null and b/buttons/stats.png differ
diff --git a/buttons/stats.xcf b/buttons/stats.xcf
new file mode 100644 (file)
index 0000000..60a0426
Binary files /dev/null and b/buttons/stats.xcf differ
diff --git a/buttons/sunflower.png b/buttons/sunflower.png
new file mode 100644 (file)
index 0000000..ad350c6
Binary files /dev/null and b/buttons/sunflower.png differ
index 682ba14..0845e61 100644 (file)
@@ -36,6 +36,7 @@
 <xsl:include href="./xsl/functions.xsl" />
 <xsl:include href="./xsl/common.xsl" />
 <xsl:include href="./xsl/directory.xsl" />
+<xsl:include href="./xsl/menu.xsl" />
 <xsl:include href="./xsl/exec.xsl" />
 <xsl:include href="./xsl/members.xsl" />
 <xsl:include href="./xsl/events.xsl" />
index 83531bd..a40b29b 100644 (file)
@@ -143,6 +143,46 @@ div.template-header {
     padding-top: 5px;
 }
 
+div.menubar {
+    background-color: white;
+    padding-top: 12px;
+    margin: 0 auto;
+    text-align: center;
+    height: 75px;
+    vertical-align: middle;
+    font-size: 11px;
+    text-transform: uppercase;
+}
+
+div.menuitem {
+    margin: 0;
+    padding: 0;
+    text-align: center;
+    float: left;
+}
+
+div.menuitem a {
+    display: block;
+    text-align: center;
+    padding: 5px;
+    margin: 0;
+    text-decoration: none;
+    font-weight: 400;
+    font-family: 'Lucida Grande', Sans, Sans-serif;
+}
+
+div.menuitem a:hover {
+    font-weight: 700;
+    color: black;
+    background-color: #eee;
+    border: 1px solid #ccc;
+}
+
+div.menuitem p {
+    margin: 0;
+    padding: 0;
+}
+
 div.webtitle {
     height: 46px;
     width: 750px;
diff --git a/menu.xml b/menu.xml
new file mode 100644 (file)
index 0000000..38d361b
--- /dev/null
+++ b/menu.xml
@@ -0,0 +1,14 @@
+<menudefs>
+ <menuitem title="Home" icon="homepage" href="index.html"/>
+ <menuitem title="About" icon="csc" href="about/"/>
+ <menuitem title="Services" icon="services" href="services/"/>
+ <menuitem title="Office" icon="office" href="office/"/>
+ <menuitem title="Events" icon="calendar" href="events/"/>
+ <menuitem title="Media" icon="package_multimedia" href="media/"/>
+ <menuitem title="Library" icon="library" absolute="true" href="http://library.csclub.uwaterloo.ca/"/>
+ <menuitem title="Wiki" icon="sunflower" absolute="true" href="http://wiki.csclub.uwaterloo.ca/"/>
+ <menuitem title="Webmail" icon="horde" absolute="true" href="https://mail.csclub.uwaterloo.ca/"/>
+ <menuitem title="Mailman" icon="mm-icon" absolute="true" href="/mailman/"/>
+ <menuitem title="gopher" icon="gopher" absolute="true" href="gopher://csclub.uwaterloo.ca/"/>
+ <menuitem title="gitweb" icon="gitweb" absolute="true" href="http://gitweb.csclub.uwaterloo.ca/"/>
+</menudefs>
index 189f49a..a449bbd 100644 (file)
@@ -18,7 +18,7 @@
       <a id="pagetop" />
       <xsl:apply-templates select="biglogo" />
       <xsl:apply-templates select="header" />
-      <xsl:apply-templates select="section" />
+      <xsl:apply-templates select="section|menu" />
       <xsl:apply-templates select="footer" />
     </div></body>
   </html>
@@ -85,6 +85,7 @@
 
 <xsl:template match="footer" name="footer">
   <div class="footer">
+    <xsl:call-template name="menu" />
     <a href="#pagetop" class="pagetop">Go to top</a>
     <div class="infobox">
       <p>
diff --git a/xsl/menu.xsl b/xsl/menu.xsl
new file mode 100644 (file)
index 0000000..4e089ef
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet version="2.0"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:fn="http://www.w3.org/2005/xpath-functions"
+    xmlns:csc="http://csclub.uwaterloo.ca/xslt">
+
+<xsl:template match="menuitem">
+  <xsl:variable name="preabs">
+    <xsl:choose>
+      <xsl:when test="@absolute = 'true'" />
+      <xsl:otherwise>
+        <xsl:value-of select="$pre" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <div class="menuitem">
+    <a href="{$preabs}{@href}"><p><img src="{$pre}buttons/{@icon}.png" width="40" 
+      height="40" alt="{@title}" /></p><p><xsl:value-of select="@title" /></p></a>
+  </div>
+</xsl:template>
+
+<xsl:template match="menudefs">
+  <div class="menubar">
+    <xsl:apply-templates select="menuitem" />
+  </div>
+</xsl:template>
+
+<xsl:template match="menu" name="menu">
+ <xsl:apply-templates select="document(concat($g_root, '/menu.xml'))/menudefs" />
+</xsl:template>
+
+</xsl:stylesheet>