X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/c2ce01bde477e5b32bd287ca34beecc8d490e7e7..7d5aaf7b68b781459a7cd9d0abf493b5bcab30e6:/src/autodoc.sml diff --git a/src/autodoc.sml b/src/autodoc.sml index 71ff33d..87134e4 100644 --- a/src/autodoc.sml +++ b/src/autodoc.sml @@ -77,15 +77,14 @@ fun autodoc {outdir, infiles} = TextIO.output (outf, desc); TextIO.output (outf, "

\n"))) desc*) - val body = Hn {n = 1, - align = NONE, - content = PCDATA title} - val body = case desc of - NONE => body - | SOME desc => BlockList [body, - P {align = NONE, - content = PCDATA desc}] + NONE => BlockList [] + | SOME desc => P {align = NONE, + content = PCDATA desc} + + val body = BlockList [body, + TextBlock (BR {clear = SOME TextFlowCtl.all})] + val summaries = foldr (fn ((d, desc, _), summaries) => HtmlPrint.output (p_decl_fref (annotate_decl d)) @@ -119,14 +118,21 @@ fun autodoc {outdir, infiles} = :: entries) val html = HTML {version = NONE, - head = [Head_TITLE title], + head = [Head_TITLE title, + Head_LINK {id = NONE, + href = SOME Config.Autodoc.stylesheet, + rel = SOME "stylesheet", + rev = NONE, + title = NONE}], body = BODY {background = NONE, bgcolor = NONE, text = NONE, link = NONE, vlink = NONE, alink = NONE, - content = body}} + content = BlockList[TextBlock (PCDATA (Config.Autodoc.htmlHeader title)), + body, + TextBlock (PCDATA Config.Autodoc.htmlFooter)]}} in PrHTML.prHTML {putc = (fn ch => TextIO.output1 (outf, ch)), puts = (fn s => TextIO.output (outf, s))} html; @@ -150,16 +156,24 @@ fun autodoc {outdir, infiles} = end) infiles val index = HTML {version = NONE, - head = [Head_TITLE title], + head = [Head_TITLE title, + Head_LINK {id = NONE, + href = SOME Config.Autodoc.stylesheet, + rel = SOME "stylesheet", + rev = NONE, + title = NONE}], body = BODY {background = NONE, bgcolor = NONE, text = NONE, link = NONE, vlink = NONE, alink = NONE, - content = UL {ty = NONE, - compact = false, - content = items}}} + content = BlockList[TextBlock (PCDATA (Config.Autodoc.htmlHeader title)), + TextBlock (BR {clear = SOME TextFlowCtl.all}), + UL {ty = NONE, + compact = false, + content = items}, + TextBlock (PCDATA Config.Autodoc.htmlFooter)]}} val outf = TextIO.openOut (outdir ^ "/index.html") in