From 65c09b7abc48f89a46b0c39240809b6175195744 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 23 Feb 2015 13:36:20 +0100 Subject: [PATCH] contrib/nitrpg: add MDPanel to display MDContent Signed-off-by: Alexandre Terrasa --- contrib/nitrpg/src/templates/panels.nit | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 1.7.9.5