X-Git-Url: http://nitlanguage.org diff --git a/src/nitcatalog.nit b/src/nitcatalog.nit index 3ff0da9..9dd3351 100644 --- a/src/nitcatalog.nit +++ b/src/nitcatalog.nit @@ -22,9 +22,10 @@ module nitcatalog import loader # Scan&load packages, groups and modules -import doc::doc_down # Display mdoc import catalog +import doc::templates::html_model + # A HTML page in a catalog # # This is just a template with the header pre-filled and the footer injected at rendering. @@ -187,7 +188,7 @@ redef class Catalog do # Register `self` to the global NitdocDecorator # FIXME this is ugly. But no better idea at the moment. - modelbuilder.model.nitdoc_md_processor.emitter.decorator.as(NitdocDecorator).catalog = self + modelbuilder.model.nitdoc_md_processor.decorator.as(NitdocDecorator).catalog = self end # The output directory where to generate pages @@ -232,12 +233,19 @@ redef class Catalog var name = mpackage.name.html_escape res.more_head.add """{{{name}}}""" - res.add """ -
-

{{{name}}}

-""" + res.add """
""" + var mdoc = mpackage.mdoc_or_fallback - if mdoc != null then res.add mdoc.html_documentation + if mdoc == null then + res.add """

{{{name}}}

""" + else + res.add """ +
+

{{{name}}} - 

+
+""" + res.add mdoc.html_documentation + end res.add "

Content

" var ot = new OrderedTree[MConcern] @@ -260,12 +268,12 @@ redef class Catalog