From: Alexandre Terrasa Date: Mon, 23 Feb 2015 12:36:20 +0000 (+0100) Subject: contrib/nitrpg: add MDPanel to display MDContent X-Git-Tag: v0.7.4~14^2~6 X-Git-Url: http://nitlanguage.org contrib/nitrpg: add MDPanel to display MDContent Signed-off-by: Alexandre Terrasa --- diff --git a/contrib/nitrpg/src/templates/panels.nit b/contrib/nitrpg/src/templates/panels.nit index 14538c5..a792703 100644 --- a/contrib/nitrpg/src/templates/panels.nit +++ b/contrib/nitrpg/src/templates/panels.nit @@ -18,6 +18,7 @@ module panels import templates_events +import markdown # A panel can be displayed in a html page. # @@ -98,6 +99,20 @@ class ErrorPanel end +# A panel that display a markdown content rendered as HTML. +class MDPanel + super Panel + + # Markdown text to display. + var text: String + + redef fun rendering do + add """
+
{{{text.md_to_html}}}
+
""" + end +end + # A panel that display repo statistics. class GameStatusPanel super Panel