ni_nitdoc: moved JS facilities to Nitdoc.UI module
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 17 Sep 2013 02:41:32 +0000 (22:41 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 17 Sep 2013 02:41:32 +0000 (22:41 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/ni_nitdoc/scripts/Nitdoc.QuickSearch.js
share/ni_nitdoc/scripts/Nitdoc.UI.js [new file with mode: 0644]
share/ni_nitdoc/scripts/js-facilities.js [deleted file]
share/ni_nitdoc/styles/Nitdoc.UI.css [new file with mode: 0644]
share/ni_nitdoc/styles/main.css
src/ni_nitdoc.nit

index c03b526..7f88149 100644 (file)
@@ -86,7 +86,7 @@ $(document).ready(function() {
         });
 });
 
-var Nitdoc = {};
+var Nitdoc = Nitdoc || {};
 Nitdoc.QuickSearch = {};
 
 // Do search
diff --git a/share/ni_nitdoc/scripts/Nitdoc.UI.js b/share/ni_nitdoc/scripts/Nitdoc.UI.js
new file mode 100644 (file)
index 0000000..5163c75
--- /dev/null
@@ -0,0 +1,201 @@
+/* This file is part of NIT ( http://www.nitlanguage.org ).\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+   http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+   Documentation generator for the nit language.\r
+   Generate API documentation in HTML format from nit source code.\r
+*/\r
+\r
+var Nitdoc = Nitdoc || {};\r
+\r
+/*\r
+ * Nitdoc UI module\r
+ *\r
+ * Enhance nitdoc usability with JS features\r
+ */\r
+\r
+Nitdoc.UI = function() {\r
+\r
+       // Allow user to fold sidebar nav elements on click\r
+       var enableFolding = function(containerSelector) {\r
+               var container = $(containerSelector);\r
+               var foldLink = $(document.createElement("a"))\r
+               .addClass("nitdoc-ui-fold")\r
+               .html("-");\r
+\r
+               container.find("nav h3")\r
+               .prepend(foldLink)\r
+               .css("cursor", "pointer")\r
+               .toggle(\r
+                       function() {\r
+                               $(this).find("a.nitdoc-ui-fold").html("+");\r
+                               $(this).nextAll().toggle();\r
+                       },\r
+                       function() {\r
+                               $(this).find("a.nitdoc-ui-fold").html("-");\r
+                               $(this).nextAll().toggle();\r
+                       }\r
+               );\r
+       }\r
+\r
+       // Allow user to copy signatures to clipboard with ZeroClipboard flahs plugin\r
+       // See: https://github.com/zeroclipboard/ZeroClipboard\r
+       var enableCopyToClipboard = function(copySelector) {\r
+               $(copySelector).each(function() {\r
+                       var btn = $(document.createElement("button"))\r
+                       .addClass("nitdoc-ui-copy")\r
+                       .attr("data-clipboard-text", $(this).attr("data-untyped-signature"))\r
+                       .append(\r
+                               $(document.createElement("img"))\r
+                               .attr("src", './resources/icons/copy.png')\r
+                       );\r
+                       $(this).append(btn);\r
+               });\r
+\r
+               var clip = new ZeroClipboard($("button.nitdoc-ui-copy"), {\r
+                       moviePath: "./ZeroClipboard.swf"\r
+               });\r
+       }\r
+\r
+       // Allow user to filter sidebar box entries by name\r
+       var enableSidebarTextFilters = function(filterSelector) {\r
+               var div = $(document.createElement("div"))\r
+               .addClass("nitdoc-ui-filter")\r
+               .append(\r
+                       $(document.createElement("input"))\r
+                       .addClass("nitdoc-ui-notused")\r
+                       .attr("type", "text")\r
+                       .attr("value",  "filter...")\r
+                       .keyup(function() {\r
+                               var box = $(this).parents("nav.filterable");\r
+                               var value = $(this).val();\r
+                               box.find("ul li:not(:icontains('" + value + "'))").hide();\r
+                               box.find("ul li:icontains('" + value + "')").show();\r
+                       })\r
+                       .focusout(function() {\r
+                               if($(this).val() == "") {\r
+                                       $(this).addClass("nitdoc-ui-notused");\r
+                                       $(this).val("filter...");\r
+                               }\r
+                       })\r
+                       .focusin(function() {\r
+                               if($(this).val() == "filter...") {\r
+                                       $(this).removeClass("nitdoc-ui-notused");\r
+                                       $(this).val("");\r
+                               }\r
+                       })\r
+               );\r
+               $(filterSelector).after(div);\r
+               preloadSidebarTextFilters();\r
+       }\r
+\r
+       // Prealod filters using search query\r
+       var preloadSidebarTextFilters = function() {\r
+               var anchor = Nitdoc.Utils.extractAnchor(document.location.hash);\r
+               if(!anchor || anchor.indexOf("q=") == -1) return;\r
+\r
+               var query = anchor.substring(2);\r
+               if(!query) return;\r
+\r
+               $(".nitdoc-ui-filter input:text")\r
+               .val(query)\r
+               .removeClass("nitdoc-ui-notused")\r
+               .trigger("keyup");\r
+       }\r
+\r
+       // Allow user to filter side bar box entries by Introduced/Refined/inHerited type\r
+       var enableSidebarTypeFilters = function(filterSelector) {\r
+               var box = $(filterSelector);\r
+               var types = {};\r
+\r
+               box.find("li").each(function() {\r
+                       var span = $(this).find("span:first");\r
+                       if(!types[span.html()]) types[span.html()] = {\r
+                               title: span.attr("title"),\r
+                               class: $(this).attr("class")\r
+                       }\r
+               });\r
+\r
+               for(var type in types) {\r
+                       var a = $(document.createElement("a"))\r
+                       .addClass("nitdoc-ui-filter-link")\r
+                       .html(type)\r
+                       .attr("title", "Hide " + types[type].title)\r
+                       .attr("data-filter-class", types[type].class)\r
+                       .toggle(\r
+                               function() {\r
+                                       var hclass = $(this).attr("data-filter-class");\r
+                                       $(this).parents(filterSelector).find("li." + hclass).hide();\r
+                                       $(this).addClass("nitdoc-ui-filter-hidden")\r
+                               },\r
+                               function() {\r
+                                       var hclass = $(this).attr("data-filter-class");\r
+                                       $(this).parents(filterSelector).find("li." + hclass).show();\r
+                                       $(this).removeClass("nitdoc-ui-filter-hidden")\r
+                               }\r
+                       )\r
+                       $(filterSelector).find(".nitdoc-ui-filter").append(a);\r
+               }\r
+       }\r
+\r
+       // Public interface\r
+       var ui = {\r
+               enableFolding: enableFolding,\r
+               enableCopyToClipboard: enableCopyToClipboard,\r
+               enableSidebarTextFilters: enableSidebarTextFilters,\r
+               enableSidebarTypeFilters: enableSidebarTypeFilters\r
+       };\r
+\r
+       return ui;\r
+}();\r
+\r
+// Init UI on page load\r
+$(document).ready(function() {\r
+       Nitdoc.UI.enableFolding(".sidebar");\r
+       Nitdoc.UI.enableCopyToClipboard(".signature");\r
+       Nitdoc.UI.enableSidebarTextFilters("nav.filterable h3");\r
+       Nitdoc.UI.enableSidebarTypeFilters("nav.filterable");\r
+});\r
+\r
+/*\r
+ * Utils module\r
+ *\r
+ * Utility functions\r
+ */\r
+\r
+Nitdoc.Utils = function() {\r
+\r
+       // Extract anchor part (after #) from URL string\r
+       var extractAnchor = function(url) {\r
+           var index = url.indexOf("#");\r
+           if (index >= 0) {\r
+                       return url.substring(index + 1);\r
+               }\r
+               return null;\r
+       }\r
+\r
+       // Public interface\r
+       var utils = {\r
+               extractAnchor: extractAnchor\r
+       };\r
+\r
+       return utils;\r
+}();\r
+\r
+// JQuery Case Insensitive :icontains selector\r
+$.expr[':'].icontains = function(obj, index, meta, stack){\r
+       return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0;\r
+};\r
+\r
+//rename file\r
+//commit\r
diff --git a/share/ni_nitdoc/scripts/js-facilities.js b/share/ni_nitdoc/scripts/js-facilities.js
deleted file mode 100644 (file)
index 611f44b..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*\r
-* JQuery Case Insensitive :icontains selector\r
-*/\r
-$.expr[':'].icontains = function(obj, index, meta, stack){\r
-       return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0;\r
-};\r
-\r
-/*\r
-* Add folding and filtering facilities to class description page.\r
-*/\r
-$(document).ready(function() {\r
-\r
-       // Menu nav folding\r
-       $(".menu nav h3")\r
-       .prepend(\r
-               $(document.createElement("a"))\r
-               .html("-")\r
-               .addClass("fold")\r
-       )\r
-       .css("cursor", "pointer")\r
-       .click( function() {\r
-                       if($(this).find("a.fold").html() == "+") {\r
-                               $(this).find("a.fold").html("-");\r
-                       } else {\r
-                               $(this).find("a.fold").html("+");\r
-                       }\r
-                       $(this).nextAll().toggle();\r
-       })\r
-\r
-       // Insert filter field\r
-       $("article.filterable h2, nav.filterable h3")\r
-       .after(\r
-               $(document.createElement("div"))\r
-               .addClass("filter")\r
-               .append(\r
-                       $(document.createElement("input"))\r
-                       .attr({\r
-                               type:   "text",\r
-                               value:  "filter..."\r
-                       })\r
-                       .addClass("notUsed")\r
-                       .keyup(function() {\r
-                               $(this).parent().parent().find("ul li:not(:icontains('" + $(this).val() + "'))").addClass("hide");\r
-                               $(this).parent().parent().find("ul li:icontains('" + $(this).val() + "')").removeClass("hide");\r
-                       })\r
-                       .focusout(function() {\r
-                               if($(this).val() == "") {\r
-                                       $(this).addClass("notUsed");\r
-                                       $(this).val("filter...");\r
-                               }\r
-                       })\r
-                       .focusin(function() {\r
-                               if($(this).val() == "filter...") {\r
-                                       $(this).removeClass("notUsed");\r
-                                       $(this).val("");\r
-                               }\r
-                       })\r
-               )\r
-       );\r
-\r
-       // Filter toggle between H I R in nav porperties list\r
-       $("nav.properties.filterable .filter")\r
-       .append(\r
-               $(document.createElement("a"))\r
-               .html("H")\r
-               .attr({\r
-                       title:  "hide inherited properties"\r
-               })\r
-               .click( function() {\r
-                       if($(this).hasClass("hidden")) {\r
-                               $(this).parent().parent().find("li.inherit").show();\r
-                       } else {\r
-                               $(this).parent().parent().find("li.inherit").hide();\r
-                       }\r
-\r
-                       $(this).toggleClass("hidden");\r
-               })\r
-       )\r
-       .append(\r
-               $(document.createElement("a"))\r
-               .html("R")\r
-               .attr({\r
-                       title:  "hide redefined properties"\r
-               })\r
-               .click( function() {\r
-                       if($(this).hasClass("hidden")) {\r
-                               $(this).parent().parent().find("li.redef").show();\r
-                       } else {\r
-                               $(this).parent().parent().find("li.redef").hide();\r
-                       }\r
-\r
-                       $(this).toggleClass("hidden");\r
-               })\r
-       )\r
-       .append(\r
-               $(document.createElement("a"))\r
-               .html("I")\r
-               .attr({\r
-                       title:  "hide introduced properties"\r
-               })\r
-               .click( function() {\r
-                       if($(this).hasClass("hidden")) {\r
-                               $(this).parent().parent().find("li.intro").show();\r
-                       } else {\r
-                               $(this).parent().parent().find("li.intro").hide();\r
-                       }\r
-\r
-                       $(this).toggleClass("hidden");\r
-               })\r
-       );\r
-\r
-       // Filter toggle between I R in\r
-       $("article.properties.filterable .filter, article.classes.filterable .filter")\r
-       .append(\r
-               $(document.createElement("a"))\r
-               .html("I")\r
-               .attr({\r
-                       title:  "hide introduced properties"\r
-               })\r
-               .click( function() {\r
-                       if($(this).hasClass("hidden")) {\r
-                               $(this).parent().parent().find("li.intro").show();\r
-                       } else {\r
-                               $(this).parent().parent().find("li.intro").hide();\r
-                       }\r
-\r
-                       $(this).toggleClass("hidden");\r
-               })\r
-       )\r
-       .append(\r
-               $(document.createElement("a"))\r
-               .html("R")\r
-               .attr({\r
-                       title:  "hide redefined properties"\r
-               })\r
-               .click( function() {\r
-                       if($(this).hasClass("hidden")) {\r
-                               $(this).parent().parent().find("li.redef").show();\r
-                       } else {\r
-                               $(this).parent().parent().find("li.redef").hide();\r
-                       }\r
-\r
-                       $(this).toggleClass("hidden");\r
-               })\r
-       );\r
-\r
-       //Preload filter fields with query string\r
-       preloadFilters();\r
-\r
-       //Copy to clipboard utility on signatures\r
-       $(".signature").each(function(){\r
-               $(this).append(\r
-                       $("<button class='copyButton' data-clipboard-text='" + $(this).attr("data-untyped-signature") + "'></button>")\r
-                       .append($("<img src='./resources/icons/copy.png' />"))\r
-               )\r
-       });\r
-\r
-       var clip = new ZeroClipboard($(".copyButton"), {\r
-         moviePath: "./ZeroClipboard.swf"\r
-       } );\r
-});\r
-\r
-/* Parse current URL and return anchor name */\r
-function currentAnchor() {\r
-    var index = document.location.hash.indexOf("#");\r
-    if (index >= 0) {\r
-               return document.location.hash.substring(index + 1);\r
-       }\r
-       return null;\r
-}\r
-\r
-/* Prealod filters field using search query */\r
-function preloadFilters() {\r
-       // Parse URL and get query string\r
-       var search = currentAnchor();\r
-\r
-       if(search == null || search.indexOf("q=") == -1)\r
-               return;\r
-\r
-       search = search.substring(2, search.length);\r
-\r
-       if(search == "" || search == "undefined")\r
-               return;\r
-\r
-       $(":text").val(search);\r
-       $(".filter :text")\r
-               .removeClass("notUsed")\r
-               .trigger("keyup");\r
-\r
-}\r
-\r
diff --git a/share/ni_nitdoc/styles/Nitdoc.UI.css b/share/ni_nitdoc/styles/Nitdoc.UI.css
new file mode 100644 (file)
index 0000000..38c52f1
--- /dev/null
@@ -0,0 +1,91 @@
+/* This file is part of NIT ( http://www.nitlanguage.org ).\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+   http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+   Documentation generator for the nit language.\r
+   Generate API documentation in HTML format from nit source code.\r
+*/\r
+\r
+/* \r
+ * Nitdoc UI JS module \r
+ */\r
+\r
+\r
+/* Folding */\r
+\r
+a.nitdoc-ui-fold {\r
+       margin: 0 5px;\r
+       color: #999;\r
+       font-family: monospace;\r
+       font-weight: bold;\r
+       font-size: 120%;\r
+}\r
+\r
+/* Copy signature to clipboard */\r
+\r
+button.nitdoc-ui-copy.zeroclipboard-is-active {\r
+       border-color: #0D8921;\r
+}\r
+\r
+button.nitdoc-ui-copy {\r
+       visibility: hidden;\r
+       vertical-align: middle;\r
+       margin: -2px 0px 0px 10px;\r
+       width: 22px;\r
+       height: 19px;\r
+       padding: 1px;\r
+       cursor: pointer;\r
+       background: #eee;\r
+       border: 1px solid #ccc;\r
+       box-shadow: none;\r
+}\r
+\r
+button.nitdoc-ui-copy img {\r
+       width: 16px;\r
+}\r
+\r
+article:hover > .signature button.nitdoc-ui-copy, button.nitdoc-ui-copy.zeroclipboard-is-hover {\r
+       visibility: visible;\r
+}\r
+\r
+/* Side bar boxes text filtering */\r
+\r
+.nitdoc-ui-filter .nitdoc-ui-notused {\r
+       color: #999;\r
+       font-style: italic;\r
+}\r
+\r
+.nitdoc-ui-filter {\r
+       text-align: center;\r
+       padding: 5px;\r
+}\r
+\r
+/* Side bar boxes type filtering */\r
+\r
+a.nitdoc-ui-filter-link {\r
+       color: #0D8921;\r
+       cursor: pointer;\r
+       font-family: monospace;\r
+       margin-right: 5px;\r
+       font-weight: bold;\r
+}\r
+\r
+a.nitdoc-ui-filter-link:hover {\r
+       text-decoration: underline;\r
+}\r
+\r
+a.nitdoc-ui-filter-hidden {\r
+       color: #999;\r
+       font-weight: normal;\r
+}\r
+\r
index f83c781..f371529 100644 (file)
@@ -85,7 +85,7 @@ header {
        height: 100%;\r
 }\r
 \r
-.menu {\r
+.sidebar {\r
        position: fixed;\r
        top: 50px;\r
        bottom: 1em;\r
@@ -93,7 +93,7 @@ header {
        overflow-y:     scroll;\r
 }\r
 \r
-.menu nav:last-child {\r
+.sidebar nav:last-child {\r
        margin-bottom: 0;\r
 }\r
 \r
@@ -114,7 +114,7 @@ header {
        width: auto;\r
 }\r
 \r
-.page.footed .content, .page.footed .menu {\r
+.page.footed .content, .page.footed .sidebar {\r
        bottom: 2em;\r
 }\r
 \r
@@ -124,59 +124,34 @@ footer {
        width: 100%;\r
 }\r
 \r
-article:hover > .signature .copyButton, .copyButton.zeroclipboard-is-hover {\r
-       visibility: visible;\r
-}\r
-\r
-.copyButton.zeroclipboard-is-active {\r
-       border-color: #0D8921;\r
-}\r
-\r
-.copyButton {\r
-       visibility: hidden;\r
-       vertical-align: middle;\r
-       margin: -2px 0px 0px 10px;\r
-       width: 22px;\r
-       height: 19px;\r
-       padding: 1px;\r
-       cursor: pointer;\r
-       background: #eee;\r
-       border: 1px solid #ccc;\r
-       box-shadow: none;\r
-}\r
-\r
-.copyButton img {\r
-       width: 16px;\r
-}\r
-\r
 /* Webkit scroll bars */\r
 \r
-.menu {\r
+.sidebar {\r
     overflow-y: hidden;\r
 }\r
 \r
-.menu:hover {\r
+.sidebar:hover {\r
     overflow-y: scroll;\r
 }\r
 \r
-.menu::-webkit-scrollbar, .content::-webkit-scrollbar {\r
+.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar {\r
     width: 10px;\r
 }\r
 \r
-.menu::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb {\r
+.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb {\r
        background: #CCC;\r
        -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07);\r
 }\r
 \r
-.menu::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover {\r
+.sidebar::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover {\r
        background: #999;\r
 }\r
 \r
-.menu::-webkit-scrollbar-corner, .content::-webkit-scrollbar-corner {\r
+.sidebar::-webkit-scrollbar-corner, .content::-webkit-scrollbar-corner {\r
        background: transparent;\r
 }\r
 \r
-.menu::-webkit-scrollbar-button, .content::-webkit-scrollbar-button {\r
+.sidebar::-webkit-scrollbar-button, .content::-webkit-scrollbar-button {\r
        width: 0;\r
        height: 0;\r
        display: none;\r
@@ -223,43 +198,43 @@ header nav.main ul li.current {
        color: white;\r
 }\r
 \r
-/* Latteral Menu */\r
+/* Sidebar */\r
 \r
-.menu nav {\r
+.sidebar nav {\r
        margin: 20px;\r
        width: 208px;\r
        border: 1px solid #CCC;\r
 }\r
 \r
-.menu nav:first-child {\r
+.sidebar nav:first-child {\r
        margin-top: 0;\r
 }\r
 \r
-.menu nav h3 {\r
+.sidebar nav h3 {\r
        margin: 0;\r
        padding: 5px;\r
        background: #CCC;\r
        font-size: 1em;\r
 }\r
 \r
-.menu nav h4 {\r
+.sidebar nav h4 {\r
        font-weight: bold;\r
        color: #555555;\r
        margin: 10px 0 0 10px;\r
        font-size: 12px;\r
 }\r
 \r
-.menu nav h4:last-child {\r
+.sidebar nav h4:last-child {\r
        margin-bottom: 5px;\r
 }\r
 \r
-.menu nav ul {\r
+.sidebar nav ul {\r
        margin: 10px;\r
        padding: 0;\r
        list-style-type: none;\r
 }\r
 \r
-.menu nav ul li {\r
+.sidebar nav ul li {\r
        overflow: hidden;\r
        color: #CCC;\r
 }\r
@@ -410,7 +385,19 @@ article .info .code {
        margin: 0;\r
 }\r
 \r
-/* JS facilities */\r
+/* Icons */\r
+\r
+.type.public, .interface.public, .abstract.class.public { background-image: url('../resources/icons/vtype_public.png')}\r
+.type.protected, .interface.protected, .abstract.class.protected { background-image: url('../resources/icons/vtype_protected.png')}\r
+.type.private, .interface.private, .abstract.class.private { background-image: url('../resources/icons/vtype_private.png')}\r
+.init.public, .enum.public { background-image: url('../resources/icons/const_public.png')}\r
+.init.protected, .enum.protected { background-image: url('../resources/icons/const_protected.png')}\r
+.init.private, .enum.private { background-image: url('../resources/icons/const_private.png')}\r
+.fun.public, .class.public, .extern.public { background-image: url('../resources/icons/meth_public.png')}\r
+.fun.protected, .class.protected, .extern.protected { background-image: url('../resources/icons/meth_protected.png')}\r
+.fun.private, .class.private, .extern.private { background-image: url('../resources/icons/meth_private.png')}\r
+\r
+/* Form elements */\r
 \r
 input[type=text] {\r
        width: 150px;\r
@@ -419,16 +406,6 @@ input[type=text] {
        padding: 1px 2px;\r
 }\r
 \r
-input[type=text].notUsed {\r
-       color: #999;\r
-       font-style: italic;\r
-}\r
-\r
-nav .filter {\r
-       text-align: center;\r
-       padding: 5px;\r
-}\r
-\r
 nav.main input[type=text] {\r
        margin: -2px 10px;\r
        color: black;\r
@@ -439,48 +416,6 @@ nav.main form {
        float: right;\r
 }\r
 \r
-.filter a {\r
-       color: #0D8921;\r
-       cursor: pointer;\r
-       font-family: monospace;\r
-       margin-right: 5px;\r
-   font-weight: bold;\r
-}\r
-\r
-.filter a.hidden {\r
-       color: #999;\r
-   font-weight: normal;\r
-}\r
-\r
-.filter a:hover {\r
-       text-decoration: underline;\r
-}\r
-\r
-nav h3 a.fold {\r
-       margin: 0 5px;\r
-       color: #999;\r
-       font-family: monospace;\r
-       font-weight: bold;\r
-       font-size: 120%;\r
-       cursor: pointer;\r
-}\r
-\r
-.hide {\r
-       overflow-y: hidden;\r
-       height: 0;\r
-}\r
-\r
-/* Icons */\r
-.type.public, .interface.public, .abstract.class.public { background-image: url('../resources/icons/vtype_public.png')}\r
-.type.protected, .interface.protected, .abstract.class.protected { background-image: url('../resources/icons/vtype_protected.png')}\r
-.type.private, .interface.private, .abstract.class.private { background-image: url('../resources/icons/vtype_private.png')}\r
-.init.public, .enum.public { background-image: url('../resources/icons/const_public.png')}\r
-.init.protected, .enum.protected { background-image: url('../resources/icons/const_protected.png')}\r
-.init.private, .enum.private { background-image: url('../resources/icons/const_private.png')}\r
-.fun.public, .class.public, .extern.public { background-image: url('../resources/icons/meth_public.png')}\r
-.fun.protected, .class.protected, .extern.protected { background-image: url('../resources/icons/meth_protected.png')}\r
-.fun.private, .class.private, .extern.private { background-image: url('../resources/icons/meth_private.png')}\r
-\r
 /* Quick Search */\r
 \r
 #search {\r
index 61f9f7a..ff6f12c 100644 (file)
@@ -210,13 +210,14 @@ abstract class NitdocPage
                append("<meta charset='utf-8'/>")
                append("<script type='text/javascript' src='scripts/jquery-1.7.1.min.js'></script>")
                append("<script type='text/javascript' src='scripts/ZeroClipboard.min.js'></script>")
+               append("<script type='text/javascript' src='scripts/Nitdoc.UI.js'></script>")
                append("<script type='text/javascript' src='scripts/Markdown.Converter.js'></script>")
                append("<script type='text/javascript' src='quicksearch-list.js'></script>")
                append("<script type='text/javascript' src='scripts/base64.js'></script>")
                append("<script type='text/javascript' src='scripts/github.js'></script>")
-               append("<script type='text/javascript' src='scripts/js-facilities.js'></script>")
                append("<script type='text/javascript' src='scripts/Nitdoc.QuickSearch.js'></script>")
                append("<link rel='stylesheet' href='styles/main.css' type='text/css' media='screen'/>")
+               append("<link rel='stylesheet' href='styles/Nitdoc.UI.css' type='text/css' media='screen'/>")
                append("<link rel='stylesheet' href='styles/github.css' type='text/css' media='screen'/>")
                var title = ""
                if ctx.opt_custom_title.value != null then
@@ -542,7 +543,7 @@ class NitdocModule
        end
 
        redef fun content do
-               append("<div class='menu'>")
+               append("<div class='sidebar'>")
                classes_column
                importation_column
                append("</div>")
@@ -769,7 +770,7 @@ class NitdocClass
        end
 
        redef fun content do
-               append("<div class='menu'>")
+               append("<div class='sidebar'>")
                properties_column
                inheritance_column
                append("</div>")