ni_nitdoc: Creted subclass of HTMLPage
authorStefan Lage <lagestfan@gmail.com>
Thu, 27 Jun 2013 20:17:53 +0000 (16:17 -0400)
committerStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 20:53:29 +0000 (16:53 -0400)
Adding a subclass of HTMLPage named 'NitdocPage' to get a general Header for each subclass

Signed-off-by: Stefan Lage <lagestfan@gmail.com>

src/ni_nitdoc.nit

index 23d4e7e..9c76999 100644 (file)
@@ -18,6 +18,7 @@ module ni_nitdoc
 
 import model_utils
 import abstract_compiler
+import html
 
 class Nitdoc
        private var toolcontext: ToolContext
@@ -96,6 +97,23 @@ class Nitdoc
        end
 end
 
+class NitdocPage
+       super HTMLPage
+       var opt_nodot: Bool
+       var destinationdir : String
+
+       redef fun head do
+               add("meta").attr("charset", "utf-8")
+               add("script").attr("type", "text/javascript").attr("src", "scripts/jquery-1.7.1.min.js")
+               add("script").attr("type", "text/javascript").attr("src", "quicksearch-list.js")
+               add("script").attr("type", "text/javascript").attr("src", "scripts/js-facilities.js")
+               add("link").attr("rel", "stylesheet").attr("href", "styles/main.css").attr("type", "text/css").attr("media", "screen")
+       end
+
+       redef fun body do header
+       fun header do end
+end
+
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
 toolcontext.process_options