/[svn]/web/site.cd
ViewVC logotype

Diff of /web/site.cd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 380 by abate, Tue Jul 10 17:29:11 2007 UTC revision 381 by abate, Tue Jul 10 17:30:23 2007 UTC
# Line 17  Line 17 
17    
18  (** Input types **)  (** Input types **)
19    
20  type Page =  <page name=String>[ <title>String <banner>[InlineText*] Item* ];;  type Page =  <page name=String>[ <title>String <banner>[InlineText*]? Item* ];;
21  type External = <external {|href=String; title=String; name=String |}>[];;  type External = <external {|href=String; title=String; name=String |}>[];;
22    
23  type Item =  type Item =
# Line 77  Line 77 
77  let fun highlight (String -> [ (Char | Xvar | Xi)* ] )  let fun highlight (String -> [ (Char | Xvar | Xi)* ] )
78   | [ '{{' h ::(Char *?) '}}' ; rest ] ->   | [ '{{' h ::(Char *?) '}}' ; rest ] ->
79            [ <var class="highlight">h; highlight rest ]            [ <var class="highlight">h; highlight rest ]
80   | [ '{/{' h ::(Char *?) '}}' ; rest ] ->   | [ '%%' h ::(Char *?) '%%' ; rest ] ->
81            [ <i>h; highlight rest ]            [ <i>h; highlight rest ]
82   | [ c; rest ] -> [ c; highlight rest ]   | [ c; rest ] -> [ c; highlight rest ]
83   | [] -> [];;   | [] -> [];;
# Line 170  Line 170 
170  let fun gen_page (prev : Page|[], page : Page, next : Page|[],  let fun gen_page (prev : Page|[], page : Page, next : Page|[],
171                    path : Path, sitemap : Tree) : [] =                    path : Path, sitemap : Tree) : [] =
172  match page with  match page with
173  <page name=name>[ <title>title <banner>banner ; items ] ->  <page name=name>[
174            <title>title <banner>banner | <title>(title & banner); items ] ->
175    
176   let fun text (t : [InlineText*]) : Inlines =   let fun text (t : [InlineText*]) : Inlines =
177    map t with    map t with
# Line 242  Line 243 
243   let navig : Flow = transform items with   let navig : Flow = transform items with
244    | <left>c -> [<div class="box">(content c)]    | <left>c -> [<div class="box">(content c)]
245   in   in
246     let navig = match navig with
247      | [] -> [<div class="box">(content [<boxes-toc>[]])]
248      | n -> n in
249   let dpath : Inlines = transform path with   let dpath : Inlines = transform path with
250    | { url = f; title = t } -> [ <a href=f>t ' :: ']    | { url = f; title = t } -> [ <a href=f>t ' :: ']
251   in   in
# Line 272  Line 276 
276     [ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'     [ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
277       '  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'       '  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
278       !(patch_css (print_xml html)) ] in       !(patch_css (print_xml html)) ] in
279   dump_to_file (name @ (if php then ".html.php" else ".html")) txt;;   dump_to_file ("www/" @ name @ (if php then ".html.php" else ".html")) txt;;
280    
281  let fun gen_page_seq  let fun gen_page_seq
282   (prev : Page|[], pages : [Page*], next : Page|[],   (prev : Page|[], pages : [Page*], next : Page|[],

Legend:
Removed from v.380  
changed lines
  Added in v.381

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5