Pupdate
This commit is contained in:
parent
841a715deb
commit
28b5be76c5
37 changed files with 1717 additions and 1437 deletions
|
|
@ -18,7 +18,8 @@ var options = {
|
|||
assets : "./resources/ace/skeleton",
|
||||
additionalObjs : "./additionalObjs.json",
|
||||
exclude : ["**/*_test.js", "**/mode/**", "**/test/**", "**/theme/**", "**/worker/**"],
|
||||
index : "./index.md"
|
||||
index : "./index.md",
|
||||
disableTests: true
|
||||
};
|
||||
|
||||
files = [srcPath];
|
||||
|
|
@ -28,7 +29,7 @@ panino.parse(files, options, function (err, ast) {
|
|||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
panino.render('html', ast, options, function (err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
|
|
|
|||
|
|
@ -146,6 +146,14 @@ blockquote p{
|
|||
Menu venue
|
||||
*/
|
||||
|
||||
form.navbar-search {
|
||||
float: none;
|
||||
}
|
||||
|
||||
h3.api_title {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
ul.menu {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
|
@ -227,7 +235,6 @@ ul.menu {
|
|||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.35); */
|
||||
padding-bottom: 15px;
|
||||
/* height: 31px;*/
|
||||
top: 40px;
|
||||
position: fixed;
|
||||
}
|
||||
.shadow.members{
|
||||
|
|
@ -275,7 +282,7 @@ ul.menu {
|
|||
.srolled .membersContent {
|
||||
/*top : 0;*/
|
||||
width : 695px;
|
||||
padding-left : 305px;
|
||||
padding-left : 407px;
|
||||
margin : 0 auto 0 auto;
|
||||
}
|
||||
.membersBackground {
|
||||
|
|
@ -532,7 +539,6 @@ header.filler {
|
|||
}
|
||||
|
||||
#documentation article.article {
|
||||
/* border-bottom: 1px solid #e9e9e9;*/
|
||||
border-top: 1px solid #e9e9e9;
|
||||
padding: 16px 10px 2px;
|
||||
}
|
||||
|
|
@ -773,9 +779,32 @@ li.signature {
|
|||
font-size: 24px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#documentation h3.methodToggle {
|
||||
margin: 0;
|
||||
#documentation i.methodToggle {
|
||||
cursor: pointer;
|
||||
color: #9f9f9f;
|
||||
padding-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
#documentation i.methodToggle.methodToggleHover {
|
||||
text-shadow: 0 0 10px #4699d5;
|
||||
color: #4699d5;
|
||||
}
|
||||
#documentation i.methodToggle.active {
|
||||
text-shadow: 0 0 10px #4699d5;
|
||||
color: #4699d5;
|
||||
/* Safari */
|
||||
-webkit-transform: rotate(45deg);
|
||||
|
||||
/* Firefox */
|
||||
-moz-transform: rotate(45deg);
|
||||
|
||||
/* IE */
|
||||
-ms-transform: rotate(45deg);
|
||||
|
||||
/* Opera */
|
||||
-o-transform: rotate(45deg);
|
||||
}
|
||||
|
||||
#documentation h3.sectionHeader {
|
||||
margin: 10px 0 17px 0;
|
||||
line-height : 24px;
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
.pln { color: #000 } /* plain text */
|
||||
|
||||
@media screen {
|
||||
.str { color: #2e6a40 } /* string content */
|
||||
.kwd { color: #214afc } /* a keyword */
|
||||
.com { color: #4c886b } /* a comment */
|
||||
.typ { color: #1130ad } /* a type name */
|
||||
.lit { color: #1130ad } /* a literal value */
|
||||
/* punctuation, lisp open bracket, lisp close bracket */
|
||||
.pun, .opn, .clo { color: #2d0603 }
|
||||
.tag { color: #008 } /* a markup tag name */
|
||||
.atn { color: #606 } /* a markup attribute name */
|
||||
.atv { color: #080 } /* a markup attribute value */
|
||||
.dec, .var { color: #606 } /* a declaration; a variable name */
|
||||
.fun { color: #1130ad } /* a function name */
|
||||
}
|
||||
|
||||
/* Use higher contrast and text-weight for printable form. */
|
||||
@media print, projection {
|
||||
.str { color: #060 }
|
||||
.kwd { color: #006; font-weight: bold }
|
||||
.com { color: #600; font-style: italic }
|
||||
.typ { color: #404; font-weight: bold }
|
||||
.lit { color: #044 }
|
||||
.pun, .opn, .clo { color: #440 }
|
||||
.tag { color: #006; font-weight: bold }
|
||||
.atn { color: #404 }
|
||||
.atv { color: #060 }
|
||||
}
|
||||
|
||||
/* Put a border around prettyprinted code snippets. */
|
||||
/*pre.prettyprint { padding: 2px; }*/
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */`
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8 { list-style-type: none }
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 { background: #eee }
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
$(function() {
|
||||
$(document).ready(function () {
|
||||
// when hovering over arrow, add highlight (only if inactive)
|
||||
$("h3.methodToggle").hover(function () {
|
||||
if (!$("h3.methodToggle").hasClass('active'))
|
||||
$("i.methodToggle").hover(function () {
|
||||
if (!$("i.methodToggle").hasClass('active'))
|
||||
$(this).addClass("methodToggleHover");
|
||||
},
|
||||
function () {
|
||||
|
|
@ -10,26 +10,45 @@ $(function() {
|
|||
);
|
||||
|
||||
// after expanding the hidden description, hide the ellipsis
|
||||
$('.signature-call, .signature-returns', '.signature').click(function() {
|
||||
$("i.methodToggle").click(function() {
|
||||
var $article = $(this).closest('.article'),
|
||||
$arrow = $('h3.methodClicker', $article);
|
||||
$arrow = $('i.methodClicker', $article);
|
||||
|
||||
if (!$article.hasClass('methodToggleOpen') || this.force) {
|
||||
$article.addClass('methodToggleOpen');
|
||||
$arrow.removeClass('inactive').addClass('active');
|
||||
|
||||
var data = location.hash = $arrow[0].id.replace(/^js_/, "");
|
||||
var data = $arrow[0].id.replace(/^js_/, "");
|
||||
location.hash = data + "#nav=api";
|
||||
scrollTo(null, data);
|
||||
}
|
||||
else {
|
||||
$article.removeClass('methodToggleOpen');
|
||||
$arrow.removeClass('active').addClass('inactive');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$('.signature-call, .signature-returns', '.signature').click(function() {
|
||||
var $article = $(this).closest('.article'),
|
||||
$arrow = $('i.methodClicker', $article);
|
||||
|
||||
if (!$article.hasClass('methodToggleOpen') || this.force) {
|
||||
$article.addClass('methodToggleOpen');
|
||||
$arrow.removeClass('inactive').addClass('active');
|
||||
|
||||
var data = $arrow[0].id.replace(/^js_/, "");
|
||||
location.hash = data + "#nav=api";
|
||||
scrollTo(null, data);
|
||||
}
|
||||
else {
|
||||
$article.removeClass('methodToggleOpen');
|
||||
$arrow.removeClass('active').addClass('inactive');
|
||||
}
|
||||
});
|
||||
|
||||
$('.related-to', '.metaInfo').click(function(){
|
||||
location.hash = $(this).find('a').attr('href').split('#')[1];
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ var disqus_identifier = fileName;
|
|||
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
|
|
@ -11,15 +11,6 @@ $(function () {
|
|||
$selNavLink.addClass('currentItem');
|
||||
}
|
||||
|
||||
// init prettyprint
|
||||
$('pre > code').addClass('prettyprint');
|
||||
prettyPrint();
|
||||
|
||||
var baseTitle = document.title,
|
||||
// base (general) part of title
|
||||
pathName = window.location.pathname,
|
||||
fileName = pathName.substring(window.location.pathname.lastIndexOf("/") + 1);
|
||||
|
||||
if (window.addEventListener) window.addEventListener('load', loadCallback, true);
|
||||
else window.attachEvent('load', loadCallback, true);
|
||||
|
||||
|
|
@ -31,7 +22,6 @@ $(function () {
|
|||
if (query) {
|
||||
input.value = "";
|
||||
input.blur();
|
||||
var currentVersion = $('#currentVersion').text();
|
||||
var url = "https://www.google.com/search?q=" + encodeURIComponent("site:ace.ajax.org/api" + " " + query);
|
||||
window.open(url);
|
||||
}
|
||||
|
|
@ -79,11 +69,10 @@ $(document).ready(function () {
|
|||
else sx = 0;
|
||||
|
||||
$('.members').each(function (i) {
|
||||
var position = $(this).position();
|
||||
var $classContent = $(this).closest('.classContent');
|
||||
|
||||
$(this).scrollspy({
|
||||
min: $classContent.position().top - 35,
|
||||
min: $classContent.position().top + 5,
|
||||
max: $classContent.position().top + $classContent.height() - 35,
|
||||
onEnter: function (element, position) {
|
||||
var $pagination = $(element);
|
||||
|
|
@ -94,8 +83,7 @@ $(document).ready(function () {
|
|||
$paginationContent.css('top', 0);
|
||||
|
||||
$pagination.addClass('shadow').stop().css({
|
||||
height: 31,
|
||||
'top': 33
|
||||
height: 31
|
||||
}).closest('.classContent').addClass('srolled');
|
||||
|
||||
$tabs.addClass('tabsSansBorder');
|
||||
|
|
@ -133,7 +121,7 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
$('span.methodClicker, article.article, h3.methodClicker').each(function () {
|
||||
/*$('span.methodClicker, article.article, i.methodClicker').each(function () {
|
||||
var a = $(this);
|
||||
var constructorPos = a.attr("id").indexOf("new ");
|
||||
|
||||
|
|
@ -144,28 +132,21 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
a.attr("id", objName);
|
||||
});
|
||||
});*/
|
||||
|
||||
$('.brand').parent('.dropdown').hover(
|
||||
|
||||
function () {
|
||||
$(this).addClass('open');
|
||||
}, function () {
|
||||
clearMenus();
|
||||
});
|
||||
|
||||
$('.versions').hover(
|
||||
|
||||
function () {
|
||||
$(this).addClass('open');
|
||||
}, function () {
|
||||
clearMenus();
|
||||
});
|
||||
|
||||
function showMethodContent() {
|
||||
if (!location.hash) return;
|
||||
|
||||
var $clickerEl = $('span#' + location.hash.replace(/^#/, '').replace(/\./g, '\\.'));
|
||||
var locationHash = location.hash.replace(/^#/, '').replace(/\./g, '\\.');
|
||||
var equalsPos = location.hash.indexOf("=");
|
||||
|
||||
if (equalsPos >=0) {
|
||||
locationHash = locationHash.substring(0, location.hash.indexOf("="));
|
||||
}
|
||||
|
||||
var $clickerEl = $('span#' + locationHash);
|
||||
if ($clickerEl.length > 0 && $clickerEl.hasClass('methodClicker')) {
|
||||
var p = $clickerEl.parent();
|
||||
p[0].force = true;
|
||||
|
|
|
|||
42
doc/resources/ace/templates/ace_menu.jade
Executable file → Normal file
42
doc/resources/ace/templates/ace_menu.jade
Executable file → Normal file
|
|
@ -1,61 +1,59 @@
|
|||
div#well
|
||||
|
||||
h3 Ace Reference
|
||||
|
||||
div.swirl_divider
|
||||
form(id='searchbox', action='', class='navbar-search')
|
||||
input(class='search-query span3', name='query', type='text', placeholder="Search the API", title="Search across all the documentation")
|
||||
|
||||
ul.menu
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="ace.html") Ace
|
||||
a(class="menuLink namespace", href="ace.html#nav=api") Ace
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="anchor.html") Anchor
|
||||
a(class="menuLink namespace", href="anchor.html#nav=api") Anchor
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="background_tokenizer.html") BackgroundTokenizer
|
||||
a(class="menuLink namespace", href="background_tokenizer.html#nav=api") BackgroundTokenizer
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="document.html") Document
|
||||
a(class="menuLink namespace", href="document.html#nav=api") Document
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="edit_session.html") EditSession
|
||||
a(class="menuLink namespace", href="edit_session.html#nav=api") EditSession
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="editor.html") Editor
|
||||
a(class="menuLink namespace", href="editor.html#nav=api") Editor
|
||||
|
||||
//- probably not needing doc a(class="menuLink namespace", href="multi_select.html") MultiSelect
|
||||
//- probably not needing doc a(class="menuLink namespace", href="multi_select.html#nav=api") MultiSelect
|
||||
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="placeholder.html") PlaceHolder
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="placeholder.html#nav=api") PlaceHolder
|
||||
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="range.html") Range
|
||||
a(class="menuLink namespace", href="range.html#nav=api") Range
|
||||
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="renderloop.html") RenderLoop
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="renderloop.html#nav=api") RenderLoop
|
||||
|
||||
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="scrollbar.html") Scrollbar
|
||||
a(class="menuLink namespace", href="scrollbar.html#nav=api") Scrollbar
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="search.html") Search
|
||||
a(class="menuLink namespace", href="search.html#nav=api") Search
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="selection.html") Selection
|
||||
a(class="menuLink namespace", href="selection.html#nav=api") Selection
|
||||
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="split.html") Split
|
||||
//- not actually doc'ed yet a(class="menuLink namespace", href="split.html#nav=api") Split
|
||||
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="token_iterator.html") TokenIterator
|
||||
a(class="menuLink namespace", href="token_iterator.html#nav=api") TokenIterator
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="tokenizer.html") Tokenizer
|
||||
a(class="menuLink namespace", href="tokenizer.html#nav=api") Tokenizer
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="undomanager.html") UndoManager
|
||||
a(class="menuLink namespace", href="undomanager.html#nav=api") UndoManager
|
||||
li
|
||||
div.menu-item
|
||||
a(class="menuLink namespace", href="virtual_renderer.html") VirtualRenderer
|
||||
a(class="menuLink namespace", href="virtual_renderer.html#nav=api") VirtualRenderer
|
||||
|
|
@ -4,27 +4,46 @@ include lib
|
|||
mixin doctype
|
||||
|
||||
html(xmlns="http://www.w3.org/1999/xhtml")
|
||||
head
|
||||
mixin head
|
||||
|
||||
body
|
||||
mixin navBar
|
||||
#nonFooter
|
||||
#wrapper
|
||||
.content
|
||||
.row.centerpiece
|
||||
.span3#sidebarContainer
|
||||
#sidebar
|
||||
include ace_menu.jade
|
||||
.span9#mainContent
|
||||
#documentation
|
||||
-if (isIndex)
|
||||
!= content
|
||||
-else
|
||||
mixin api()
|
||||
|
||||
div(id="disqus_thread")
|
||||
.push
|
||||
mixin footer
|
||||
|
||||
mixin endingScripts
|
||||
head
|
||||
mixin head
|
||||
|
||||
body
|
||||
#wrapper
|
||||
.content
|
||||
.column2
|
||||
#top_container.collapse
|
||||
h1 The high performance code editor for the web.
|
||||
#page_logo
|
||||
img(src='doc/site/images/logo.png')
|
||||
div(style='clear: both;')
|
||||
ul#tabnav.nav.nav-pills
|
||||
li
|
||||
a(href='/')
|
||||
img(src='.//resources/images/ace_logo_menu.png')
|
||||
li
|
||||
a(href='../index.html#nav=about', data-toggle='tab') About
|
||||
li
|
||||
a(href='../index.html#nav=embedding', data-toggle='tab') Embedding Guide
|
||||
li
|
||||
a(href='../index.html#nav=howto', data-toggle='tab') How-To Guide
|
||||
li.active
|
||||
a(href='index.html') API Reference
|
||||
li
|
||||
a(href='../index.html#nav=production', data-toggle='tab') ACE in Production
|
||||
li
|
||||
a(href='../index.html#nav=support', data-toggle='tab') Support
|
||||
.tab-content
|
||||
.row.centerpiece
|
||||
.span3#sidebarContainer
|
||||
#sidebar
|
||||
include ace_menu.jade
|
||||
.span9#mainContent
|
||||
#documentation
|
||||
-if (isIndex)
|
||||
!= content
|
||||
-else
|
||||
mixin api()
|
||||
|
||||
div(id="disqus_thread")
|
||||
|
||||
mixin endingScripts
|
||||
|
|
@ -77,6 +77,7 @@ mixin article(obj, parents)
|
|||
.memberContent
|
||||
if obj.signatures
|
||||
div.title
|
||||
i(id='#{obj.path}', class='methodToggle methodClicker inactive icon-caret-right')
|
||||
ul.signatures
|
||||
-var loops = 0;
|
||||
for sig in obj.signatures
|
||||
|
|
@ -131,8 +132,7 @@ mixin article(obj, parents)
|
|||
div(id='ellipsis_#{obj.path}', class='ellipsis_description')
|
||||
mixin markdown(obj.short_description)
|
||||
|
||||
h3(id='#{obj.path}', class='methodToggle methodClicker inactive')
|
||||
|
||||
|
||||
div.description
|
||||
|
||||
mixin markdown(obj.description)
|
||||
|
|
@ -174,7 +174,7 @@ mixin article(obj, parents)
|
|||
h3.sectionHeader Events
|
||||
mixin article(child, parents.concat(obj), 'event')
|
||||
|
||||
for child in obj.children.filter(function(x){return x.type === 'class method'})
|
||||
for child in obj.children.filter(function(x){return x.type === 'class method'})
|
||||
- if (!methodSection)
|
||||
- methodSection = true
|
||||
h3.sectionHeader Methods
|
||||
|
|
|
|||
|
|
@ -1,86 +1,58 @@
|
|||
-var dirPrefix = "./";
|
||||
-var sitePrefix = "../doc/site/";
|
||||
-var landingPage = 'false'
|
||||
-var versions = []
|
||||
|
||||
mixin doctype
|
||||
!!! 5
|
||||
!!! 5
|
||||
|
||||
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
|
||||
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
|
||||
<!--[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
|
||||
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")
|
||||
meta(http-equiv='Content-Type', content='text/html; charset=UTF-8')
|
||||
|
||||
-if (isIndex)
|
||||
title #{title}
|
||||
-else
|
||||
title #{classId} - #{title}
|
||||
-if (isIndex)
|
||||
title #{title}
|
||||
-else
|
||||
title #{classId} - #{title}
|
||||
|
||||
meta(name="generator", content="c9-doc-build")
|
||||
meta(name="description", content="Ace API documentation for the online code editor.")
|
||||
meta(name="author", content="Garen J. Torikian")
|
||||
meta(name="generator", content="panino-doc-build")
|
||||
meta(name="description", content="Ace API documentation for the online code editor")
|
||||
meta(name="author", content="Garen J. Torikian")
|
||||
|
||||
meta(name="viewport", content="width=device-width,initial-scale=1")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.js")
|
||||
script(src='#{sitePrefix}/js/main.js')
|
||||
link(rel='stylesheet', media='all and (max-device-width: 480px)', href='doc/site/iphone.css')
|
||||
link(rel='stylesheet', media='all and (min-device-width: 481px) and (max-device-width: 1024px)', href='doc/site/iphone.css')
|
||||
link(href='#{dirPrefix}resources/ace/skeleton/images/favicon.ico', rel='icon', type='image/x-icon')
|
||||
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/bootstrap.min.css")
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/prettify.css")
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/ace_api.css")
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/bootstrap.min.css")
|
||||
link(href='#{sitePrefix}/style.css', rel='stylesheet', type='text/css')
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/ace_api.css")
|
||||
link(rel="stylesheet", href="#{dirPrefix}resources/csses/font-awesome.css")
|
||||
|
||||
link(href="#{dirPrefix}resources/images/favicon.ico", rel="icon", type="image/x-icon")
|
||||
link(href="#{dirPrefix}resources/images/favicon.ico", rel="icon", type="image/x-icon")
|
||||
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/clicker.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.collapse.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.cookie.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/bootstrap-dropdown.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery-scrollspy.js")
|
||||
script(script src="#{dirPrefix}resources/javascripts/prettify-extension.js")
|
||||
script(src='#{dirPrefix}resources/javascripts/bbq.js')
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.collapse.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery.cookie.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/bootstrap-dropdown.js")
|
||||
script(src='#{dirPrefix}resources/javascripts/bootstrap-tab.js')
|
||||
|
||||
mixin navBar
|
||||
div.navbar.navbar-fixed-top
|
||||
div.navbar-inner
|
||||
div#topSection.container
|
||||
span.brand
|
||||
|
||||
ul.nav.topLinks
|
||||
li#ace_site
|
||||
a(href='../index.html') Ace
|
||||
li#ace_api.active
|
||||
a(href='index.html') Ace API Reference
|
||||
form(id='searchbox', action='', class='navbar-search pull-right')
|
||||
input(class='search-query span3', name='query', type='text', placeholder="Search the API", title="Search across all the documentation")
|
||||
|
||||
mixin footer
|
||||
div#footer
|
||||
.footerInner
|
||||
.footer-text.pull-right
|
||||
p
|
||||
<a href="http://www.c9.io">About Cloud9</a> | Ace & Cloud9 IDE are © <a href="http://ajax.org">Ajax.org</a> 2012
|
||||
|
||||
mixin endingScripts
|
||||
// scripts concatenated and minified via ant build script
|
||||
<script defer src="#{dirPrefix}resources/javascripts/plugins.js"></script>
|
||||
<script defer src="#{dirPrefix}resources/javascripts/prettify.js"></script>
|
||||
<script defer src="#{dirPrefix}resources/javascripts/prettify-extension.js"></script>
|
||||
<script defer src="#{dirPrefix}resources/javascripts/ux.js"></script>
|
||||
<script defer src="#{dirPrefix}resources/javascripts/disqus-ext.js"></script>
|
||||
<script defer src="#{dirPrefix}resources/javascripts/ga.js"></script>
|
||||
//-<script defer src="tree.js"></script>
|
||||
// end scripts
|
||||
|
||||
//if lt IE 7
|
||||
script(src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js")
|
||||
script
|
||||
window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
|
||||
|
||||
script(defer, src="#{dirPrefix}resources/javascripts/ux.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/clicker.js")
|
||||
script(src="#{dirPrefix}resources/javascripts/jquery-scrollspy.js")
|
||||
script(defer, src="#{dirPrefix}resources/javascripts/disqus-ext.js")
|
||||
script(defer, src="#{dirPrefix}resources/javascripts/ga.js")
|
||||
|
||||
mixin identifyBuild(tree, type)
|
||||
landingPage = 'true'
|
||||
-dirPrefix = './'
|
||||
landingPage = 'true'
|
||||
-dirPrefix = './'
|
||||
|
||||
mixin markdown(text, inline)
|
||||
!= markdown(text, inline)
|
||||
!= markdown(text, inline)
|
||||
|
|
@ -1,17 +1,33 @@
|
|||
$(function() {
|
||||
hljs.initHighlighting();
|
||||
|
||||
var editor;
|
||||
$(function() {
|
||||
this.isApi = location.href.indexOf("/api") >= 0;
|
||||
if (!this.isApi) {
|
||||
hljs.initHighlighting();
|
||||
editor = ace.edit("ace_editor_demo");
|
||||
var javascriptMode = require("ace/mode/javascript").Mode;
|
||||
editor.getSession().setMode(new javascriptMode());
|
||||
}
|
||||
|
||||
$("ul.menu-list li").click(function(e) {
|
||||
if (e.target.tagName === "LI") {
|
||||
console.log($(this).find("a"));
|
||||
window.location = $(this).find("a").attr("href");
|
||||
}
|
||||
else if (e.target.tagName === "P") {
|
||||
var anchor = $(e.target).siblings();
|
||||
window.location = anchor.attr("href");
|
||||
}
|
||||
});
|
||||
var tabs = $("#tabnav"),
|
||||
tab_a_selector = "a";
|
||||
|
||||
var firstLoad = true;
|
||||
var firstLoad = true;
|
||||
var _self = this;
|
||||
tabs.find(tab_a_selector).click(function(e) {
|
||||
if (_self.isApi || $(this).attr("href").indexOf("/api/") >= 0) {
|
||||
window.location = $(this).attr("href");
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
if ($(this).attr("href") === "/")
|
||||
return;
|
||||
|
|
@ -39,7 +55,8 @@
|
|||
}, 400);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(this).tab("show");
|
||||
|
||||
var state = {};
|
||||
|
|
@ -47,10 +64,12 @@
|
|||
$.bbq.pushState(state);
|
||||
});
|
||||
|
||||
$(window).on("hashchange", function(e) {
|
||||
tabs.each(function() {
|
||||
var idx = $.bbq.getState("nav") || "about";
|
||||
$(this).find(tab_a_selector + "[href='#" + idx + "']").triggerHandler('click');
|
||||
});
|
||||
}).trigger("hashchange");
|
||||
});
|
||||
if (!this.isApi) {
|
||||
$(window).on("hashchange", function(e) {
|
||||
tabs.each(function() {
|
||||
var idx = $.bbq.getState("nav") || "about";
|
||||
$(this).find(tab_a_selector + "[href='#" + idx + "']").triggerHandler('click');
|
||||
});
|
||||
}).trigger("hashchange");
|
||||
}
|
||||
});
|
||||
|
|
@ -5,6 +5,22 @@ body {
|
|||
font-family: Helvetica, Arial;
|
||||
}
|
||||
|
||||
#ace_editor_wrapper {
|
||||
height: 275px;
|
||||
position: relative;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#ace_editor_demo {
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
bottom: 1px;
|
||||
right: 1px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: Helvetica;
|
||||
font-weight: 100;
|
||||
|
|
@ -37,13 +53,12 @@ H4 {
|
|||
P {
|
||||
padding:13px 0;
|
||||
margin:0;
|
||||
line-height:22px;
|
||||
font-size: 16px;
|
||||
line-height:21px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
UL{
|
||||
line-height : 22px;
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#header {
|
||||
|
|
@ -188,6 +203,7 @@ UL.content-list {
|
|||
|
||||
UL.content-list li {
|
||||
padding-left: 10px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
ul.menu-list {
|
||||
|
|
@ -235,20 +251,62 @@ ul.menu-list li:hover {
|
|||
-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
UL.menu-list LI a {
|
||||
ul.menu-list li a {
|
||||
position: absolute;
|
||||
bottom: 3px;
|
||||
left: 8px;
|
||||
color: #FFF;
|
||||
text-align: left;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.8);
|
||||
width: 100%;
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
line-height: 12px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
UL.menu-list LI a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
li#add_your_site p {
|
||||
font-size: 32px;
|
||||
border: 3px solid rgb(52, 160, 52);
|
||||
color: rgb(52, 160, 52);
|
||||
border-radius: 34px;
|
||||
padding: 4px 4px 4px 7px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
line-height: 18px;
|
||||
position: relative;
|
||||
left: 31px;
|
||||
top: 20px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
ul.menu-list li#add_your_site a {
|
||||
color: #A3EEA3;
|
||||
}
|
||||
|
||||
/* This is the animation code. */
|
||||
@-webkit-keyframes example {
|
||||
0% { -webkit-transform: rotate(0deg); }
|
||||
25% { -webkit-transform: rotate(3deg); }
|
||||
50% { -webkit-transform: rotate(0deg); }
|
||||
75% { -webkit-transform: rotate(-3deg); }
|
||||
}
|
||||
|
||||
/* This is the element that we apply the animation to. */
|
||||
li#add_your_site {
|
||||
-webkit-animation-name: example;
|
||||
-webkit-animation-duration: 0.4s;
|
||||
-webkit-animation-timing-function: ease; /* ease is the default */
|
||||
-webkit-animation-delay: 0s; /* 0 is the default */
|
||||
-webkit-animation-iteration-count: infinite; /* 1 is the default */
|
||||
-webkit-animation-direction: alternate; /* normal is the default */
|
||||
}
|
||||
|
||||
A {
|
||||
color:#2557b4;
|
||||
text-decoration:none;
|
||||
|
|
@ -346,11 +404,11 @@ UL.menu-footer LI A:hover {
|
|||
}
|
||||
|
||||
.tab-content {
|
||||
margin-bottom: 100px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.tab-content > .active, .pill-content > .active {
|
||||
padding: 35px 30px;
|
||||
padding: 25px 30px;
|
||||
}
|
||||
|
||||
#top_container, .tab-content > .active, .pill-content > .active {
|
||||
|
|
@ -362,4 +420,33 @@ UL.menu-footer LI A:hover {
|
|||
|
||||
pre .xml .javascript, pre .xml .css {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#embed_link {
|
||||
text-align: right;
|
||||
}
|
||||
#embed_link a {
|
||||
color: #059C05;
|
||||
font-weight: 100;
|
||||
font-family: helvetica;
|
||||
text-transform: uppercase;
|
||||
font-size: 13px;
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
p.highlight_note {
|
||||
padding: 8px 35px 8px 14px;
|
||||
margin-top: 10px;
|
||||
color: #A0762E;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
background-color: #FCF8E3;
|
||||
border: 1px solid #CA9C44;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
p.highlight_note a {
|
||||
color: #537CC7;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue