X-Git-Url: http://nitlanguage.org diff --git a/src/doc/html_templates/html_templates.nit b/src/doc/html_templates/html_templates.nit index ecff87f..290f04b 100644 --- a/src/doc/html_templates/html_templates.nit +++ b/src/doc/html_templates/html_templates.nit @@ -22,6 +22,8 @@ import doc_phases::doc_hierarchies import doc_phases::doc_graphs import doc_phases::doc_intros_redefs import doc_phases::doc_lin +import doc_phases::doc_readme +intrude import doc_down # Renders the page as HTML. redef class DocPage @@ -265,7 +267,6 @@ redef class DocComposite if html_title != null then var header = new Header(hlvl, html_title.write_to_string) header.css_classes.add "signature" - if hlvl == 2 then header.css_classes.add "well well-sm" addn header end if html_subtitle != null then @@ -447,7 +448,10 @@ redef class IntroArticle redef fun render_body do var tabs = new DocTabs("{html_id}.tabs", "") - var comment = mentity.html_comment + var comment = mentity.html_documentation + if mentity isa MPackage then + comment = mentity.html_synopsis + end if comment != null then tabs.add_panel new DocTabPanel("{html_tab_id}-comment", "Comment", comment) end @@ -502,10 +506,10 @@ redef class DefinitionArticle var tabs = new DocTabs("{html_id}.tabs", "") if not is_no_body then var comment - if is_short_comment then - comment = mentity.html_short_comment + if is_short_comment or mentity isa MPackage then + comment = mentity.html_synopsis else - comment = mentity.html_comment + comment = mentity.html_documentation end if comment != null then tabs.add_panel new DocTabPanel("{html_tab_id}-comment", "Comment", comment) @@ -543,7 +547,7 @@ redef class DefinitionLinArticle if not mentity isa MPropDef then continue # TODO handle all mentities var tpl = new Template tpl.add mentity.mclassdef.html_namespace - var comment = mentity.mclassdef.html_short_comment + var comment = mentity.mclassdef.html_synopsis if comment != null then tpl.add ": " tpl.add comment @@ -559,16 +563,61 @@ end redef class GraphArticle redef var html_title = null - # HTML map used to display link. + # Graph in SVG with clickable map. # # This attribute is set by the `doc_render` phase who knows the context. - var map: String is noinit, writable + var svg: nullable String = null is writable redef fun render_body do addn "