Added more stuff to the editing howto. Added content for office/.

This commit is contained in:
Stefanus Du Toit 2002-04-26 18:09:50 +00:00
parent 7b24f4bf69
commit a5a69130ed
13 changed files with 230 additions and 4 deletions

View File

@ -1,3 +1,4 @@
SUBDIRS = editing-example1 editing-example2 editing-example3
INPUTS = index.xml constitution.xml official.xml machine_usage.xml \
machine_usage_summary.xml website.xml editing-howto.xml

3
docs/editing-example1/Makefile Executable file
View File

@ -0,0 +1,3 @@
INPUTS = operating-systems.xml
include ../../default.mk

View File

@ -0,0 +1,8 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../../csc.dtd">
<directory title="Office">
<diritem title="Staff" href="staff.html" />
<diritem title="Books" href="books.html" />
</directory>

View File

@ -0,0 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../../csc.dtd">
<cscpage title="Operating Systems the CSC distributes">
<header/>
<footer/>
</cscpage>

3
docs/editing-example2/Makefile Executable file
View File

@ -0,0 +1,3 @@
INPUTS = operating-systems.xml
include ../../default.mk

View File

@ -0,0 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../../csc.dtd">
<directory title="Office">
<diritem title="Staff" href="staff.html" />
<diritem title="Books" href="books.html" />
<diritem title="Operating Systems" href="operating-systems.html" />
</directory>

View File

@ -0,0 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../../csc.dtd">
<cscpage title="Operating Systems the CSC distributes">
<header/>
<footer/>
</cscpage>

3
docs/editing-example3/Makefile Executable file
View File

@ -0,0 +1,3 @@
INPUTS = operating-systems.xml
include ../../default.mk

View File

@ -0,0 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../../csc.dtd">
<directory title="Office">
<diritem title="Staff" href="staff.html" />
<diritem title="Books" href="books.html" />
<diritem title="Operating Systems" href="operating-systems.html" />
</directory>

View File

@ -0,0 +1,13 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../../csc.dtd">
<cscpage title="Operating Systems the CSC distributes">
<header/>
<section title="List of operating systems">
<ul>
<li><a href="http://www.debian.org/">Debian GNU/Linux</a></li>
<li><a href="http://www.freebsd.org/">FreeBSD</a></li>
</ul>
<p>More operating systems may be available.</p>
</section>
<footer/>
</cscpage>

View File

@ -47,5 +47,144 @@
you will have to recompile the website in the same manner.
</p>
</section>
<section title="Adding a regular page">
<p>
Let's now suppose we want to add a page detailing what operating
systems the CSC distributes through its CD-burning. First, we go
to the appropriate directory, in this case probably
<code>www/office</code>. Here we now open a new file called
<code>operating-systems.xml</code> in our favourite text editor
(emacs, of course). Take note that the filename ends in
<code>.xml</code>. All CSC web pages should have this file
ending.
</p>
<p>
The next thing to do is to add a few standard XML things to the
file. We add the two lines:
</p>
<code>
&lt;xml version='1.0'&gt;<br />
&lt;!DOCTYPE cscpage SYSTEM &quot;../csc.dtd&quot;&gt;
</code>
<p>
Note the reference to the file <code>../csc.dtd</code>. This
file is located in the <code>www/</code> directory, which is the
parent directory of <code>www/office/</code>, therefore we use
<code>../</code>. These two lines should appear at the top of
every CSC web page.
</p>
<p>
Next we start the actual page. To begin, we open a
<code>cscpage</code> tag with the title attribute set to the
title of our page. We also want to add a header with the CSC
logo, the current section directory and the title of the
page. Don't worry though, as you'll see this is really easy. Add
the following two lines to the end of the page:
</p>
<code>
&lt;cscpage title=&quot;Operating Systems the CSC
distributes&quot;&gt;<br />
&lt;header /&gt;
</code>
<p>
That's it! So we can see what our page looks like so far, we
also add the footer (with the menu, generation date, and
copyright information) and we close the <code>cscpage</code>
tag. Add the following lines to the end:
</p>
<code>
&lt;footer /&gt;<br />
&lt;/cscpage&gt;
</code>
<p>
Notice how in the case of <code>header</code> and
<code>footer</code> we have a <code>/</code> before the
<code>&gt;</code>? This is one of the major differences between
HTML and XML: tags that don't really have an end tag, such as
<code>&lt;br&gt;</code> have to be specified as being
<i>empty</i> in XML by adding a <code>/</code> before the
<code>&gt;</code>. This is particularily important to remember
when you add XHTML (XML's version of HTML) to the page.
</p>
<p>
Now we want to see what the resulting HTML page looks like. But
first we have to tell <code>make</code> about our new page. To
do so, open up the file <code>www/office/Makefile</code>, find
the line beginning with <code>INPUTS = </code> and simply add
<code>operating-systems.xml</code> to the end of that line. So
the line might look like <code>INPUTS = index.html staff.xml
books.xml operating-systems.xml</code>. Save
<code>Makefile</code> and close it. Now, in the
<code>www/</code> directory, type <code>make</code>. This will
build the whole website, (hopefully!) including our little
document. Once <code>make</code> is done, have a look at the
resulting file,
<code>www/office/operating-systems.html</code>. It should look
like <a href="editing-example1/operating-systems.html">example
1</a> (use your browsers Back button to return to this page
after viewing the example).
</p>
<p>
Looking at the generated page, you may have noticed that it does
not yet appear in the menu at the top of the page. Opening up
the special file <code>www/office/directory.xml</code> you will
see several entries, each corresponding to one of the menu
items. After the last line beginning with
<code>&lt;diritem</code>, add in the following line:
</p>
<code>
&lt;diritem title=&quot;"Operating Systems&quot;
href=&quot;operating-systems.html&quot; /&gt;
</code>
<p>
Now recompile the site with <code>make</code>. You should see
that the page now looks something like <a
href="editing-example2/operating-systems.html">example
2</a>. Also note that all the other office pages will now have a
reference to the new operating systems page.
</p>
<p>
With that out of the way, it's time to add some content. You may
be happy to hear that you can add regular (X)HTML to any CSC web
page. So, we'll add the following content between the
<code>&lt;header /&gt;</code> and <code>&lt;footer /&gt;</code>
of the page:
</p>
<code>
&lt;section title=&quot;List of operating systems&quot;&gt;<br/>
&lt;ul&gt;<br/>
&lt;li&gt;&lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian GNU/Linux&lt;/a&gt;&lt;/li&gt;<br/>
&lt;li&gt;&lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt;&lt;/li&gt;<br/>
&lt;/ul&gt;<br/>
&lt;p&gt;More operating systems may be available.&lt;/p&gt;<br/>
&lt;/section&gt;<br/>
</code>
<p>
As usual, compile your changes using <code>make</code> and have
a look. The resulting file should look something like <a
href="editing-example3/operating-systems.html">example 3</a>. A
few things to keep in mind are:
</p>
<ul>
<li>
Always use lower-case in your XHTML tags. XML is
case-sensitive. For example: <code>&lt;br/&gt;</code> is good
whereas <code>&lt;BR/&gt;</code> is bad.
</li>
<li>
Always close your tags. If it's a tag that never encloses
anything use the <code>&lt;tag/&gt;</code> syntax. For
example: <code>&lt;ul&gt; &lt;li&gt;Item
1&lt;br/&gt;Linebreak&lt;/li&gt; &lt;li&gt;Item
2&lt;/li&gt;&lt;/ul&gt;</code> is good, whereas
<code>&lt;ul&gt; &lt;li&gt;Item
1&lt;br&gt;Linebreak &lt;li&gt;Item 2&lt;/ul&gt;</code> is bad.
</li>
<li>
You must place HTML code inside <code>&lt;section&gt;</code>
tags. You can have as many section as you want on the page.
</li>
</ul>
</section>
<footer />
</cscpage>

View File

@ -6,7 +6,32 @@
<header />
<section title="About the office">
<p>
To be added...
The CSC Office is located at room MC3036/3037, in the Math &amp;
Computer Building of the University of Waterloo. The office is open
whenever <a href="staff.html">office staff</a> are around to keep it
open, which basically means it is open most of the time. At the
office we have <a href="books.html">lots of books</a>, a couple of
computer terminals, and most of the time an array of knowledgeable
people to talk to and ask questions.
</p>
<p>
One of our most popular services at the office is providing anybody
with CD copies of Free Software and Open Source operating system
distributions (including, but by no means limited to, Debian
GNU/Linux, Mandrake Linux, Red Hat Linux, FreeBSD and NetBSD for
various architectures). The cost is $1.50 per CD at the time of
this writing, or <b>free</b> if you provide your own CDs.
</p>
<p>
Another favourite is our $0.50 pop for members. We have a fridge in
the office which is at most times stocked with many different kinds
of pop cans.
</p>
<p>
We can always use good <a href="staff.html">office staff</a>, so if
you're interested in helping out, just come by the office and chat
to somebody there, and the office manager will probably give you
something to do.
</p>
</section>

View File

@ -9,15 +9,16 @@
The CSC office staff have the following responsibilities:
</p>
<ul>
<li>Keep the office open as much as possible</li>
<li>Keep the office clean at all times, through weekly cleaning and
consistent removal of garbage</li>
<li>Take care of adding new members, updating memberships and any
other membership-related tasks through the use of CEO (CSC
Electronic Office)</li>
<li><i>TODO: More to be added...</i></li>
<li>Burn our free operating system CDs</li>
<li>Answer questions</li>
<li>Make sure the fridge is always full of pop</li>
</ul>
</section>
<section title="The Winter 2002 Office Staff">
</section>
<footer />
</cscpage>