X-Git-Url: http://nitlanguage.org diff --git a/src/doc/doc_templates.nit b/src/doc/doc_templates.nit index 3ead15b..cbb625e 100644 --- a/src/doc/doc_templates.nit +++ b/src/doc/doc_templates.nit @@ -17,37 +17,39 @@ module doc_templates import template +import json::static # A documentation page class TplPage super Template - # Page title in HTML header - var title: String writable + # The unescaped page title to put in the HTML header. + var title: String is writable, noinit + + # Page url + var url: String is writable, noinit # Directory where css, js and other assets can be found - var shareurl: String writable + 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: TplTopMenu writable + var topmenu: TplTopMenu is writable, noinit # Sidebar template if any - var sidebar: nullable TplSidebar writable + var sidebar: nullable TplSidebar = null is writable # Content of the page in form a TplSection var sections = new Array[TplSection] # Footer content if any - var footer: nullable Streamable writable + var footer: nullable Streamable = null is writable # JS scripts to append at the end of the body var scripts = new Array[TplScript] - init do end - # Add a section to this page fun add_section(section: TplSection) do sections.add section @@ -55,28 +57,31 @@ class TplPage # Render the html header private fun render_head do - add "" - add "
" - add " " - add " " - add " " - add " " - add " " - add " " - add " " - add " " - add "