More design progress

This commit is contained in:
Garen Torikian 2012-04-24 01:45:41 -07:00
commit 775af73f64
22 changed files with 1142 additions and 3978 deletions

View file

@ -1,134 +1,118 @@
-var dirPrefix = "./../";
-var dirPrefix = "./";
-var landingPage = 'false'
-var versions = []
mixin doctype
!!! 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]-->
!!! 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]-->
mixin head(guideTitle, additionalCSS)
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(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}
title #{guideTitle}
meta(name="generator", content="c9-doc-build")
meta(name="description", content="A complete and community-driven resource for learning and developing Node.js applications.")
meta(name="author", content="Garen J. Torikian")
meta(name="generator", content="c9-doc-build")
meta(name="description", content="A complete and community-driven resource for learning and developing Node.js applications.")
meta(name="author", content="Garen J. Torikian")
meta(name="viewport", content="width=device-width,initial-scale=1")
meta(name="viewport", content="width=device-width,initial-scale=1")
link(rel="stylesheet", href="#{dirPrefix}resources/csses/bootstrap.css")
link(rel="stylesheet", href="#{dirPrefix}resources/csses/prettify.css")
link(rel="stylesheet", href="#{dirPrefix}resources/csses/refguide_overrides.css")
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(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")
if additionalCSS
link(rel="stylesheet", href="#{additionalCSS}")
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")
script(src="#{dirPrefix}resources/javascripts/jquery.cookie.js")
script(src="#{dirPrefix}resources/javascripts/bootstrap-dropdown.js")
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")
mixin topBar(fullPath)
div.topbar
div.fill
div.container#topSection
ul.nav(class="leftnav")
li(class="dropdown", data-dropdown="dropdown")
a(class="dropdown-toggle", href="/")
//div(class="arrow-down")
ul(class="dropdown-menu")
li(class="dropdown versions")
ul.nav
form(id='searchbox', action='', class='pull-right')
input(class='span3', name='query', type='text', placeholder="Search Documentation", title="Search across all the documentation types")
span(id='currentVersion', style='display: none')
mixin makeVersionLabel(fullPath, true)
mixin navBar
div.navbar.navbar-fixed-top
div.navbar-inner
div.container
form(id='searchbox', action='', class='navbar-search pull-right')
input(class='span3', name='query', type='text', placeholder="Search Documentation", title="Search across all the documentation")
mixin header
header.jumbotron.masthead#overview
//- a(class="c9-sponsor", href="http://c9.io/", title="cloud9 ide", target="_blank")
div.inner
div.container
h1 Ace API Reference
p.lead
header.jumbotron.masthead#overview
div.ace_logo
a(href="http://ace.ajax.org")
img(src="#{dirPrefix}resources/images/ace_logo.png", alt="Ace Logo")
.container-fluid
.row-fluid
.span2
&nbsp;
.span10
h1 Ace API Reference
mixin footer
footer#footer
.container
.footer-text
footer#footer
.container
.footer-text
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/script.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
// 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/script.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'})})
//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'})})
mixin identifyBuild(tree, type)
landingPage = 'true'
-dirPrefix = './'
landingPage = 'true'
-dirPrefix = './'
mixin markdown(text, inline)
html = markdown(text, inline)
!= restoreNotes(html)
html = markdown(text, inline)
!= restoreNotes(html)
-function restoreNotes(html)
-var noteORegex = new RegExp('<note>', "ig")
-var noteCRegex = new RegExp('</note>', "ig")
-var warningORegex = new RegExp('<warning>', "ig")
-var warningCRegex = new RegExp('</warning>', "ig")
-var noteORegex = new RegExp('<note>', "ig")
-var noteCRegex = new RegExp('</note>', "ig")
-var warningORegex = new RegExp('<warning>', "ig")
-var warningCRegex = new RegExp('</warning>', "ig")
if (html.match(noteORegex))
-html = html.replace(noteORegex, "<div class='alert-message block-message warning'>")
if (html.match(warningORegex))
-html = html.replace(warningORegex, "<div class='alert-message block-message error'>")
if (html.match(noteORegex))
-html = html.replace(noteORegex, "<div class='alert-message block-message warning'>")
if (html.match(warningORegex))
-html = html.replace(warningORegex, "<div class='alert-message block-message error'>")
if (html.match(noteCRegex))
-html = html.replace(noteCRegex, "</div>")
if (html.match(warningCRegex))
-html = html.replace(warningCRegex, "</div>")
if (html.match(noteCRegex))
-html = html.replace(noteCRegex, "</div>")
if (html.match(warningCRegex))
-html = html.replace(warningCRegex, "</div>")
!= html
!= html
mixin formatGHHref(url, type)
url = url.substring(url.indexOf("src/") + 4)
if type == 'nodejs_ref_guide'
url = url.substring(0, url.lastIndexOf("#"))
url = 'src/' + url
else if type == 'nodejs_dev_guide'
url = 'src/' + url
url = url.substring(url.indexOf("src/") + 4)
if type == 'nodejs_ref_guide'
url = url.substring(0, url.lastIndexOf("#"))
url = 'src/' + url
else if type == 'nodejs_dev_guide'
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>
mixin makeVersionLabel(fullPath, showText)
-if (fullPath.indexOf("latest") >= 0)
-if (!showText)
!= '0.6.9'
else
!= 'latest'
-else
!= fullPath.match(/\d\.\d\.\d/)
-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>