nitdoc: move css files to share/css/ dir
[nit.git] / src / nitdoc.nit
index ff254b5..c9691bf 100644 (file)
@@ -235,10 +235,11 @@ abstract class NitdocPage
 
        protected fun head do
                append("<meta charset='utf-8'/>")
-               append("<link rel='stylesheet' href='{shareurl}/styles/main.css' type='text/css' media='screen'/>")
-               append("<link rel='stylesheet' href='{shareurl}/styles/Nitdoc.UI.css' type='text/css' media='screen'/>")
-               append("<link rel='stylesheet' href='{shareurl}/styles/Nitdoc.QuickSearch.css' type='text/css' media='screen'/>")
-               append("<link rel='stylesheet' href='{shareurl}/styles/Nitdoc.GitHub.css' type='text/css' media='screen'/>")
+               append("<link rel='stylesheet' href='{shareurl}/css/main.css' type='text/css'/>")
+               append("<link rel='stylesheet' href='{shareurl}/css/Nitdoc.UI.css' type='text/css''/>")
+               append("<link rel='stylesheet' href='{shareurl}/css/Nitdoc.QuickSearch.css' type='text/css'/>")
+               append("<link rel='stylesheet' href='{shareurl}/css/Nitdoc.GitHub.css' type='text/css'/>")
+               append("<link rel='stylesheet' href='{shareurl}/css/Nitdoc.ModalBox.css' type='text/css'/>")
                var title = ""
                if ctx.opt_custom_title.value != null then
                        title = " | {ctx.opt_custom_title.value.to_s}"
@@ -1824,11 +1825,13 @@ redef class AModule
                return ""
        end
 
+       # The doc location or the first line of the block if doc node is null
        private fun doc_location: Location do
                if n_moduledecl != null and n_moduledecl.n_doc != null then
                        return n_moduledecl.n_doc.location
                end
-               return location
+               var l = location
+               return new Location(l.file, l.line_start, l.line_start, l.column_start, l.column_start)
        end
 end
 
@@ -1848,9 +1851,11 @@ redef class AStdClassdef
                return ""
        end
 
+       # The doc location or the first line of the block if doc node is null
        private fun doc_location: Location do
                if n_doc != null then return n_doc.location
-               return location
+               var l = location
+               return new Location(l.file, l.line_start, l.line_start, l.column_start, l.column_start)
        end
 end
 
@@ -1872,7 +1877,9 @@ redef class APropdef
 
        private fun doc_location: Location do
                if n_doc != null then return n_doc.location
-               return location
+               var l = location
+               return new Location(l.file, l.line_start, l.line_start, l.column_start, l.column_start)
+
        end
 end