--- /dev/null
+/* Alternative, accessible stylesheet. */
+
+body {
+ font-size: 200%;
+}
\ No newline at end of file
/* Stylesheet for COCANWIKI.
- * $Id: standard.css,v 1.15 2004/10/16 12:12:47 rich Exp $
+ * $Id: standard.css,v 1.16 2004/10/17 17:29:48 rich Exp $
*/
body {
background: #fff;
color: #000;
- font-family: arial, helvetica, sans-serif;
+ font-family: trebuchet ms, palatino, georgia, arial, helvetica, sans-serif;
margin-top: 6em;
+ line-height: 1.35em;
}
/* Headers. */
}
h2 {
- color: #003;
- background-color: #ffc;
+ color: #666;
+ border-top: 1px dashed #ddd;
padding: 6px 3px 3px 3px;
- border-top: 1px solid #eeb;
font-size: 120%;
+ margin-left: -2em;
+}
+
+h3, h4 {
+ color: #555;
+ font-size: 100%;
+ margin-left: -2em;
+}
+
+/* IE is a piece of crap. */
+* html h2, * html h3, * html h4 {
+ margin-left: 0px;
}
/* Ordinary text. */
-p {
- margin-left: 1em;
+div#content_div {
+ margin-left: 3em;
+ width: 30em;
+ min-height: 22em;
+}
+
+div#content_div p {
+ text-indent: 1em;
+}
+
+/* Don't indent the first paragraph. */
+div#content_div p.first_para {
+ text-indent: 0px;
+}
+
+/* Make <code> sections slightly larger in Gecko browsers. */
+code {
+ font-size: 1.2em;
+}
+
+* html code {
+ font-size: 1em;
+}
+
+/* Abbreviations should be in smallcaps. */
+abbr {
+ font-variant: smallcaps;
}
/* Links. */
/* Preformatted text. */
pre {
margin-left: 1em;
- background-color: #eee;
+ background-color: #fefefe;
padding: 3px;
- border: dashed 1px #ddd;
+ border: solid 1px #eee;
}
/* Images. (Try setting 'class' on an image). */
float: right;
width: 10em;
height: 22em;
- border: 1px solid #ccc;
background: #fff;
margin-left: 1em;
}
top: 6em;
width: 10em;
height: 22em;
+ line-height: 1em;
}
div#navigation_div h2 {
- font-size: 70%;
- position: relative;
- top: -1.5em;
- left: 1.5em;
- border: 1px solid #ccc;
- padding-top: 2px;
- background: #fff;
- display: inline;
+ display: none;
}
div#navigation_div h3 {
div#menu_div { display: none; }
p.edit_link { display: none; }
+ a.newpage {
+ background: none;
+ padding-right: 0px;
+ }
+
/* Display the target of external links. */
a.external {
background: none;
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: wikilib.ml,v 1.14 2004/10/15 20:11:41 rich Exp $
+ * $Id: wikilib.ml,v 1.15 2004/10/17 17:29:48 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
(*prerr_endline ("after loop = " ^ text);*)
text
-let markup_paragraph dbh hostid text =
- "<p>" ^ _markup_paragraph dbh hostid text ^ "</p>"
+let markup_paragraph ~first_para dbh hostid text =
+ let p = if first_para then "<p class=\"first_para\">" else "<p>" in
+ p ^ _markup_paragraph dbh hostid text ^ "</p>"
let markup_heading dbh hostid level text =
let text = _markup_paragraph dbh hostid text in
in
let lines = loop lines in
+ (* In the following map, first_para records whether this is the
+ * first (non-indented) paragraph. We "reset" this to true after
+ * non-paragraphs.
+ *)
+ let first_para = ref true in
+
(* Convert lines to XHTML. *)
let lines =
List.map
- (function
- | STBlank -> assert false (* Should never happen. *)
- | STParagraph para ->
- markup_paragraph dbh hostid para
- | STHeading (level, text) ->
- markup_heading dbh hostid level text
- | STUnnumbered lines ->
- markup_ul dbh hostid lines
- | STNumbered lines ->
- markup_ol dbh hostid lines
- | STPreformatted lines ->
- markup_pre lines
- | STHTML html ->
- let html' = String.concat "\n" html in
- try
- validate html';
- html'
- with
- Invalid_argument msg ->
- let msg = "Invalid HTML: " ^ msg in
- markup_pre (msg :: html)
+ (fun st ->
+ let xhtml =
+ match st with
+ | STBlank -> assert false (* Should never happen. *)
+ | STParagraph para ->
+ markup_paragraph ~first_para:!first_para dbh hostid para
+ | STHeading (level, text) ->
+ markup_heading dbh hostid level text
+ | STUnnumbered lines ->
+ markup_ul dbh hostid lines
+ | STNumbered lines ->
+ markup_ol dbh hostid lines
+ | STPreformatted lines ->
+ markup_pre lines
+ | STHTML html ->
+ let html' = String.concat "\n" html in
+ try
+ validate html';
+ html'
+ with
+ Invalid_argument msg ->
+ let msg = "Invalid HTML: " ^ msg in
+ markup_pre (msg :: html) in
+ first_para := (match st with STParagraph _ -> false | _ -> true);
+ xhtml
) lines in
(* Return the lines. *)
<title>XXX TITLE XXX</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>XXX TITLE XXX</h1>
<title>Broken links</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/broken_links.css" type="text/css" title="Standard"/>
</head><body>
<title>Change your password</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Change your password</h1>
<title>Contact form: ::name_html::</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Contact form: ::name_html::</h1>
<title>Contact forms</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Contact forms</h1>
<title>Bug!</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Bug!</h1>
<title>Create a contact form</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Create a contact form</h1>
<title>Create a user account</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/users.css" type="text/css" title="Standard"/>
</head><body>
<title>Dead end pages</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Dead end pages</h1>
<title>Delete contact forms</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Delete contact forms</h1>
<title>Delete file</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Delete file</h1>
<title>Delete image</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Delete image</h1>
<title>Delete user: ::username_html::</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/users.css" type="text/css" title="Standard"/>
</head><body>
<title>Diff</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Diff</h1>
<title>Edit contact: ::name_html::</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Edit contact: ::name_html::</h1>
<title>Edit global stylesheet</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Edit global stylesheet</h1>
<title>Edit global settings</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Edit global settings</h1>
<title>Edit stylesheet for this page</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Edit stylesheet for this page</h1>
<title>Edit page title</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Edit page title</h1>
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/editor.css" type="text/css" title="Standard"/>
</head><body>
<title>Files</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/files.css" type="text/css" title="Standard"/>
</head><body>
<meta name="description" content="Log in to this site for extra features." />
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/login.css" type="text/css" title="Standard"/>
</head><body>
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Versions of this page</h1>
<title>Global settings</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Global settings</h1>
<title>Images</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/images.css" type="text/css" title="Standard"/>
</head><body>
<title>Invitation to join</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Invitation to join</h1>
<title>Invite someone to join</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Invite someone to join</h1>
<title>Largest pages</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Largest pages</h1>
<meta name="description" content="Log in to this site for extra features." />
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/login.css" type="text/css" title="Standard"/>
</head><body>
<title>Import mail</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Import mail</h1>
<title>Join our mailing list</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Join our mailing list</h1>
<title>View or download mailing list</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>View or download mailing list</h1>
::if(has_description)::<meta name="description" content="::description_html_tag::" />::end::
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
::if(has_page_css)::<link rel="stylesheet" href="/::page_html_tag::/styles.css::if(is_old_version)::?version=::old_version::::end::" type="text/css" title="Standard"/>::end::
</head><body>
</div>
::end::
+<div id="content_div">
::table(sections)::
::if(has_divname)::<div id="::divname_html_tag::">::end::::if(can_edit)::<p class="edit_link">[<a href="/::page_html_tag::/edit#::ordering::" title="Edit this section">edit</a>]</p>::end::::if(has_sectionname)::<a name="::linkname_html_tag::"></a><h2>::sectionname_html::</h2>::end::
::content::
::if(has_divname)::</div>::end::::end::
+</div>
<ul id="topmenu" class="menu">
::if(can_edit)::
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
</head><body>
<title>Send an email when the page is updated</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Send an email when the page is updated</h1>
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Recent changes</h1>
<title>Recently visited pages</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Recently visited pages</h1>
<title>Restore page</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Restore page</h1>
<title>Send feedback about this page</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Send feedback about this page</h1>
<title>Set password for this user</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/users.css" type="text/css" title="Standard"/>
</head><body>
<title>Sitemap</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Sitemap</h1>
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head>
<frameset rows="10%, 90%">
<frame src="/_bin/stats_top.cmo?page=::page_url::" name="top_frame"/>
<meta name="robots" content="noindex,nofollow"/>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<ul class="menu">
<title>Restore file</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Restore file</h1>
<title>Restore image</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>Restore image</h1>
<title>Upload file</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/create.css" type="text/css" title="Standard"/>
</head><body>
<title>Upload image</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/create.css" type="text/css" title="Standard"/>
</head><body>
<title>Users</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
<link rel="stylesheet" href="/_css/users.css" type="text/css" title="Standard"/>
</head><body>
<title>What links to ::title_html::</title>
<meta name="author" content="http://www.merjis.com/" />
<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
</head><body>
<h1>What links to ::title_html::</h1>