Added books... yay.
authorStefanus Du Toit <sjdutoit@csclub.uwaterloo.ca>
Tue, 23 Apr 2002 01:02:42 +0000 (01:02 +0000)
committerStefanus Du Toit <sjdutoit@csclub.uwaterloo.ca>
Tue, 23 Apr 2002 01:02:42 +0000 (01:02 +0000)
Makefile
csc.dtd
cscweb.xsl
default.css
docs/Makefile
docs/website.xml
office/Makefile
office/books.xml [new file with mode: 0755]
office/books/.cvsignore [new file with mode: 0755]
office/books/Makefile [new file with mode: 0755]
office/directory.xml

index 64634e3..da9e51e 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-INPUTS = index.xml
+INPUTS = index.xml 
 SUBDIRS = about events docs office
 
 # the following two rules are there so cow gets built first.
-cow-first: recurse-cow members.xml all
+cow-first: recurse-cow books.xml members.xml all
 
 recurse-cow:
        cd cow && $(MAKE) && cd ..
@@ -10,13 +10,19 @@ recurse-cow:
 members.xml:
        echo '<?xml version='\''1.0'\''?>' > $@
        echo '<memberlist>' >> $@
-       ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
+       ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
        echo '</memberlist>' >> $@
 
+books.xml:
+       echo '<?xml version='\''1.0'\'' encoding="ISO-8859-1"?>' > $@
+       echo '<booklist>' >> $@
+       ceoquery booklist | awk -F \| '{ isbn = $$1; title = $$2; author = $$3; edition = $$4; published = $$5; gsub(/&/, "\\&amp;", title); gsub(/&/, "\\&amp;", author); gsub(/&/, "\\&amp;", published); gsub(/&/, "\\&amp;", edition); gsub(/"/, "\\&quot;", title); gsub(/"/, "\\&quot;", author); gsub(/"/, "\\&quot;", published); gsub(/"/, "\\&quot;", edition); print "<book isbn=\"" isbn "\" title=\"" title "\" author=\"" author "\" edition=\"" edition "\" published=\"" published "\"/>"; }' >> $@
+       echo '</booklist>' >> $@
+
 include default.mk
 
 default.mk: default.mk.in
        echo 'ROOT = '`pwd` > $@
        cat $< >> $@
 
-.PHONY: members.xml
+.PHONY: members.xml books.xml
diff --git a/csc.dtd b/csc.dtd
index fdd4576..963e6b9 100755 (executable)
--- a/csc.dtd
+++ b/csc.dtd
 
 <!ELEMENT members-this-term EMPTY>
 
+<!ELEMENT booklist (member*)>
+<!ELEMENT book EMPTY>
+<!ATTLIST book
+  isbn CDATA #REQUIRED
+  title CDATA #REQUIRED
+  author CDATA #REQUIRED
+  published CDATA ""
+  edition CDATA "">
+
+<!ELEMENT all-books EMPTY>
+
 <!ELEMENT menudefs (menuitem*)>
 <!ELEMENT menuitem EMPTY>
 <!ATTLIST menuitem
@@ -61,3 +72,4 @@
   type CDATA "elected"
   name CDATA #REQUIRED
   userid CDATA #REQUIRED>
+
index 0751ae5..f82e0c7 100755 (executable)
  <xsl:apply-templates />
 </xsl:template>
 
-<xsl:template match="biglogo" name="menu">
-  <table cellspacing="0" cellpadding="2" border="0" align="center">
+<xsl:template match="biglogo" name="biglogo">
+  <table cellspacing="0" cellpadding="0" border="0" align="center">
    <tr>
-    <td width="174" rowspan="2"><img src="/logos/csc_160_70.png" alt="CSC" width="165" height="75" /></td>
-    <td>University of Waterloo</td>
-   </tr>
-   <tr>
-    <td>Computer Science Club</td>
+    <td width="109"><a href="http://www.uwaterloo.ca/"><img
+    src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
+    width="100" height="68" align="center" border="0" /></a></td>
+    <td width="174"><a href="/"><img src="/logos/csc_160_70.png"
+    alt="Computer Science Club" width="165" height="75" align="center"
+    border="0" /></a></td>
+    <td width="91"><a href="http://www.acm.org"><img width="82"
+    height="103" src="/logos/acm_logo.gif" alt="A Student Chapter of
+    the ACM" align="center" border="0" /></a></td>
    </tr>
   </table>
 </xsl:template>
     </tr>
     <xsl:for-each select="document('members.xml')/memberlist/member">
       <tr>
+       <xsl:if test="position() mod 2 = 0">
+         <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
+       </xsl:if>
        <td><xsl:value-of select="@id"/></td>
        <td><xsl:value-of select="@name"/></td>
        <td><xsl:value-of select="@program"/></td>
   </table>
 </xsl:template>
 
+<xsl:template match="all-books">
+  <p>The books we currently own include:</p>
+  <table>
+    <tr>
+      <th>Title</th>
+      <th>Author</th>
+    </tr>
+    <xsl:for-each select="document('books.xml')/booklist/book">
+      <tr>
+       <xsl:if test="position() mod 2 = 0">
+         <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
+       </xsl:if>
+       <td><a href="/office/books/{@isbn}.html"><xsl:value-of
+       select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
+       select="@edition"/>)</xsl:if></a></td>
+       <td><xsl:value-of select="@author"/></td>
+      </tr>
+<xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
+<xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]>
+</xsl:text>
+<html>
+<head>
+ <title>Book: <xsl:value-of select="@title"/></title>
+  <style type="text/css">
+   <![CDATA[<!-- @import url('/default.css'); -->]]>
+  </style>
+</head>
+<body>
+ <xsl:call-template name="header">
+    <xsl:with-param name="title" select="@title"/>
+ </xsl:call-template>
+<p>
+ <b>Title: </b> <xsl:value-of select="@title"/><br />
+ <b>Edition: </b> <xsl:value-of select="@edition"/><br />
+ <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
+ <b>Author: </b> <xsl:value-of select="@author"/><br />
+ <b>Published: </b> <xsl:value-of select="@published"/><br />
+</p>
+  <xsl:call-template name="footer"/>
+</body>
+</html>
+ </xsl:document>
+    </xsl:for-each>
+  </table>
+</xsl:template>
+
 <xsl:template match="generate-event-files">
  <xsl:apply-templates select="document('events.xml')/eventdefs"/>
 </xsl:template>
index 524e636..0ad46e9 100755 (executable)
@@ -15,3 +15,4 @@ td.eventitem { background: white; text-align: left}
 td.eventroom { background: #eeffee; font-family: sans-serif; font-size: x-small; text-align: center}
 th.news { background: #222255; color: white; font-family: sans-serif; font-size: x-small; text-align: left; }
 td.pagetitle { font-size: large; font-weight: bold; }
+th { background: #002288; color: white; }
\ No newline at end of file
index 5bcb63a..81af537 100755 (executable)
@@ -1,4 +1,4 @@
 INPUTS = index.xml constitution.xml official.xml machine_usage.xml \
-       machine_usage_summary.xml website.xml
+       machine_usage_summary.xml website.xml editing-howto.xml
 
 include ../default.mk
\ No newline at end of file
index f77e27a..bc0348c 100755 (executable)
@@ -21,9 +21,9 @@
       generating the <a href="/events/">events pages</a>).
     </p>
   </section>
-  <section title="Documentation">
-    <p>Soon I'll hopefully have some documentation here on how to add
-    content to the website and make other changes.</p>
+  <section title="Adding to the website">
+    <p>See the <a href="editing-howto.html">Editing Howto</a> for
+    information on editing the website</p>
   </section>
   <section title="Links">
     <p>
index c3528c8..ad980e2 100755 (executable)
@@ -1,3 +1,6 @@
-INPUTS = index.xml staff.xml
+SUBDIRS = books
+INPUTS = index.xml staff.xml books.xml
 
-include ../default.mk
\ No newline at end of file
+include ../default.mk
+
+books.html: ../books.xml
diff --git a/office/books.xml b/office/books.xml
new file mode 100755 (executable)
index 0000000..ea2ebb5
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE cscpage SYSTEM "../csc.dtd">
+
+<cscpage title="CSC Books">
+  <header />
+  <section title="CSC Book list">
+    <all-books />
+  </section>
+  <footer />
+</cscpage>
diff --git a/office/books/.cvsignore b/office/books/.cvsignore
new file mode 100755 (executable)
index 0000000..2d19fc7
--- /dev/null
@@ -0,0 +1 @@
+*.html
diff --git a/office/books/Makefile b/office/books/Makefile
new file mode 100755 (executable)
index 0000000..0029419
--- /dev/null
@@ -0,0 +1,3 @@
+INPUTS = 
+
+include ../../default.mk
index 64ba253..78bdbe3 100755 (executable)
@@ -4,4 +4,5 @@
 
 <directory title="Office">
   <diritem title="Staff" href="staff.html" />
+  <diritem title="Books" href="books.html" />
 </directory>