Tweak styles to match new Panino

This commit is contained in:
Garen Torikian 2012-08-31 16:13:38 -07:00
commit d576d21154
24 changed files with 411 additions and 401 deletions

View file

@ -485,7 +485,7 @@ header.filler {
.centerpiece {
background: url(../images/sidebar_border.png) repeat-y 230px 0;
height: 100%;
min-height: 100%;
}
/*

View file

@ -1,6 +1,20 @@
$(function () {
'use strict';
var pagePath = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1);
// select current page in sidenav and set up prev/next links if they exist
var $selNavLink = $('#sidebar').find('a[href="' + pagePath + '"]');
if ($selNavLink.length) {
//$selListItem = $selNavLink.closest('li');
$selNavLink.addClass('currentItem');
}
// init prettyprint
$('pre > code').addClass('prettyprint');
prettyPrint();
var baseTitle = document.title,
// base (general) part of title
pathName = window.location.pathname,
@ -25,25 +39,12 @@ $(function () {
};
}
var fileNameRE = new RegExp("^" + fileName, "i");
$('a.menuLink').each(function (index) {
if ($(this).attr("href").match(fileNameRE)) {
$(this).addClass("currentItem");
return false;
}
});
// init search
$('#search')
// prevent from form submit
.on('submit', function () {
return false;
}).find('input');
// init prettyprint
$('pre > code').addClass('prettyprint');
prettyPrint();
});
$(document).ready(function () {
@ -83,7 +84,7 @@ $(document).ready(function () {
$(this).scrollspy({
min: $classContent.position().top - 35,
max: $classContent.position().top + $classContent.height(),
max: $classContent.position().top + $classContent.height() - 35,
onEnter: function (element, position) {
var $pagination = $(element);
var $paginationContent = $('.membersContent pos' + i);

View file

@ -1,256 +1,264 @@
- var methodSection = constructorSection = propertySection = eventSection = false;
- var methodSection, constructorSection, propertySection, eventSection;
-function renameMemberTitle(title, count)
if title.indexOf("ethods") >= 0
span Functions (#{count})
else if title.indexOf("ropert") >= 0
span Properties (#{count})
else
span #{title} (#{count})
if title.indexOf("ethods") >= 0
span Functions (#{count})
else if title.indexOf("ropert") >= 0
span Properties (#{count})
else
span #{title} (#{count})
mixin article(obj, parents)
if typeof obj === 'string'
obj = list[obj]
if typeof obj === 'string'
obj = list[obj]
title = obj.id + (obj.type ? ' (' + obj.type + ')' : '')
article.article(id=obj.path, data-title=title)
title = obj.path + (obj.type ? ' (' + obj.type + ')' : '')
article.article(id=obj.path, data-title=title)
if obj.type === 'section' || obj.type === 'namespace' || obj.type === 'class' || obj.type === 'mixin'
if obj.type === 'section' || obj.type === 'namespace' || obj.type === 'class' || obj.type === 'mixin'
if obj.stability
mixin markdown(">" + obj.stability)
if obj.description
.section.description
.memberContent
mixin markdown(obj.description)
if obj.description
.section.description
.memberContent
mixin markdown(obj.description)
collection = obj.children.filter(function(x){return x.type === 'namespace'});
if collection.length
.section.namespaces
//
h3 Namespaces
.memberContent
mixin short_description_list(collection)
collection = obj.children.filter(function(x){return x.type === 'namespace'});
if collection.length
.section.namespaces
//
h3 Namespaces
.memberContent
mixin short_description_list(collection)
collection = obj.children.filter(function(x){return x.type === 'mixin'});
if collection.length
.section.mixins
//
h3 Mixins
.memberContent
mixin short_description_list(collection)
collection = obj.children.filter(function(x){return x.type === 'mixin'});
if collection.length
.section.mixins
//
h3 Mixins
.memberContent
mixin short_description_list(collection)
if obj.type === 'class'
if obj.type === 'class'
if obj.superclass
.section.superclass
// h3
Superclass
.memberContent
mixin link(obj.superclass)
if obj.superclass
.section.superclass
// h3
Superclass
.memberContent
mixin link(obj.superclass)
if obj.subclasses.length
.section.subclasses
// h3
Subclasses
.memberContent
mixin links(obj.subclasses)
if obj.subclasses.length
.section.subclasses
// h3
Subclasses
.memberContent
mixin links(obj.subclasses)
if obj.included_mixins
.section.mixins
// h3
Includes
.memberContent
mixin links(obj.included_mixins)
if obj.included_mixins
.section.mixins
// h3
Includes
.memberContent
mixin links(obj.included_mixins)
collection = obj.children.filter(function(x){return x.type === 'utility'})
if collection.length
.section.utilities
// h3
Utilities
.memberContent
mixin links(collection)
else
collection = obj.children.filter(function(x){return x.type === 'utility'})
if collection.length
.section.utilities
// h3
Utilities
.memberContent
mixin links(collection)
else
.section.method
.memberContent
if obj.signatures
div.title
ul.signatures
-var loops = 0;
for sig in obj.signatures
li.signature
ul
li.signature-call!= signature(obj, sig, ["methodClicker"])
if sig.returns
li.signature-returns
ul.argument-types
for ret in sig.returns
li.argument-type!= returnLink(obj, ret, [])
-if (loops == 0)
-loops = 1 // ensure that we only print ONE meta info UL per signature (some methods have multiple signatures)
ul.metaInfo
if obj.readonly
li
span.label.read-only Read-Only
if obj.chainable
li
span.label.chainable Chainable
if obj.internal
li
span.label.internal Internal
if obj.deprecated
li
span.label.deprecated
| Deprecated
if obj.deprecated.from
|   (since #{obj.deprecated.from})
if obj.deprecated.off
|  and will be removed on #{obj.deprecated.off}
if obj.alias_of
li
span.label.alias.single
| Aliased as:
!= link(obj.alias_of)
else if obj.aliases.length
li
span.label.alias.multiple
| Aliased as:
ul.alias
for alias in obj.aliases
li
mixin link(alias)
.section.method
.memberContent
if obj.signatures
div.title
ul.signatures
-var loops = 0;
for sig in obj.signatures
li.signature
ul
li.signature-call!= signature(obj, sig, ["methodClicker"])
if sig.returns
li.signature-returns
ul.argument-types
for ret in sig.returns
li.argument-type!= returnLink(obj, ret, [])
-if (loops == 0)
-loops = 1 // ensure that we only print ONE meta info UL per signature (some methods have multiple signatures)
ul.metaInfo
if obj.readonly
li
span.label.read-only Read-Only
if obj.chainable
li
span.label.chainable Chainable
if obj.internal
li
span.label.internal Internal
if obj.deprecated
li
span.label.deprecated
| Deprecated
if obj.deprecated.from
|   (since #{obj.deprecated.from})
if obj.deprecated.off
|  and will be removed on #{obj.deprecated.off}
if obj.alias_of
li
span.label.alias.single
| Aliased as:
!= link(obj.alias_of)
else if obj.aliases.length
li
span.label.alias.multiple
| Aliased as: 
for alias in obj.aliases
mixin link(alias) 
if obj.related_to
li
span.label.related-to
| Related to
mixin link(obj.related_to)
div.sideToggler
if obj.related_to
li
span.label.related-to
| Related to:
!= link(obj.related_to)
div.sideToggler
div(id='ellipsis_#{obj.id}', class='ellipsis_description')
mixin markdown(obj.short_description)
div(id='ellipsis_#{obj.path}', class='ellipsis_description')
mixin markdown(obj.short_description)
h3(id='#{obj.id}', class='methodToggle methodClicker inactive')
   
div.description
h3(id='#{obj.path}', class='methodToggle methodClicker inactive')
   
div.description
mixin markdown(obj.description)
mixin markdown(obj.description)
if obj.bound && ~obj.bound.indexOf('#')
p.note.methodized
| This method can be called <em>either</em> as an
!= link(obj.bound, ['link-short'], 'instance method')
| <em>or</em> as a generic method. If calling as generic, pass the instance in as the first argument.
else if obj.bound && !~obj.bound.indexOf('#')
p.note.functionalized
| This method can be called <em>either</em> as an instance method <em>or</em> as a
!= link(obj.bound, ['link-short'], 'generic method')
|. If calling as generic, pass the instance in as the first argument.
if obj.bound && ~obj.bound.indexOf('#')
p.note.methodized
| This method can be called <em>either</em> as an
!= link(obj.bound, ['link-short'], 'instance method')
| <em>or</em> as a generic method. If calling as generic, pass the instance in as the first argument.
else if obj.bound && !~obj.bound.indexOf('#')
p.note.functionalized
| This method can be called <em>either</em> as an instance method <em>or</em> as a
!= link(obj.bound, ['link-short'], 'generic method')
|. If calling as generic, pass the instance in as the first argument.
if obj.arguments
h4 Arguments
!= argumentTable(obj.arguments, ["argument-list", "table", "table-striped", "table-bordered"])
if obj.returns
h4 Returns
!= returnTable(obj.returns, ["return-list", "table", "table-striped", "table-bordered"])
if obj.arguments
h4 Arguments
!= argumentTable(obj.arguments, ["argument-list", "table", "table-striped", "table-bordered"])
//- children
for child in obj.children.filter(function(x){return x.type === 'section'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'utility'})
mixin article(child, parents.concat(obj))
if obj.returns
h4 Returns
!= returnTable(obj.returns, ["return-list", "table", "table-striped", "table-bordered"])
for child in obj.children.filter(function(x){return x.type === 'constructor'})
- if (!constructorSection)
- constructorSection = true
h3.sectionHeader Constructors
mixin article(child, parents.concat(obj))
//- children
for child in obj.children.filter(function(x){return x.type === 'section'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'utility'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'namespace' || x.type === 'class' || x.type === 'mixin'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'constructor'})
- if (!constructorSection)
- constructorSection = true
h3.sectionHeader Constructors
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'event'})
- if (!eventSection)
- eventSection = true
h3.sectionHeader Events
mixin article(child, parents.concat(obj), 'event')
for child in obj.children.filter(function(x){return x.type === 'event'})
- if (!eventSection)
- eventSection = true
h3.sectionHeader Events
mixin article(child, parents.concat(obj), 'event')
for child in obj.children.filter(function(x){return x.type === 'class method'})
- if (!methodSection)
- methodSection = true
h3.sectionHeader Methods
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'class method'})
- if (!methodSection)
- methodSection = true
h3.sectionHeader Methods
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'class property'})
- if (!propertySection)
- propertySection = true
h3.sectionHeader Properties
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'class property'})
- if (!propertySection)
- propertySection = true
h3.sectionHeader Properties
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'instance method'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'instance property'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'constant'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'instance method'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'instance property'})
mixin article(child, parents.concat(obj))
for child in obj.children.filter(function(x){return x.type === 'constant'})
mixin article(child, parents.concat(obj))
mixin api()
-pos = 0
for obj in tree.children
.classContent
.membersBackground
div(class=' members pos#{pos}')
div(class=' membersContent pos#{pos}')
h1.memberHeader
-var heading = obj.path
span.name #{heading}
span.editInC9
mixin formatGHHref(obj.href, 'nodejs_ref_guide')
-if (true || obj.filename.indexOf("index") < 0)
ul(class='nav tabs pos#{pos}', data-tabs='tabs')
for selector, title in {'Events': ['event', 'events'], 'Constructors': ['constructor', 'constructors'], 'Class methods': ['class method', 'class_methods'], 'Class properties': ['class property', 'class_properties'], 'Instance methods': ['instance method', 'instance_methods'], 'Instance properties': ['instance property', 'instance_properties'], 'Constants': ['constant', 'constants']}
members = obj.children.filter(function(x){return x.type === selector[0]})
li(class="dropdown", data-dropdown="dropdown")
if members.length
a(href="\#", class="dropdown-toggle", data-toggle="dropdown")
!= renameMemberTitle(title, members.length)
b.caret
ul.dropdown-menu
for m in members
li(data-id='#{m.id}', class='memberLink')
mixin link(m, [], true)
-pos++
mixin article(obj, [])
-pos = 0
for obj in tree.children
-if (obj.subclasses.length == 0)
mixin render_starting_tabs(obj, pos)
-else
mixin render_starting_tabs(obj, pos)
for child in obj.children.filter(function(x){return x.type === 'namespace' || x.type === 'class' || x.type === 'mixin'})
-pos++
mixin render_starting_tabs(child, pos)
mixin render_starting_tabs(obj, pos)
.classContent
.membersBackground
div(class=' members pos#{pos}')
div(class=' membersContent pos#{pos}')
h1.memberHeader
-var heading = obj.path
span.name #{heading}
-if (pos >= 0)
span.editInC9
mixin formatGHHref(obj.file)
-if (true || obj.filename.indexOf("index") < 0)
ul(class='nav tabs pos#{pos}', data-tabs='tabs')
for selector, title in {'Events': ['event', 'events'], 'Constructors': ['constructor', 'constructors'], 'Class methods': ['class method', 'class_methods'], 'Class properties': ['class property', 'class_properties'], 'Instance methods': ['instance method', 'instance_methods'], 'Instance properties': ['instance property', 'instance_properties'], 'Constants': ['constant', 'constants']}
members = obj.children.filter(function(x){return x.type === selector[0]})
li(class="dropdown", data-dropdown="dropdown")
if members.length
a(href="\#", class="dropdown-toggle", data-toggle="dropdown")
!= renameMemberTitle(title, members.length)
b.caret
ul.dropdown-menu
for m in members
li(data-id='#{m.path}', class='memberLink')
mixin link(m, [], true)
-methodSection = constructorSection = propertySection = eventSection = false;
mixin article(obj, [])
mixin short_description_list(collection)
ul.method-details-list
for obj in collection
if typeof obj === 'string'
obj = list[obj]
li.method-description
h4
mixin link(obj)
if obj.short_description
mixin markdown(obj.short_description)
ul.method-details-list
for obj in collection
if typeof obj === 'string'
obj = list[obj]
li.method-description
h4
mixin link(obj)
if obj.short_description
mixin markdown(obj.short_description)
mixin link(obj, classes, short)
l = link(obj, classes, short)
!= l
l = link(obj, classes, short)
!= l
mixin links(collection)
ul.method-list
for obj in collection
li
mixin link(obj)
ul.method-list
for obj in collection
li
mixin link(obj)
mixin formatGHHref(url, type)
url = url.substring(url.indexOf("ace/lib"))
mixin formatGHHref(url)
url = url.substring(url.indexOf("ace/lib"))
-url = url.replace(/\/{2,}/g, "/").replace(/\//g,"%2F")
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a>
-url = url.replace(/\/{2,}/g, "/").replace(/\//g,"%2F")
<a href='http://c9.io/open/git/?url=git%3A%2F%2Fgithub.com%2Fajaxorg%2Face.git' title='Edit in Cloud9 IDE'>[edit]</a>