Page layout

The page (body) structure is:

The header (including navigational material) and the footer are generated automatically; see below for details. The actual page source contains a few lines of boilerplate definitions and inclusions at the top, and an inclusion at the bottom; the rest is real contents. See for example the raw source for this page.

Here is a diagram of the basic page layout, with the names of the sections annotated.

[diagram of page layout]

Page appearance (CSS)

As you can see above, the page is divided into named sections; their appearance is controlled using a CSS stylesheet. Stylesheet tricks with different-coloured fixed-attachment images are used to fake transparency; for details on this technique, read the comments at the top of the main stylesheet.

The actual stylesheets themselves are generated with PHP to facilitate the maintenance of consistent colour schemes, especially as the need for more "fixed backgrounds" multiplies. To see the raw code for the stylesheets and their support functions, read these files:

Page headers, footers, and navigation

Headers and footers are of course just PHP includes, and the left-hand "navigation bar" is itself an include from the header. The navigation menu (including as many levels of submenus as one can fit before they become illegible!) is generated on the fly with PHP code that reads files called "NAVIGATION.php" in each relevant directory. A small bit of CSS cuteness makes each "div class=sublinks" a bit smaller than its parent, thus indenting the submenus:

  div#links div.sublinks {
    position:                     relative;
    left:                         10%;
    width:                        90%;
  }

You can read the header and footer include files, as well as the (rather complex!) code for generating the navigation menus:

The reason the navigation code is so complex is that some levels may contain links to material at a lower level (e.g., "shortcut" links at the top level for frequently-used material), which makes the concept of the "current page" and the "path to the current page" a bit tricky. But hey, it works.