ni_nitdoc: full screen display and better scrolling
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 11 Sep 2013 19:51:20 +0000 (15:51 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 11 Sep 2013 19:51:20 +0000 (15:51 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/ni_nitdoc/styles/main.css
src/ni_nitdoc.nit

index c28dd8e..a9c62b9 100644 (file)
@@ -1,7 +1,6 @@
 /* General */\r
 \r
 body {\r
-       margin: 0;\r
        font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif;\r
 }\r
 \r
@@ -65,43 +64,57 @@ h3 {
 \r
 /* Page display */\r
 \r
-body {\r
+html {\r
+       height: 100%;\r
        overflow: hidden;\r
+}\r
+\r
+body {\r
        height: 100%;\r
+       margin: 0;\r
 }\r
 \r
 header {\r
+       position: fixed;\r
+       left: 0;\r
+       right: 0;\r
 }\r
 \r
 .page {\r
-       width: 937px;\r
        margin: auto;\r
+       height: 100%;\r
 }\r
 \r
 .menu {\r
        position: fixed;\r
        top: 50px;\r
-       bottom: 2em;\r
+       bottom: 1em;\r
        width: 250px;\r
        overflow-y:     scroll;\r
 }\r
 \r
+.menu nav:last-child {\r
+       margin-bottom: 0;\r
+}\r
+\r
 .content {\r
        position: fixed;\r
        top: 50px;\r
-       bottom: 0em;\r
+       bottom: 1em;\r
+       left: 0;\r
+       right: 0;\r
        margin-left: 265px;\r
-       width: 667px;\r
        overflow-y:     scroll;\r
+       margin-right: 5px;\r
        padding-right: 10px;\r
 }\r
 \r
 .content.fullpage {\r
        margin-left: 20px;\r
-       width: 910px;\r
+       width: auto;\r
 }\r
 \r
-.content.footed {\r
+.page.footed .content, .page.footed .menu {\r
        bottom: 2em;\r
 }\r
 \r
@@ -174,7 +187,6 @@ article:hover > .signature .copyButton, .copyButton.zeroclipboard-is-hover {
 header nav ul {\r
        padding: 0;\r
        list-style-type: none;\r
-       width: 900px;\r
        margin: auto;\r
 }\r
 \r
index 36d52a7..155f90f 100644 (file)
@@ -296,7 +296,9 @@ abstract class NitdocPage
                end
                append(">")
                header
-               append("<div class='page'>")
+               var footed = ""
+               if ctx.opt_custom_footer_text.value != null then footed = "footed"
+               append("<div class='page {footed}'>")
                content
                append("</div>")
                footer
@@ -351,9 +353,7 @@ class NitdocOverview
        end
 
        redef fun content do
-               var footed = ""
-               if ctx.opt_custom_footer_text.value != null then footed = "footed"
-               append("<div class='content fullpage {footed}'>")
+               append("<div class='content fullpage'>")
                var title = "Overview"
                if ctx.opt_custom_title.value != null then
                        title = ctx.opt_custom_title.value.to_s
@@ -428,9 +428,7 @@ class NitdocSearch
        end
 
        redef fun content do
-               var footed = ""
-               if ctx.opt_custom_footer_text.value != null then footed = "footed"
-               append("<div class='content fullpage {footed}'>")
+               append("<div class='content fullpage'>")
                append("<h1>{title}</h1>")
                module_column
                classes_column
@@ -547,9 +545,7 @@ class NitdocModule
                classes_column
                importation_column
                append("</div>")
-               var footed = ""
-               if ctx.opt_custom_footer_text.value != null then footed = "footed"
-               append("<div class='content {footed}'>")
+               append("<div class='content'>")
                module_doc
                append("</div>")
        end
@@ -776,9 +772,7 @@ class NitdocClass
                properties_column
                inheritance_column
                append("</div>")
-               var footed = ""
-               if ctx.opt_custom_footer_text.value != null then footed = "footed"
-               append("<div class='content {footed}'>")
+               append("<div class='content'>")
                class_doc
                append("</div>")
        end