diff --git a/doc/build.js b/doc/build.js index e461c39a..27b16351 100644 --- a/doc/build.js +++ b/doc/build.js @@ -2,7 +2,7 @@ var panino = require("panino"); var srcPath = process.cwd() + "/../lib/ace"; -panino.main(["--path=" + srcPath, "-o", "./out/", "-a", "./additionalObjs.json", "-t", "Ace API", "--skin", "./resources/ace/"], function(err) { +panino.main(["--path=" + srcPath, "-o", "./out/", "-a", "./additionalObjs.json", "-i", "index.md", "-t", "Ace API", "--skin", "./resources/ace/"], function(err) { if (err) { console.error(err); process.exit(-1); diff --git a/doc/index.md b/doc/index.md new file mode 100644 index 00000000..41733852 --- /dev/null +++ b/doc/index.md @@ -0,0 +1,5 @@ +# Ace API Reference + +Welcome to the Ace API Reference Guide. Ace is a standalone code editor written in JavaScript that you can embed onto any website. We're used in a bunch of places already, like GitHub, Google, and Facebook. + +On the left, you'll find a list of all of our currently documented classes. There are plenty more to do, but these represent the "core" set. For more information on how to work with Ace, check out the [main Ace website](http://ace.ajax.org). \ No newline at end of file diff --git a/doc/resources/ace/skeleton/csses/ace_api.css b/doc/resources/ace/skeleton/csses/ace_api.css index 022ce788..17ee3a01 100644 --- a/doc/resources/ace/skeleton/csses/ace_api.css +++ b/doc/resources/ace/skeleton/csses/ace_api.css @@ -965,4 +965,36 @@ body #dsq-reply h3{ #dsq-global-toolbar, #dsq-pagination, .dsq-trackback-url{ display : none; +} + +html +{ +height: 100%; +} + +body +{ +height: 100%; +} + +#nonFooter +{ +position: relative; +min-height: 100%; +} + +* html #nonFooter +{ +height: 100%; +} + +#wrapper +{ +padding-bottom: 9em; +} + +#footer +{ +position: relative; +margin-top: -3.5em; } \ No newline at end of file diff --git a/doc/resources/ace/skeleton/javascripts/ux.js b/doc/resources/ace/skeleton/javascripts/ux.js index 380e4a98..3389672f 100644 --- a/doc/resources/ace/skeleton/javascripts/ux.js +++ b/doc/resources/ace/skeleton/javascripts/ux.js @@ -60,6 +60,40 @@ $(document).ready(function () { }); } + // force a sticky footer + $(window).bind("load", function() { + + var footerHeight = 0, + footerTop = 0, + $footer = $("#footer"); + + positionFooter(); + + function positionFooter() { + + footerHeight = $footer.height(); + footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px"; + + if ( ($(document.body).height()+footerHeight) < $(window).height()) { + $footer.css({ + position: "absolute" + }).animate({ + top: footerTop + }) + } else { + $footer.css({ + position: "static" + }) + } + + } + + $(window) + .scroll(positionFooter) + .resize(positionFooter) + + }); + var s, sx; // scrolling offset calculation via www.quirksmode.org diff --git a/doc/resources/ace/templates/layout.jade b/doc/resources/ace/templates/layout.jade index 7dbf299c..38b5e042 100644 --- a/doc/resources/ace/templates/layout.jade +++ b/doc/resources/ace/templates/layout.jade @@ -7,26 +7,32 @@ include lib -mixin head(title + " - " + fileName) +mixin head body - - mixin navBar - header.filler + #nonFooter + #wrapper + mixin navBar + + header.filler + + + .container + .content + .row.centerpiece + .span3.offset6.sidebarContainer + #sidebar + include ace_menu.jade + .span9.mainContent + #documentation + -if (isIndex) + mixin markdown(indexContent) + -else + mixin api() + + div(id="disqus_thread") - .container - .content - .row.centerpiece - .span3.offset6.sidebarContainer - #sidebar - include ace_menu.jade - .span9.mainContent - #documentation - mixin api() + mixin footer - div(id="disqus_thread") - - mixin footer - - mixin endingScripts + mixin endingScripts \ No newline at end of file diff --git a/doc/resources/common_layout.jade b/doc/resources/common_layout.jade index a780754c..e7f6646d 100644 --- a/doc/resources/common_layout.jade +++ b/doc/resources/common_layout.jade @@ -9,12 +9,15 @@ mixin doctype -mixin head(guideTitle, additionalCSS) +mixin head meta(charset="utf-8") //- N.B. http://blog.yjl.im/2011/01/bad-value-x-ua-compatible-for-attribute.html meta(http-equiv="X-UA-Compatible", content="IE=edge,chrome=1") - title #{guideTitle} + -if (isIndex) + title #{title} + -else + title #{title} - #{fileName} meta(name="generator", content="c9-doc-build") meta(name="description", content="A complete and community-driven resource for learning and developing Node.js applications.") @@ -28,9 +31,6 @@ mixin head(guideTitle, additionalCSS) link(href="#{dirPrefix}resources/images/favicon.ico", rel="icon", type="image/x-icon") - if additionalCSS - link(rel="stylesheet", href="#{additionalCSS}") - script(src="#{dirPrefix}resources/javascripts/jquery.js") script(src="#{dirPrefix}resources/javascripts/clicker.js") script(src="#{dirPrefix}resources/javascripts/jquery.collapse.js") @@ -93,4 +93,4 @@ mixin formatGHHref(url, type) url = 'src/' + url -url = url.replace(/\/{2,}/g, "/").replace(/\//g,"%2F") - [edit] \ No newline at end of file + [edit] \ No newline at end of file diff --git a/doc/resources/landing/layout.jade b/doc/resources/landing/layout.jade deleted file mode 100644 index 3aa2f566..00000000 --- a/doc/resources/landing/layout.jade +++ /dev/null @@ -1,34 +0,0 @@ -include ../common_layout - -mixin identifyBuild('','') - -mixin doctype - -mixin head('Ace API Reference') - -body(onload="styleCode()") - - mixin topBar(whoAmI) - - mixin header - - .container - .content - .row.container - .span5.offset4.sidebarContainer - #sidebar - - .span11 - div.title - h1.pageTitle #{title} - - .dev_guide#content - mixin markdown(data) - - div#disqus_thread - - mixin footer - - mixin endingScripts - - diff --git a/lib/ace/search.js b/lib/ace/search.js index 2daedc28..846f3905 100644 --- a/lib/ace/search.js +++ b/lib/ace/search.js @@ -106,7 +106,7 @@ Search.SELECTION = 2; }; /** - * Search.find(session) -> Range | null + * Search.find(session) -> Range * - session (EditSession): The session to search with * * Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session. @@ -132,7 +132,7 @@ Search.SELECTION = 2; }; /** - * Search.findAll(session) -> [Range] | null + * Search.findAll(session) -> [Range] * - session (EditSession): The session to search with * * Searches for all occurances `options.needle`. If found, this method returns an array of [[Range `Range`s]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session. @@ -232,7 +232,7 @@ Search.SELECTION = 2; }; /** internal, hide - * Search.$backwardMatchIterator(session) -> String | null + * Search.$backwardMatchIterator(session) -> String * - session (EditSession): The session to search with * *