Continue finalizing ace api doc

This commit is contained in:
Garen Torikian 2012-04-25 15:30:18 -07:00
commit 782da7637b
8 changed files with 105 additions and 62 deletions

View file

@ -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);

5
doc/index.md Normal file
View file

@ -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).

View file

@ -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;
}

View file

@ -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

View file

@ -7,26 +7,32 @@ include lib
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
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

View file

@ -9,12 +9,15 @@ mixin doctype
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
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")
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fc9%2Fnodemanual.org.git&file=#{url}&line_start=3&line_end=0' title='Edit in Cloud9 IDE'>[edit]</a>
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%ace.git&file=#{url}&line_start=3&line_end=0' title='Edit in Cloud9 IDE'>[edit]</a>

View file

@ -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
</html>

View file

@ -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
*
*