-
- # TODO this should be done in StructurePhase.
- redef fun init_content(v, doc) do
- # intro text
- var section = new TplSection.with_title("overview", title)
- var article = new TplArticle("intro")
- if v.ctx.opt_custom_intro.value != null then
- article.content = v.ctx.opt_custom_intro.value.to_s
- end
- section.add_child article
- # Projects list
- var mprojects = doc.model.mprojects.to_a
- var sorter = new MConcernRankSorter
- sorter.sort mprojects
- var ssection = new TplSection.with_title("projects", "Projects")
- for mproject in mprojects do
- var sarticle = new TplArticle(mproject.nitdoc_id)
- var title = new Template
- title.add mproject.html_icon
- title.add mproject.html_link
- sarticle.title = title
- sarticle.title_classes.add "signature"
- sarticle.summary_title = mproject.html_name
- sarticle.subtitle = mproject.html_declaration
- var comment = mproject.html_short_comment
- if comment != null then
- sarticle.content = comment
- end
- ssection.add_child sarticle
- end
- section.add_child ssection
- self.add_section section
- end