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 ab019c8..290f04b 100644 --- a/src/doc/html_templates/html_templates.nit +++ b/src/doc/html_templates/html_templates.nit @@ -16,3 +16,608 @@ 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 + super Template + + # Page url. + var html_url: String is writable, noinit + + # Directory where css, js and other assets can be found. + var shareurl: String is writable, noinit + + # Attributes of the body tag element. + var body_attrs = new Array[TagAttribute] + + # Top menu template if any. + var topmenu: DocTopMenu is writable, noinit + + # Sidebar template if any. + var sidebar: nullable DocSideBar = null is writable + + # Footer content if any. + var footer: nullable Writable = null is writable + + # JS scripts to append at the end of the body + var scripts = new Array[TplScript] + + # Renders the html `
`. + private fun render_head do + var css = (self.shareurl / "css").html_escape + var vendors = (self.shareurl / "vendors").html_escape + + addn "" + addn "" + addn " " + addn " " + addn " " + addn " " + addn " " + addn " " + addn " " + addn " " + addn "