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 83c1842..290f04b 100644 --- a/src/doc/html_templates/html_templates.nit +++ b/src/doc/html_templates/html_templates.nit @@ -16,6 +16,14 @@ module html_templates import html_model +import html::bootstrap +import doc_phases::doc_structure +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 @@ -31,14 +39,10 @@ redef class DocPage var body_attrs = new Array[TagAttribute] # Top menu template if any. - var topmenu: TplTopMenu is writable, noinit + var topmenu: DocTopMenu is writable, noinit # Sidebar template if any. - var sidebar: nullable TplSidebar = null is writable - - # Content of the page in form a TplSection. - # TODO remove when other templates are migrated. - var sections = new Array[TplSection] + var sidebar: nullable DocSideBar = null is writable # Footer content if any. var footer: nullable Writable = null is writable @@ -46,12 +50,6 @@ redef class DocPage # JS scripts to append at the end of the body var scripts = new Array[TplScript] - # Adds a section to this page. - # TODO remove when other templates are migrated. - fun add_section(section: TplSection) do - sections.add section - end - # Renders the html ``. private fun render_head do var css = (self.shareurl / "css").html_escape @@ -74,30 +72,9 @@ redef class DocPage addn ">" end - # Renders the topmenu template. - private fun render_topmenu do - addn "
" - add topmenu - addn "
" - end - - # Renders the sidebar template. - # - # Sidebar is automatically populated with a summary of all sections - # TODO remove summary generation when other templates are migrated. - private fun render_sidebar do - if sidebar == null then return - var summary = new TplSummary.with_order(0) - for section in sections do - section.render_summary summary - end - sidebar.boxes.add summary - add sidebar.as(not null) - end - # Renders the footer and content. private fun render_content do - for section in sections do add section + add root if footer != null then addn "