From: rich Date: Sun, 17 Oct 2004 17:29:48 +0000 (+0000) Subject: New, cleaner stylesheet: X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=aec0096a00df1b58b7a057618ad9f3baab7c846c;p=cocanwiki.git New, cleaner stylesheet: * Added div#content_div around the main content of each page, making it easier to style that content as a whole. * New standard stylesheet. * Indented paragraphs, except for the first paragraph after a heading or a list. * Added high contrast, 200% font alternate stylesheet on every page. * Checked easy web marketing style (easyweb.css) still works. * Checked execellence style still works. * Checked Judy's style still works. * Tested all the above on IE 6. --- diff --git a/html/_css/easytoread.css b/html/_css/easytoread.css new file mode 100644 index 0000000..c1d3b9b --- /dev/null +++ b/html/_css/easytoread.css @@ -0,0 +1,5 @@ +/* Alternative, accessible stylesheet. */ + +body { + font-size: 200%; +} \ No newline at end of file diff --git a/html/_css/standard.css b/html/_css/standard.css index dad0159..b68bcfa 100644 --- a/html/_css/standard.css +++ b/html/_css/standard.css @@ -1,12 +1,13 @@ /* 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. */ @@ -22,16 +23,52 @@ h1 { } 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 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. */ @@ -66,9 +103,9 @@ a.file_not_found { /* 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). */ @@ -289,7 +326,6 @@ div#navigation_space_div { float: right; width: 10em; height: 22em; - border: 1px solid #ccc; background: #fff; margin-left: 1em; } @@ -300,17 +336,11 @@ div#navigation_div { 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 { @@ -505,6 +535,11 @@ table.cal_day a.cal_day_right { 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; diff --git a/scripts/wikilib.ml b/scripts/wikilib.ml index e2a04fb..58ba0e5 100644 --- a/scripts/wikilib.ml +++ b/scripts/wikilib.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * 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 @@ -389,8 +389,9 @@ let _markup_paragraph dbh hostid text = (*prerr_endline ("after loop = " ^ text);*) text -let markup_paragraph dbh hostid text = - "

" ^ _markup_paragraph dbh hostid text ^ "

" +let markup_paragraph ~first_para dbh hostid text = + let p = if first_para then "

" else "

" in + p ^ _markup_paragraph dbh hostid text ^ "

" let markup_heading dbh hostid level text = let text = _markup_paragraph dbh hostid text in @@ -717,30 +718,40 @@ let xhtml_of_content (dbh : Dbi.connection) hostid text = 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. *) diff --git a/templates/00-TEMPLATE.html b/templates/00-TEMPLATE.html index 3e0cbb3..e5afac0 100644 --- a/templates/00-TEMPLATE.html +++ b/templates/00-TEMPLATE.html @@ -4,6 +4,7 @@ XXX TITLE XXX +

XXX TITLE XXX

diff --git a/templates/broken_links.html b/templates/broken_links.html index 71d09cd..fca580d 100644 --- a/templates/broken_links.html +++ b/templates/broken_links.html @@ -4,6 +4,7 @@ Broken links + diff --git a/templates/change_password_form.html b/templates/change_password_form.html index d730b49..8764091 100644 --- a/templates/change_password_form.html +++ b/templates/change_password_form.html @@ -4,6 +4,7 @@ Change your password +

Change your password

diff --git a/templates/contact_show.html b/templates/contact_show.html index 4c922bf..5abee47 100644 --- a/templates/contact_show.html +++ b/templates/contact_show.html @@ -4,6 +4,7 @@ Contact form: ::name_html:: +

Contact form: ::name_html::

diff --git a/templates/contacts.html b/templates/contacts.html index c49393c..5d45fa3 100644 --- a/templates/contacts.html +++ b/templates/contacts.html @@ -4,6 +4,7 @@ Contact forms +

Contact forms

diff --git a/templates/crash.html b/templates/crash.html index 044a178..1f142a4 100644 --- a/templates/crash.html +++ b/templates/crash.html @@ -4,6 +4,7 @@ Bug! +

Bug!

diff --git a/templates/create_contact_form.html b/templates/create_contact_form.html index 55bfc0c..9aaace5 100644 --- a/templates/create_contact_form.html +++ b/templates/create_contact_form.html @@ -4,6 +4,7 @@ Create a contact form +

Create a contact form

diff --git a/templates/create_user_form.html b/templates/create_user_form.html index 70b360a..832af25 100644 --- a/templates/create_user_form.html +++ b/templates/create_user_form.html @@ -4,6 +4,7 @@ Create a user account + diff --git a/templates/dead_ends.html b/templates/dead_ends.html index c5296d6..978369c 100644 --- a/templates/dead_ends.html +++ b/templates/dead_ends.html @@ -4,6 +4,7 @@ Dead end pages +

Dead end pages

diff --git a/templates/delete_contact_form.html b/templates/delete_contact_form.html index ce31227..9480e1b 100644 --- a/templates/delete_contact_form.html +++ b/templates/delete_contact_form.html @@ -4,6 +4,7 @@ Delete contact forms +

Delete contact forms

diff --git a/templates/delete_file_form.html b/templates/delete_file_form.html index b4dc213..2bcbd44 100644 --- a/templates/delete_file_form.html +++ b/templates/delete_file_form.html @@ -4,6 +4,7 @@ Delete file +

Delete file

diff --git a/templates/delete_image_form.html b/templates/delete_image_form.html index 48b73c5..623e5ca 100644 --- a/templates/delete_image_form.html +++ b/templates/delete_image_form.html @@ -4,6 +4,7 @@ Delete image +

Delete image

diff --git a/templates/delete_user_form.html b/templates/delete_user_form.html index 0f6f6e6..410d951 100644 --- a/templates/delete_user_form.html +++ b/templates/delete_user_form.html @@ -4,6 +4,7 @@ Delete user: ::username_html:: + diff --git a/templates/diff.html b/templates/diff.html index cd45690..fbcc660 100644 --- a/templates/diff.html +++ b/templates/diff.html @@ -4,6 +4,7 @@ Diff +

Diff

diff --git a/templates/edit_contact_form.html b/templates/edit_contact_form.html index faafeae..f8ad245 100644 --- a/templates/edit_contact_form.html +++ b/templates/edit_contact_form.html @@ -4,6 +4,7 @@ Edit contact: ::name_html:: +

Edit contact: ::name_html::

diff --git a/templates/edit_host_css_form.html b/templates/edit_host_css_form.html index 533ffd9..a3bed92 100644 --- a/templates/edit_host_css_form.html +++ b/templates/edit_host_css_form.html @@ -4,6 +4,7 @@ Edit global stylesheet +

Edit global stylesheet

diff --git a/templates/edit_host_settings_form.html b/templates/edit_host_settings_form.html index 7911959..77e2419 100644 --- a/templates/edit_host_settings_form.html +++ b/templates/edit_host_settings_form.html @@ -4,6 +4,7 @@ Edit global settings +

Edit global settings

diff --git a/templates/edit_page_css_form.html b/templates/edit_page_css_form.html index d55ee3d..3876763 100644 --- a/templates/edit_page_css_form.html +++ b/templates/edit_page_css_form.html @@ -4,6 +4,7 @@ Edit stylesheet for this page +

Edit stylesheet for this page

diff --git a/templates/edit_page_title_form.html b/templates/edit_page_title_form.html index bd66469..5546378 100644 --- a/templates/edit_page_title_form.html +++ b/templates/edit_page_title_form.html @@ -4,6 +4,7 @@ Edit page title +

Edit page title

diff --git a/templates/edit_sitemenu.html b/templates/edit_sitemenu.html index 9b9980d..e1dc85f 100644 --- a/templates/edit_sitemenu.html +++ b/templates/edit_sitemenu.html @@ -5,6 +5,7 @@ + diff --git a/templates/files.html b/templates/files.html index 5c9bed2..0e95564 100644 --- a/templates/files.html +++ b/templates/files.html @@ -4,6 +4,7 @@ Files + diff --git a/templates/forgot_password_form.html b/templates/forgot_password_form.html index 2cc6aed..1f0c4de 100644 --- a/templates/forgot_password_form.html +++ b/templates/forgot_password_form.html @@ -5,6 +5,7 @@ + diff --git a/templates/history.html b/templates/history.html index b41e5e9..1bbd920 100644 --- a/templates/history.html +++ b/templates/history.html @@ -5,6 +5,7 @@ +

Versions of this page

diff --git a/templates/host_menu.html b/templates/host_menu.html index 00bcfc0..1af60b4 100644 --- a/templates/host_menu.html +++ b/templates/host_menu.html @@ -4,6 +4,7 @@ Global settings +

Global settings

diff --git a/templates/images.html b/templates/images.html index 4a73931..4df5cb4 100644 --- a/templates/images.html +++ b/templates/images.html @@ -4,6 +4,7 @@ Images + diff --git a/templates/invite_user_confirm_form.html b/templates/invite_user_confirm_form.html index 57d1618..0149fc1 100644 --- a/templates/invite_user_confirm_form.html +++ b/templates/invite_user_confirm_form.html @@ -4,6 +4,7 @@ Invitation to join +

Invitation to join

diff --git a/templates/invite_user_form.html b/templates/invite_user_form.html index 5196e1f..93e2ab3 100644 --- a/templates/invite_user_form.html +++ b/templates/invite_user_form.html @@ -4,6 +4,7 @@ Invite someone to join +

Invite someone to join

diff --git a/templates/largest_pages.html b/templates/largest_pages.html index c25ba87..8694924 100644 --- a/templates/largest_pages.html +++ b/templates/largest_pages.html @@ -4,6 +4,7 @@ Largest pages +

Largest pages

diff --git a/templates/login_form.html b/templates/login_form.html index feba451..91b6df4 100644 --- a/templates/login_form.html +++ b/templates/login_form.html @@ -5,6 +5,7 @@ + diff --git a/templates/mail_import_form.html b/templates/mail_import_form.html index e98db46..5432b9e 100644 --- a/templates/mail_import_form.html +++ b/templates/mail_import_form.html @@ -4,6 +4,7 @@ Import mail +

Import mail

diff --git a/templates/mailing_list_form.html b/templates/mailing_list_form.html index 807570d..0656236 100644 --- a/templates/mailing_list_form.html +++ b/templates/mailing_list_form.html @@ -4,6 +4,7 @@ Join our mailing list +

Join our mailing list

diff --git a/templates/mailing_list_view.html b/templates/mailing_list_view.html index 4d963b3..5670ea7 100644 --- a/templates/mailing_list_view.html +++ b/templates/mailing_list_view.html @@ -4,6 +4,7 @@ View or download mailing list +

View or download mailing list

diff --git a/templates/page.html b/templates/page.html index 1fcea3f..7ecd188 100644 --- a/templates/page.html +++ b/templates/page.html @@ -6,6 +6,7 @@ ::if(has_description)::::end:: + ::if(has_host_css)::::end:: ::if(has_page_css)::::end:: @@ -32,10 +33,12 @@ ::end:: +
::table(sections):: ::if(has_divname)::
::end::::if(can_edit)::::end::::if(has_sectionname)::

::sectionname_html::

::end:: ::content:: ::if(has_divname)::
::end::::end:: +