Added books... yay.
This commit is contained in:
parent
96df86cd8e
commit
51c473f23e
14
Makefile
14
Makefile
|
@ -1,8 +1,8 @@
|
||||||
INPUTS = index.xml
|
INPUTS = index.xml
|
||||||
SUBDIRS = about events docs office
|
SUBDIRS = about events docs office
|
||||||
|
|
||||||
# the following two rules are there so cow gets built first.
|
# 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:
|
recurse-cow:
|
||||||
cd cow && $(MAKE) && cd ..
|
cd cow && $(MAKE) && cd ..
|
||||||
|
@ -10,13 +10,19 @@ recurse-cow:
|
||||||
members.xml:
|
members.xml:
|
||||||
echo '<?xml version='\''1.0'\''?>' > $@
|
echo '<?xml version='\''1.0'\''?>' > $@
|
||||||
echo '<memberlist>' >> $@
|
echo '<memberlist>' >> $@
|
||||||
ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/"/, "\\"", name); gsub(/"/, "\\"", program); gsub(/&/, "\\&", name); gsub(/&/, "\\&", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
|
ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/&/, "\\&", name); gsub(/&/, "\\&", program); gsub(/"/, "\\"", name); gsub(/"/, "\\"", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
|
||||||
echo '</memberlist>' >> $@
|
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(/&/, "\\&", title); gsub(/&/, "\\&", author); gsub(/&/, "\\&", published); gsub(/&/, "\\&", edition); gsub(/"/, "\\"", title); gsub(/"/, "\\"", author); gsub(/"/, "\\"", published); gsub(/"/, "\\"", edition); print "<book isbn=\"" isbn "\" title=\"" title "\" author=\"" author "\" edition=\"" edition "\" published=\"" published "\"/>"; }' >> $@
|
||||||
|
echo '</booklist>' >> $@
|
||||||
|
|
||||||
include default.mk
|
include default.mk
|
||||||
|
|
||||||
default.mk: default.mk.in
|
default.mk: default.mk.in
|
||||||
echo 'ROOT = '`pwd` > $@
|
echo 'ROOT = '`pwd` > $@
|
||||||
cat $< >> $@
|
cat $< >> $@
|
||||||
|
|
||||||
.PHONY: members.xml
|
.PHONY: members.xml books.xml
|
||||||
|
|
12
csc.dtd
12
csc.dtd
|
@ -39,6 +39,17 @@
|
||||||
|
|
||||||
<!ELEMENT members-this-term EMPTY>
|
<!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 menudefs (menuitem*)>
|
||||||
<!ELEMENT menuitem EMPTY>
|
<!ELEMENT menuitem EMPTY>
|
||||||
<!ATTLIST menuitem
|
<!ATTLIST menuitem
|
||||||
|
@ -61,3 +72,4 @@
|
||||||
type CDATA "elected"
|
type CDATA "elected"
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
userid CDATA #REQUIRED>
|
userid CDATA #REQUIRED>
|
||||||
|
|
||||||
|
|
67
cscweb.xsl
67
cscweb.xsl
|
@ -34,14 +34,18 @@
|
||||||
<xsl:apply-templates />
|
<xsl:apply-templates />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="biglogo" name="menu">
|
<xsl:template match="biglogo" name="biglogo">
|
||||||
<table cellspacing="0" cellpadding="2" border="0" align="center">
|
<table cellspacing="0" cellpadding="0" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="174" rowspan="2"><img src="/logos/csc_160_70.png" alt="CSC" width="165" height="75" /></td>
|
<td width="109"><a href="http://www.uwaterloo.ca/"><img
|
||||||
<td>University of Waterloo</td>
|
src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
|
||||||
</tr>
|
width="100" height="68" align="center" border="0" /></a></td>
|
||||||
<tr>
|
<td width="174"><a href="/"><img src="/logos/csc_160_70.png"
|
||||||
<td>Computer Science Club</td>
|
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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -239,6 +243,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
<xsl:for-each select="document('members.xml')/memberlist/member">
|
<xsl:for-each select="document('members.xml')/memberlist/member">
|
||||||
<tr>
|
<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="@id"/></td>
|
||||||
<td><xsl:value-of select="@name"/></td>
|
<td><xsl:value-of select="@name"/></td>
|
||||||
<td><xsl:value-of select="@program"/></td>
|
<td><xsl:value-of select="@program"/></td>
|
||||||
|
@ -247,6 +254,52 @@
|
||||||
</table>
|
</table>
|
||||||
</xsl:template>
|
</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:template match="generate-event-files">
|
||||||
<xsl:apply-templates select="document('events.xml')/eventdefs"/>
|
<xsl:apply-templates select="document('events.xml')/eventdefs"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
@ -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}
|
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; }
|
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; }
|
td.pagetitle { font-size: large; font-weight: bold; }
|
||||||
|
th { background: #002288; color: white; }
|
|
@ -1,4 +1,4 @@
|
||||||
INPUTS = index.xml constitution.xml official.xml machine_usage.xml \
|
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
|
include ../default.mk
|
|
@ -21,9 +21,9 @@
|
||||||
generating the <a href="/events/">events pages</a>).
|
generating the <a href="/events/">events pages</a>).
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
<section title="Documentation">
|
<section title="Adding to the website">
|
||||||
<p>Soon I'll hopefully have some documentation here on how to add
|
<p>See the <a href="editing-howto.html">Editing Howto</a> for
|
||||||
content to the website and make other changes.</p>
|
information on editing the website</p>
|
||||||
</section>
|
</section>
|
||||||
<section title="Links">
|
<section title="Links">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
INPUTS = index.xml staff.xml
|
SUBDIRS = books
|
||||||
|
INPUTS = index.xml staff.xml books.xml
|
||||||
|
|
||||||
include ../default.mk
|
include ../default.mk
|
||||||
|
|
||||||
|
books.html: ../books.xml
|
||||||
|
|
|
@ -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>
|
|
@ -0,0 +1 @@
|
||||||
|
*.html
|
|
@ -0,0 +1,3 @@
|
||||||
|
INPUTS =
|
||||||
|
|
||||||
|
include ../../default.mk
|
|
@ -4,4 +4,5 @@
|
||||||
|
|
||||||
<directory title="Office">
|
<directory title="Office">
|
||||||
<diritem title="Staff" href="staff.html" />
|
<diritem title="Staff" href="staff.html" />
|
||||||
|
<diritem title="Books" href="books.html" />
|
||||||
</directory>
|
</directory>
|
||||||
|
|
Loading…
Reference in New Issue