# HG changeset patch # User Rob Hoes # Date 1257330033 0 # Node ID 024f541bfe08116a6291e1bc97bf3de0985734dc # Parent 15f16d50983d82ec15ca52153d85cdf0b03dcfa0 [ocamldoc] Layout improvements and parameter lists for functions Signed-off-by: Rob Hoes diff -r 15f16d50983d -r 024f541bfe08 ocaml/doc/ocamldoc.js --- a/ocaml/doc/ocamldoc.js Wed Nov 04 10:20:33 2009 +0000 +++ b/ocaml/doc/ocamldoc.js Wed Nov 04 10:20:33 2009 +0000 @@ -116,16 +116,33 @@ html += ''; html += '
' + name + '
'; if (v.info.deprecated != undefined) { - html += '
!! deprecated ' + v.info.deprecated + ' !!
'; + html += '
Deprecated ' + v.info.deprecated + '
'; } + + html += '
'; + if (v.info.description != undefined) + html += v.info.description + '
'; + else + html += 'to be completed!'; + + html += ''; + html += ''; + + html += ''; + + if (v.params.length > 0) + html += ''; + + html += '
Type:' + v.type + '
'; + html += ''; append_content(html); } @@ -138,17 +155,17 @@ html = '
'; html += ''; html += '
' + name + '
'; - html += ''; + html += '
'; + if (v.info.description != undefined) + html += v.info.description + '
'; + else + html += 'to be completed!'; + html += '
'; html += ''; else html += '[none]'; - html += ''; - else - html += 'to be completed!'; html += '
Arguments:'; if (v.exception_args != undefined) html += v.exception_args + '
Description:'; - if (v.info.description != undefined) - html += v.info.description + '
'; html += '
'; append_content(html); @@ -158,7 +175,7 @@ { cons = v.constructors; html = ''; - html += ''; + html += '
'; html += ''; for (c in cons) { html += '' @@ -176,7 +193,7 @@ function record(v) { fields = v.fields; - html = '
ConstructorTypeDescription
' + cons[c].name + '
'; + html = '
'; html += ''; for (c in fields) { html += '' @@ -244,15 +261,16 @@ html = '
'; html += ''; - html += '
' + name + ' (details)
'; - html += '
FieldTypeDescription
' + fields[c].name + '
'; + html += '
' + name + '
'; + html += '
'; + if (v.info.description != undefined) + html += v.info.description + '
'; + else + html += 'to be completed!'; + html += '
'; html += ''; - html += ''; - else - html += 'to be completed!'; + + html += ''; html += '
Type:' + v.type + '
Description:'; - if (v.info.description != undefined) - html += v.info.description + '
'; html += ''; append_content(html); diff -r 15f16d50983d -r 024f541bfe08 ocaml/doc/style.css --- a/ocaml/doc/style.css Wed Nov 04 10:20:33 2009 +0000 +++ b/ocaml/doc/style.css Wed Nov 04 10:20:33 2009 +0000 @@ -203,8 +203,11 @@ } .deprecated { - color: red; - padding: .5em 3em .7em; + margin: .5em 5em .7em; + padding: 5px; + border: 1px solid grey; + text-align: center; + background-color: orange; } .field, .field2 @@ -235,8 +238,12 @@ margin: .7em 0; } -.field table, .field2 table { - margin-left: 3em; - width: 90%; +.field-table { +// margin-left: 3em; +// width: 90%; } +.small-button { + font-size: 70%; + text-align: right; +}