diff --git a/doc/additionalObjs.json b/doc/additionalObjs.json new file mode 100644 index 00000000..16545df7 --- /dev/null +++ b/doc/additionalObjs.json @@ -0,0 +1,7 @@ +{ + "DOMElement" : "https://developer.mozilla.org/en/DOM/element", + "Event" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/lib/event.js", + "TextMode" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/text.js", + "KeyBinding" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/keyboard/keybinding.js", + "Cursor" : "https://github.com/ajaxorg/ace/blob/master/lib/ace/layer/cursor.js" +} \ No newline at end of file diff --git a/doc/build.js b/doc/build.js index ef41483c..6b46c3e8 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/", "-r", "-t", "ACE API", "--skin", "./resources/ace/skins"], function(err) { +panino.main(["--path=" + srcPath, "-o", "./out/", "-a", "./additionalObjs.json", "-t", "Ace API Documentation", "--skin", "./resources/ace/"], function(err) { if (err) { console.error(err); process.exit(-1); diff --git a/doc/package.json b/doc/package.json index 76dc90fd..2d6e4acd 100644 --- a/doc/package.json +++ b/doc/package.json @@ -9,7 +9,7 @@ "node": "~0.6.0" }, "dependencies": { - "panino" : "~1.0.0" + "panino" : "~1.0.5" }, "devDependencies": {} } \ No newline at end of file diff --git a/doc/resources/ace/skins/skeleton/csses/refguide_overrides.css b/doc/resources/ace/skeleton/csses/ace_api.css similarity index 100% rename from doc/resources/ace/skins/skeleton/csses/refguide_overrides.css rename to doc/resources/ace/skeleton/csses/ace_api.css diff --git a/doc/resources/ace/skins/skeleton/csses/bootstrap.css b/doc/resources/ace/skeleton/csses/bootstrap.css similarity index 100% rename from doc/resources/ace/skins/skeleton/csses/bootstrap.css rename to doc/resources/ace/skeleton/csses/bootstrap.css diff --git a/doc/resources/ace/skins/skeleton/csses/prettify.css b/doc/resources/ace/skeleton/csses/prettify.css similarity index 100% rename from doc/resources/ace/skins/skeleton/csses/prettify.css rename to doc/resources/ace/skeleton/csses/prettify.css diff --git a/doc/resources/ace/skeleton/csses/refguide_overrides.css b/doc/resources/ace/skeleton/csses/refguide_overrides.css new file mode 100644 index 00000000..ebc96734 --- /dev/null +++ b/doc/resources/ace/skeleton/csses/refguide_overrides.css @@ -0,0 +1,1056 @@ +/* + Generic "affects everything" stuff +*/ +body { + min-width: 1010px; +} +body { + background: #ffffff url(../images/main-bg.png) 0 0 repeat; + color: #2d2d2d; +} + +ul { + font-size: 13px; +} + +li { + color: black; +} + +a, a:hover { + color : #00438a; +} + +code { +/* background-color: #fce68c;*/ + +/* font-size: 11px; + line-height: 16px; + font-family: 'Ubuntu Mono',Monaco,Consolas,monospace !important; + padding: 0; + + */ + font-size: 12px; + line-height: 16px; + font-family: 'Ubuntu Mono',Monaco,Consolas,monospace !important; + background-color: #F9F9F9; + border-radius: 3px 3px 3px 3px; + box-shadow: 0 0 2px #888888; + display: inline-block; + padding: 0 4px; + margin: 2px 1px; +} + +pre { + margin-top: 10px; + border-radius: none; + box-shadow: none; + background : white; + /*background : #f5f5f5; + border: 0;*/ + + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; + + padding: 5px; +} + +.method pre, .event pre, .property pre { + background : white; +} + +pre code { + background-color: transparent; + border-radius: none; + box-shadow: none; +} + +a code { + color: #00438a; +} + +h2 { + font-size: 26px; +} +p { + font-size: 13px; + line-height : 20px; + margin-bottom : 13px; +} +li p:last-child { + margin-bottom : 5px; +} + +blockquote p{ + font-size: 14px; + font-weight: 500; + line-height: 23px; + font-style: italic; +} + +.alert-message{ + margin-bottom : 13px; +} +/* + Header and shoulders +*/ + +#topSection { + margin: 0 auto; + width: 1000px; + position : relative; +} + +#topSection .leftnav{ + width : 286px; +} + +#topSection .dropdown { + margin-right: 0px; +} + +#topSection .versions { + margin-right: 0; +} + +.small_win #topSection { + width: 100%; +} +.small_win #topSection .dropdown { + margin-right: 40%; +} +.brand { + background: transparent url(../images/node-logo.png) no-repeat 13px 5px; +/* margin-top: 7px;*/ +/* height: 30px;*/ + width: 105px; + outline: none; + height: 40px; + padding: 0 10px !important; + border: none; + +/* height: 30px;*/ +} +.brand.dropdown-toggle:after { + content: none; + display: block; + height: 40px; + border: none; +} +.open .brand, +.brand:hover{ + background: rgba(255, 255, 255, 0.05) url(../images/node-logo.png) no-repeat 13px 5px !important; +} + +a.brand { + cursor: pointer; +} + +.masthead { + background: #55a500 url(../images/header-back.png) repeat-x 0 bottom; +} +.masthead .container { + width: 680px; + padding-left: 285px; + margin: 0 auto; +} +.jumbotron { + min-width: 1000px; + padding-top: 40px; + position: relative; +} + +.jumbotron .inner { +/* background: transparent url(../images/header-back.png) top center;*/ + padding: 45px 0; +/* -webkit-box-shadow: inset 0 10px 30px rgba(0,0,0,.3); + -moz-box-shadow: inset 0 10px 30px rgba(0,0,0,.3);*/ +} +.c9-sponsor { + background: url(../images/c9-sponsor.png) no-repeat 0 0; + z-index: 1; + width: 112px; + height: 119px; + position: absolute; + top: 55px; + right: 0; + outline: none; +} +.jumbotron h1 { + font-size: 54px; + line-height: 1; + text-shadow: 0 1px 2px rgba(0, 0, 0, .5); +} + +.jumbotron h1, .jumbotron p { + margin-bottom: 9px; + color: white; +/* text-align: center;*/ + text-shadow: 0 1px 1px rgba(0, 0, 0, .3); +} + +/* + Menu venue +*/ + +ul.menu { + margin-left: 16px; +} + +.menu li { + list-style-image: url(../images/menu_disc.png); + margin-bottom: 3px; + font-weight : 700; +} + +.menu li .menu-item a.menuLink, .menu li .menu-item span.menuLink { + color: #262626; +} +.menuTwo { + margin-bottom: 5px; + margin-top: 2px; +} +.menuTwo li .menu-item a.menuLink { + color: #262626; +} + +/* need specificity to "beat" the above colors */ +.menu li .menu-item a.currentItem, .menuTwo li .menu-item { + color: #618100; +} + +/* + Members and the tabs that represent them +*/ + +.members { +/* width: 800px; */ + /*width: 700px;*/ +/* margin: 0 10px;*/ + + height: 42px; + left: 0; +/* position: fixed;*/ + top: 0; +/* transition-duration: 300ms, 300ms; + transition-property: box-shadow, height; + transition-timing-function: ease-out, ease-out; + -moz-transition-duration: 300ms, 300ms; + -moz-transition-property: -moz-box-shadow, height; + -moz-transition-timing-function: ease-out, ease-out; + -o-transition-duration: 300ms, 300ms; + -o-transition-property: -o-box-shadow, height; + -o-transition-timing-function: ease-out, ease-out; + -webkit-transition-duration: 300ms, 300ms; + -webkit-transition-property: -webkit-box-shadow, height; + -webkit-transition-timing-function: ease-out, ease-out;*/ +/* width: 100%;*/ + /*transition-duration: 300ms; + transition-property: box-shadow; + transition-timing-function: ease-out; + -moz-transition-duration: 300ms, 300ms; + -moz-transition-property: -moz-box-shadow, height; + -moz-transition-timing-function: ease-out, ease-out; + -o-transition-duration: 300ms; + -o-transition-property: -o-box-shadow; + -o-transition-timing-function: ease-out;*/ + -webkit-transition-duration: 400ms, 0ms; + -webkit-transition-property: -webkit-box-shadow, background; + -webkit-transition-timing-function: ease-out, ease-out; + z-index: 100; + padding-bottom : 5px; + overflow: visible !important; + +/* background: #FFF; + width: 100%; + padding-bottom: 13px; + top: 40px; + position: fixed;*/ +} +.srolled .members { + width: 100%; +/* -webkit-box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.35); + -moz-box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.35); + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.35); */ + padding-bottom: 15px; +/* height: 31px;*/ + top: 40px; + position: fixed; +} +.shadow.members{ + background: #FFF; + box-shadow: 0 0.1em 1em rgba(0,0,0, 0.3); + -moz-box-shadow: 0 0.1em 1em rgba(0,0,0, 0.3); + -o-box-shadow: 0 0.1em 1em rgba(0,0,0, 0.3); + -webkit-box-shadow: 0 0.1em 1em rgba(0,0,0, 0.3); +} + +.membersContent { + +/* border-bottom: 0.1em solid #FFF;*/ + height: 3em; + padding-top: 4px; +/* line-height: 4;*/ +/* margin-top: -0.1em;*/ + position: relative; +/* transition-property: border-color, line-height; + transition-duration: 125ms, 250ms; + transition-timing-function: ease-out, ease-out; + -moz-transition-property: border-color, line-height; + -moz-transition-duration: 125ms, 250ms; + -moz-transition-timing-function: ease-out, ease-out; + -o-transition-property: border-color, line-height; + -o-transition-duration: 125ms, 250ms; + -o-transition-timing-function: ease-out, ease-out; + -webkit-transition-property: border-color, line-height; + -webkit-transition-duration: 125ms, 250ms; + -webkit-transition-timing-function: ease-out, ease-out;*/ + + /*transition-duration: 125ms; + transition-property: top; + transition-timing-function: ease-out; + + top : 11px;*/ + z-index: 103; + /*width: 700px;*/ +} +.srolledHeader .membersContent { + line-height: 3; +} +.srolled .membersContent { + /*top : 0;*/ + width : 695px; + padding-left : 305px; + margin : 0 auto 0 auto; +} +.membersBackground { +/* background-color: white; + position: fixed; + z-index: 2; + top: 40px; + left: 0px; + right: 0px; + width: 100%; + height: 55px; + opacity: 0; + display: none; + box-shadow: rgba(0, 0, 0, 0.398438) 1px 4px 6px;*/ + + background-color: transparent; + height: 47px; + /*width: 700px;*/ + position: absolute; +} +.srolled .membersBackground { + position: relative; +} +.srolledHeader .membersBackground { +/* display: block;*/ +} +.memberHeader { + float: left; + padding-right: 10px; + margin-bottom: 5px; + position: absolute; + +/* line-height: inherit; + margin-bottom: -37px; + margin-top: -42px;*/ +/* margin-left: 10px;*/ +} +.srolledHeader .memberHeader { + +/* margin-bottom: -21px; + margin-top: -27px;*/ +} +.membersContent .tabs, +.membersContent .tabs li, +.membersContent .tabs li a { +/* line-height: inherit;*/ +} +.membersContent .tabs li a { +/* display: inline;*/ +} +.tabs a.menu:after, .tabs .dropdown-toggle:after { + margin-top: 22px; +} +/*.backToMDN { + position: absolute; + right: 0px; + top: -20px; +}*/ +.backToMDN, .editInC9 { + font-size: 11px; + color: #657383; + margin : 0 0 0 5px; +} +/*.editInC9 { +} +.backToMDN { + top: 0; +}*/ + +.backToMDN a, .editInC9 a { + color: #657383; + font-weight: normal; + position : relative; + top : -2px; +} + +.tabs { + padding-top: 10px; + /*border-bottom: 1px solid #848484;*/ + min-height : 27px; + padding-bottom : 5px; +} +.tabsSansBorder { + border: 0; +} +.tabs, .pills { + margin-bottom: 0; +/* margin-left: 10px; + margin-right: 10px;*/ +} +.srolledHeader .members .tabs { + background-color: white; +} +.members .tabs .dropdown a, +.members .tabs a.menu:after, +.members .tabs .dropdown-toggle:after { + margin-right: 0; + margin-left: 6px; + font-weight : normal; +} + +.members .tabs ul li { + font-weight: bold; +} + +.memberLink a { + margin-left: 0 !important; +} +.menu-dropdown, .dropdown-menu { + min-width : 105px; + max-height: 350px; + overflow: auto; + border-color : rgba(0, 0, 0, 0.1); +} +.topbar div > ul .menu-dropdown li a:hover, +.nav .menu-dropdown li a:hover, +.topbar div > ul .dropdown-menu li a:hover, +.nav .dropdown-menu li a:hover { + background-color: #ffffff; + color: #000000; +} +.dropdown-menu { + border-top: none; +} + +.tabs a.menu:after, .tabs .dropdown-toggle:after { + margin-top: 13px; + line-height: 28px; +} +.open .menu, .dropdown.open .menu, .open .dropdown-toggle, .dropdown.open .dropdown-toggle { + background: transparent; + color: black; +/* font-weight: bold;*/ +} +#topSection .open .menu, #topSection .dropdown.open .menu, #topSection .open .dropdown-toggle, +#topSection .dropdown.open .dropdown-toggle { + color: #bfbfbf; +} + +.tabs > li { + font-weight: bold; +} + +.tabs > li > a { + border: none; + outline: none; + line-height: 28px; + font-size: 11px; + padding: 0 5px; +} +.tabs > li > a:hover { + color: #000000; + text-decoration: none; + background-color: transparent; + border: none; +} +.tabs > li, .pills > li { + float: right; +} +.topbar .dropdown-menu a, .dropdown-menu a { + font-size: 11px; +/* padding: 2px 12px;*/ + line-height: 14px; +} +.tabs .active > a, .tabs .active > a:hover { + color: #000000; + border: none; + cursor: default; +} +.tabs .menu-dropdown, .tabs .dropdown-menu { + border-radius: 0 0 6px 6px; + top: 32px; + right: 0px; +} +.srolled .tabs .menu-dropdown, .srolled .tabs .dropdown-menu { + top: 32px; +} +.dropdown-toggle { + color: #8a8a8a; +} + +ul.tabs .double ul, ul.tabs .triple ul, ul.tabs .quad ul{ + width:760px; + margin-bottom:20px; + overflow:hidden; + border-top:1px solid #ccc; +} +/*ul.tabs .double li, ul.tabs .triple li, ul.tabs .quad li{ + line-height:1.5em; + border-bottom:1px solid #ccc; + float:left; + display:inline; +}*/ + +/* + Center content (the "real stuff") +*/ + +.content .container { + background: url(../images/sidebar-border.png) repeat-y 95px 0; + padding-bottom : 50px; +} +.content { + /*background: url(../images/content-top-bg.png) repeat-x 0 0;*/ + border-top: 1px solid #fffffe; +} +.content .row { + width: 1000px; + margin-left: auto; + margin-right: auto; +} +.container .content .span11 { + padding-top: 10px; + float: right; +} +.content .span5 { + margin-right: 25px; + +} +#sidebar { + margin-top: 9px; + /*background: url(../images/sidebar-border.png) repeat-y right 0;*/ + margin-left: 12px; +/* width: 280px;*/ +/* overflow: auto;*/ + padding-right : 10px; +} + +#sidebar h3 a, +#sidebar h3 a:hover { + color: #404040; +} + +#sidebar #well + +#content { + padding-bottom: 10px; +} + +#content article.article { +/* border-bottom: 1px solid #e9e9e9;*/ + border-top: 1px solid #e9e9e9; + padding: 16px 10px 2px; +} +div#content article:last-child { + border-bottom: 1px solid #e9e9e9; + padding-bottom: 40px; +} +#content article.article.methodToggleOpen { + background: url(../images/method-bg.png) repeat 0 0; + margin : 0 0 10px 0; +} +#content article:first-child { + border:none; +} + +/* + Edit in Cloud9, sucka +*/ + +.snippet pre { + margin-bottom: 0; +} + +.snippet .toolbar { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + + text-align: right; + padding: 3px 10px; + margin-top : -1px; +} + +.snippet .filename, .snippet .toolbar { + font-family: Ubuntu, sans-serif; + font-size: 12px; + color: #EEE; +} + +.snippet .filename { + padding: 0 5px 2px 5px; + font-size: 10px; + background: rgba(230,230,230,0.5); + padding: 0 5px 2px 5px; + border-radius: 0 6px 0 6px; + margin : 1px; + position : absolute; + right : 0; + top : 0; +} + +.snippet .filename span{ + color : #666; +} + +.snippet .toolbar { + background-color: rgba(30,30,30,0.5); +} + +div.snippet { + margin-bottom: 18px; + position : relative; +} + +div.snippet a, div.toolbar a { + color: #FFF; +} + +/* + All about signatures +*/ + +.signatures { +/* width: 800px;*/ + margin-left: 20px; + margin-bottom: 5px; +} +.sideToggler { + padding-left: 20px; +} +ul.signatures ul { + list-style: none; + display: inline; +} + +li.signature { + list-style: none; +} + +.signature ul { + padding: 0; + margin: 0; +} + +.signature li { + display: inline; +} + +.signature ul.argument-types::before { + content: '→'; + margin: 0 5px; +} + +.signature li.argument-type::after { + content: '|'; + padding: 0 5px 0 5px; +} + +.signature li.argument-type:last-child:after { + content: ''; + padding: 0 5px 0 5px; +} + +.sigClassName { + display: none; +} + +.member-name { + color: #4397cd; + font-weight: bold; + text-decoration: none; + cursor: pointer; + padding-right: 3px; +} + +.signature-call { + cursor: pointer; +} + +.signature-call a { + color: #859c59; + +} + +.sigArgList { + font-weight: normal; +} + +.eventObjName { + font-style: italic; +} +.eventListenerStart, .eventFunctionOpen, .eventFunctionClose { + color: #999999; +} + +.eventListenerStart:after +{ + content: ".on("; +} + +.eventMember { + padding-right: 0px; +} + +.metaInfo { + float: right; + z-index: 1; + position: relative; +} + +.chainable { + background-color: #0072bc; + color: #ffffff; +} + +.deprecated { + background-color: #f7941d; + color: #ffffff; +} + +.alias { + background-color: #6c951e; + color: #ffffff; + font-size: 10px; + padding: 2px 5px 3px; + text-transform: capitalize; +} + +.related-to { + background-color: #89289a; + color: #ffffff; + font-size: 10px; + padding: 2px 5px 3px; + text-transform: capitalize; +} + +.alias a, .related-to a { + color: #ffffff; + /* text-decoration: underline; */ +} +.alias a:hover, .related-to a:hover { + text-decoration: none; +} +.alias:hover, .related-to:hover { + opacity: 0.8; + cursor: pointer; +} + +ul.alias li { + font-weight: bold; + font-size: 10px; +} + +.memberContent { + +} +.memberContent .title { + +} +.memberContent .description { + position:relative; + /*top: -13px;*/ + display: none; +} +.snip-container .actions .toggle-plaintext label { + margin-top: 1px; + padding-top: 0; + text-align: left; +} +.snip-container .actions .toggle-plaintext input { + margin-top: 4px !important; +} +.snip-container label { + color: #ffffff; +} +.description h4 { + font-size: 18px; + margin: 20px 0 10px; + line-height : 18px; +} +.bordered-table{ + margin-bottom: 0; + background-color: white; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.bordered-table thead tr:first-child th:first-child, .bordered-table tbody tr:first-child td:first-child{ + -webkit-border-radius: 6px 0 0 0; + -moz-border-radius: 6px 0 0 0; + border-radius: 6px 0 0 0; +} +.bordered-table tbody tr:last-child td:last-child{ + -webkit-border-radius: 0 0 6px 0; + -moz-border-radius: 0 0 6px 0; + border-radius: 0 0 6px 0; +} +.bordered-table thead tr:first-child th:last-child, .bordered-table tbody tr:first-child td:last-child{ + -webkit-border-radius: 0 6px 0 0; + -moz-border-radius: 0 6px 0 0; + border-radius: 0 6px 0 0; +} +.actions .run-in-c9 img { + padding-top: 3px; +} +table td, .bordered-table th + th, .bordered-table td + td, .bordered-table th + td { + border-top: none; +} +.zebra-striped tbody tr:nth-child(odd) td, .zebra-striped tbody tr:nth-child(odd) th { + background-color: transparent; +} +.zebra-striped tbody tr:nth-child(even) td, .zebra-striped tbody tr:nth-child(even) th { + background-color: #fbfbfb; +} +.zebra-striped tbody tr:hover td, .zebra-striped tbody tr:hover th { +} + +.argument-list{ + margin-bottom : 13px; +} + +table td{ + padding: 8px 10px 8px 10px; +} +/* + Everyday I'm togglin' +*/ +#content h3 { + font-size: 24px; + margin-top: 5px; +/* margin: 10px 0;*/ +} +#content h3.methodToggle { + margin: 0; +} +#content h3.sectionHeader { + margin: 10px 0 17px 0; + line-height : 24px; +} + +div.method { + position: relative; +} + +.methodToggle a { + color: #fff; + border-bottom: 0px; + text-decoration: none; +} + +h3.methodToggle { + height : 13px; + width : 8px; + background-position : 0px 0px; + position: absolute; + top: -20px; + background-image : url(../images/member-sprites.png); + background-color : transparent; + background-repeat : no-repeat; + overflow: hidden; + left: 0px; +} + +h3.methodToggleHover { + /* background-position : 0px -28px; */ +} + +h3.methodToggle.inactive { + top: 4px; +} + +h3.methodToggle.active { + top: 6px; + height : 13px; + width : 8px; + background-position : 0px -59px; +} + +.hidden { + display: none; + visibility: hidden; +} + +.hiddenSpan { + display: none; +} + +.ellipsis_description, .short_description { +/* width: 800px;*/ +} +.methodToggleOpen .ellipsis_description { + display: none; +} +.sideToggler .short_description, +.sideToggler .description{ + display: none; +} +.methodToggleOpen .short_description, +.methodToggleOpen .description { + display: block; +} +.description td p { + margin: 0; +} +/* + Footer? I hardly know her +*/ + +#footer { + /*position:fixed; */ + left:0px; + bottom:0px; + padding-top: 0; + width:100%; + background: #101010 url(../images/footer-bg.png) repeat 0 0; + color: #c3c3c3; + border-top: none; + font-size: 12px; + margin-top: 0; +} +#footer .container { + width: 710px; + padding-left: 300px; + font-size: 11px; + margin-left: auto; + margin-right: auto; + min-height: 60px; + background: url(../images/arrow-footer.png) no-repeat 261px 0; +} +#footer .footer-text { + display: block; + float: left; + margin-right: 10px; + margin-top: 24px; +} +#footer .sponsors { + display: inline-block; + margin-top: 18px; +} + +#footer .sponsors .sponsor { + padding-right: 22px; +} +#footer .container +#footer a { +/* color: #c3c3c3; + text-decoration: underline;*/ +} +#footer .c9-logo { + width: 141px; + height: 20px; + background: url(../images/c9-log-footer.png) no-repeat 0 0; + display: inline-block; + padding-right: 10px; +} +#footer .joyent-logo { + width: 70px; + height: 19px; + background: url(../images/joyent-logo-footer.png) no-repeat 0 0; + display: inline-block; + padding-right: 10px; +} +#footer .mozilla-logo { + width: 78px; + height: 24px; + background: url(../images/mozilla-logo-footer.png) no-repeat 0 0; + display: inline-block; + padding-right: 10px; +} +#footer .debuggable-logo { + width: 119px; + height: 25px; + background: url(../images/debuggable-logo-footer.png) no-repeat 0 0; + display: inline-block; + padding-right: 0 !important; + margin-bottom : -3px; +} +#footer .span11 { + margin-left: 0; +} + +.logoText, .logoImg { + /*position: absolute;*/ + margin-bottom: 5px; +} + +.logoImg { + top: 40px; +} +.topbar div > ul .menu-dropdown li a:hover, +.nav .menu-dropdown li a:hover, +.topbar div > ul .dropdown-menu li a:hover, +.nav .dropdown-menu li a:hover { + background-color: #191919; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919)); + background-image: -moz-linear-gradient(top, #292929, #191919); + background-image: -ms-linear-gradient(top, #292929, #191919); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919)); + background-image: -webkit-linear-gradient(top, #292929, #191919); + background-image: -o-linear-gradient(top, #292929, #191919); + background-image: linear-gradient(top, #292929, #191919); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0); + color: #ffffff; +} + +.alert-message.block-message { + background: #fefaca; + border-color : #fefaca; + padding : 8px 14px 8px 14px; +} + +body .dsq-reply{ + margin-top : 10px; +} + +#disqus_thread{ + border-top : 1px solid #ddd; + margin-top : 30px; +} + +#disqus_thread h3, body #dsq-content h3 { + font-size : 12px; + margin : 0 0 20px 0; + line-height : 12px; +} +body #dsq-reply h3{ + font-size : 18px; + line-height : 18px; + margin : 15px 0 20px 0; +} + +#disqus_thread select{ + font-size : 11px; + height : 20px; + color : #444; +} + +#dsq-global-toolbar, #dsq-pagination, .dsq-trackback-url{ + display : none; +} \ No newline at end of file diff --git a/doc/resources/ace/skins/skeleton/images/Ace_ERD.svg b/doc/resources/ace/skeleton/images/Ace_ERD.svg similarity index 100% rename from doc/resources/ace/skins/skeleton/images/Ace_ERD.svg rename to doc/resources/ace/skeleton/images/Ace_ERD.svg diff --git a/doc/resources/ace/skins/skeleton/images/arrow-footer.png b/doc/resources/ace/skeleton/images/arrow-footer.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/arrow-footer.png rename to doc/resources/ace/skeleton/images/arrow-footer.png diff --git a/doc/resources/ace/skins/skeleton/images/c9-log-footer.png b/doc/resources/ace/skeleton/images/c9-log-footer.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/c9-log-footer.png rename to doc/resources/ace/skeleton/images/c9-log-footer.png diff --git a/doc/resources/ace/skins/skeleton/images/c9-sponsor.png b/doc/resources/ace/skeleton/images/c9-sponsor.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/c9-sponsor.png rename to doc/resources/ace/skeleton/images/c9-sponsor.png diff --git a/doc/resources/ace/skins/skeleton/images/cloud9-logo.png b/doc/resources/ace/skeleton/images/cloud9-logo.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/cloud9-logo.png rename to doc/resources/ace/skeleton/images/cloud9-logo.png diff --git a/doc/resources/ace/skins/skeleton/images/content-bg.png b/doc/resources/ace/skeleton/images/content-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/content-bg.png rename to doc/resources/ace/skeleton/images/content-bg.png diff --git a/doc/resources/ace/skins/skeleton/images/content-top-bg.png b/doc/resources/ace/skeleton/images/content-top-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/content-top-bg.png rename to doc/resources/ace/skeleton/images/content-top-bg.png diff --git a/doc/resources/ace/skins/skeleton/images/content-top.png b/doc/resources/ace/skeleton/images/content-top.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/content-top.png rename to doc/resources/ace/skeleton/images/content-top.png diff --git a/doc/resources/ace/skins/skeleton/images/footer-bg.png b/doc/resources/ace/skeleton/images/footer-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/footer-bg.png rename to doc/resources/ace/skeleton/images/footer-bg.png diff --git a/doc/resources/ace/skins/skeleton/images/main-bg.png b/doc/resources/ace/skeleton/images/main-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/main-bg.png rename to doc/resources/ace/skeleton/images/main-bg.png diff --git a/doc/resources/ace/skins/skeleton/images/member-sprites.png b/doc/resources/ace/skeleton/images/member-sprites.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/member-sprites.png rename to doc/resources/ace/skeleton/images/member-sprites.png diff --git a/doc/resources/ace/skins/skeleton/images/menu_disc.png b/doc/resources/ace/skeleton/images/menu_disc.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/menu_disc.png rename to doc/resources/ace/skeleton/images/menu_disc.png diff --git a/doc/resources/ace/skins/skeleton/images/method-bg.png b/doc/resources/ace/skeleton/images/method-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/method-bg.png rename to doc/resources/ace/skeleton/images/method-bg.png diff --git a/doc/resources/ace/skins/skeleton/images/scrolled-heading-shadow.png b/doc/resources/ace/skeleton/images/scrolled-heading-shadow.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/scrolled-heading-shadow.png rename to doc/resources/ace/skeleton/images/scrolled-heading-shadow.png diff --git a/doc/resources/ace/skins/skeleton/images/sidebar-border.png b/doc/resources/ace/skeleton/images/sidebar-border.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/sidebar-border.png rename to doc/resources/ace/skeleton/images/sidebar-border.png diff --git a/doc/resources/ace/skins/skeleton/images/sidebar-top-bg.png b/doc/resources/ace/skeleton/images/sidebar-top-bg.png similarity index 100% rename from doc/resources/ace/skins/skeleton/images/sidebar-top-bg.png rename to doc/resources/ace/skeleton/images/sidebar-top-bg.png diff --git a/doc/resources/ace/skins/skeleton/javascripts/bootstrap-dropdown.js b/doc/resources/ace/skeleton/javascripts/bootstrap-dropdown.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/bootstrap-dropdown.js rename to doc/resources/ace/skeleton/javascripts/bootstrap-dropdown.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/clicker.js b/doc/resources/ace/skeleton/javascripts/clicker.js similarity index 50% rename from doc/resources/ace/skins/skeleton/javascripts/clicker.js rename to doc/resources/ace/skeleton/javascripts/clicker.js index 5ad9c8fe..5fe3dca2 100644 --- a/doc/resources/ace/skins/skeleton/javascripts/clicker.js +++ b/doc/resources/ace/skeleton/javascripts/clicker.js @@ -1,41 +1,4 @@ $(function() { -// $(".sideToggler").collapse(); - -// var documentURL = location.href; -// var lastSlashPos = documentURL.lastIndexOf("/") + 1; -// var filenamePos = documentURL.lastIndexOf(".html"); - -// var objName = documentURL.substring(lastSlashPos, filenamePos); - -// var menuUl = "menu_" + objName; - - // resize the sidebar/content based on window height; - // this enables us to have "inner" scroll bars - /*var h = $(window).height(); - $("#sidebar").css('height', h - 80); - $("#content").css('height', h - 100); - - $(window).resize(function(){ - var h = $(window).height(); - var w = $(window).width(); - $("#sidebar").css('height', h - 80); - $("#content").css('height', h - 100); - }); */ - - // clicking on the member title should launch open the - // description -// $('.member-name').click(function() { -// var id = this.id.substring(this.id.indexOf("_") + 1); -// -// $("h3[id='" + id + "']").trigger('click'); -// }); - - /*$('.memberLink').click(function() { - var id = this.id.substring(this.id.indexOf("_") + 1); - - $("h3[data-id='" + id + "']").trigger('click'); - }); */ - // when hovering over arrow, add highlight (only if inactive) $("h3.methodToggle").hover(function () { if (!$("h3.methodToggle").hasClass('active')) diff --git a/doc/resources/ace/skins/skeleton/javascripts/disqus-ext.js b/doc/resources/ace/skeleton/javascripts/disqus-ext.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/disqus-ext.js rename to doc/resources/ace/skeleton/javascripts/disqus-ext.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/ga.js b/doc/resources/ace/skeleton/javascripts/ga.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/ga.js rename to doc/resources/ace/skeleton/javascripts/ga.js diff --git a/doc/resources/ace/skeleton/javascripts/jquery-scrollspy.js b/doc/resources/ace/skeleton/javascripts/jquery-scrollspy.js new file mode 100644 index 00000000..71b4a363 --- /dev/null +++ b/doc/resources/ace/skeleton/javascripts/jquery-scrollspy.js @@ -0,0 +1,98 @@ +/*! + * jQuery Scrollspy Plugin + * Author: @sxalexander + * Licensed under the MIT license + */ + + +;(function ( $, window, document, undefined ) { + + $.fn.extend({ + scrollspy: function ( options ) { + + var defaults = { + min: 0, + max: 0, + mode: 'vertical', + buffer: 0, + container: window, + onEnter: options.onEnter ? options.onEnter : [], + onLeave: options.onLeave ? options.onLeave : [], + onTick: options.onTick ? options.onTick : [] + } + + var options = $.extend( {}, defaults, options ); + + return this.each(function (i) { + + var element = this; + var o = options; + var $container = $(o.container); + var mode = o.mode; + var buffer = o.buffer; + var enters = leaves = 0; + var inside = false; + + /* add listener to container */ + $container.bind('scroll', function(e){ + var position = {top: $(this).scrollTop(), left: $(this).scrollLeft()}; + var xy = (mode == 'vertical') ? position.top + buffer : position.left + buffer; + var max = o.max; + var min = o.min; + + /* fix max */ + if($.isFunction(o.max)){ + max = o.max(); + } + + /* fix max */ + if($.isFunction(o.min)){ + min = o.min(); + } + + if(max == 0){ + max = (mode == 'vertical') ? $container.height() : $container.outerWidth() + $(element).outerWidth(); + } + + /* if we have reached the minimum bound but are below the max ... */ + if(xy >= o.min && xy <= max){ + /* trigger enter event */ + if(!inside){ + inside = true; + enters++; + + /* fire enter event */ + $(element).trigger('scrollEnter', {position: position}) + if($.isFunction(o.onEnter)){ + o.onEnter(element, position); + } + + } + + /* triger tick event */ + $(element).trigger('scrollTick', {position: position, inside: inside, enters: enters, leaves: leaves}) + if($.isFunction(o.onTick)){ + o.onTick(element, position, inside, enters, leaves); + } + }else{ + + if(inside){ + inside = false; + leaves++; + /* trigger leave event */ + $(element).trigger('scrollLeave', {position: position, leaves:leaves}) + + if($.isFunction(o.onLeave)){ + o.onLeave(element, position); + } + } + } + }); + + }); + } + + }) + + +})( jQuery, window ); diff --git a/doc/resources/ace/skins/skeleton/javascripts/jquery.collapse.js b/doc/resources/ace/skeleton/javascripts/jquery.collapse.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/jquery.collapse.js rename to doc/resources/ace/skeleton/javascripts/jquery.collapse.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/jquery.cookie.js b/doc/resources/ace/skeleton/javascripts/jquery.cookie.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/jquery.cookie.js rename to doc/resources/ace/skeleton/javascripts/jquery.cookie.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/jquery.js b/doc/resources/ace/skeleton/javascripts/jquery.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/jquery.js rename to doc/resources/ace/skeleton/javascripts/jquery.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/plugins.js b/doc/resources/ace/skeleton/javascripts/plugins.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/plugins.js rename to doc/resources/ace/skeleton/javascripts/plugins.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/prettify-extension.js b/doc/resources/ace/skeleton/javascripts/prettify-extension.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/prettify-extension.js rename to doc/resources/ace/skeleton/javascripts/prettify-extension.js diff --git a/doc/resources/ace/skins/skeleton/javascripts/prettify.js b/doc/resources/ace/skeleton/javascripts/prettify.js similarity index 100% rename from doc/resources/ace/skins/skeleton/javascripts/prettify.js rename to doc/resources/ace/skeleton/javascripts/prettify.js diff --git a/doc/resources/ace/skeleton/javascripts/ux.js b/doc/resources/ace/skeleton/javascripts/ux.js new file mode 100644 index 00000000..2ecbd55c --- /dev/null +++ b/doc/resources/ace/skeleton/javascripts/ux.js @@ -0,0 +1,211 @@ +$(function () { + 'use strict'; + + 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); + + if (pathName.indexOf("nodejs_ref_guide") >= 0) $('li#node_js_ref').addClass("active"); + else if (pathName.indexOf("nodejs_dev_guide") >= 0) $('li#nodejs_dev_guide').addClass("active"); + else if (pathName.indexOf("js_doc") >= 0) $('li#js_doc').addClass("active"); + + function loadCallback(evt) { + var form = document.getElementById("searchbox"); + var input = form.query; + form.onsubmit = function (evt) { + var query = input.value; + if (query) { + input.value = ""; + input.blur(); + var currentVersion = $('#currentVersion').text(); + var url = "https://www.google.com/search?q=" + encodeURIComponent("site:nodemanual.org/" + currentVersion + " " + query); + window.open(url); + } + return false; + }; + } + + 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 () { + var d = 'a.menu, .dropdown-toggle' + + function clearMenus() { + $(d).parent('li').each(function () { + $(this).removeClass('open') + }); + } + + var s, sx; + + // scrolling offset calculation via www.quirksmode.org + if (window.pageYOffset || window.pageXOffset) { + s = window.pageYOffset; + sx = window.pageXOffset; + } + else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) { + s = document.documentElement.scrollTop; + sx = document.documentElement.scrollLeft; + } + else if (document.body) { + s = document.body.scrollTop; + sx = document.body.scrollLeft; + } + + if (document.documentElement.offsetWidth < 1010) { + if (sx <= 0) sx = 0; + else if (sx + document.documentElement.offsetWidth > 1010) sx = 1010 - document.documentElement.offsetWidth; + } + else sx = 0; + + $('.members').each(function (i) { + var position = $(this).position(); + var $classContent = $(this).closest('.classContent'); + + $(this).scrollspy({ + min: $classContent.position().top - 55, + max: $classContent.position().top + $classContent.height(), + onEnter: function (element, position) { + var $pagination = $(element); + var $paginationContent = $('.membersContent pos' + i); + var $tabs = $('.tabs pos' + i); + + $paginationContent.css('left', -1 * sx); + $paginationContent.css('top', 0); + + $pagination.addClass('shadow').stop().css({ + height: 31, + 'top': 33 + }).closest('.classContent').addClass('srolled'); + + $tabs.addClass('tabsSansBorder'); + }, + onLeave: function (element, position) { + var $pagination = $(element); + var $paginationContent = $('.membersContent pos' + i); + var $tabs = $('.tabs pos' + i); + + $paginationContent.stop().css({ + top: 11 + }); + $pagination.css({ + 'position': 'absolute', + 'top': 193 + }); + $pagination.stop().removeClass('shadow').css({ + height: 42 + }); + + $paginationContent.css('left', 0); + // setTimeout(function () { + $paginationContent.css({ + 'top': '' + }); + $pagination.css({ + 'position': '', + 'top': '' + }); + $paginationContent.css('left', 0); + $pagination.closest('.classContent').removeClass('srolled') + $tabs.removeClass('tabsSansBorder'); + // }, 300); + } + }); + }); + + $('span.methodClicker, article.article, h3.methodClicker').each(function () { + var a = $(this); + var constructorPos = a.attr("id").indexOf("new "); + + var objName = a.attr("id"); + if (constructorPos >= 0) { + objName = objName.substring(constructorPos + 4); + objName += ".new"; + } + + 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, '\\.')); + if ($clickerEl.length > 0 && $clickerEl.hasClass('methodClicker')) { + var p = $clickerEl.parent(); + p[0].force = true; + p.trigger('click'); + p[0].force = false; + } + } + + if (location.hash) { + showMethodContent(); + var data = location.hash; + scrollTo(null, data.substr(1)); + } + + window.onhashchange = function () { + showMethodContent(); + } +}); + +function scrollTo(el, data) { + if (!data) { + data = el.getAttribute("data-id"); + location.hash = data; + } + var el = $("span#" + data.replace(/\./g, "\\."))[0]; + if (!el) return; + + var article = $(el).closest('.article')[0]; + + var top = article.offsetTop - 100; + + if (document.body.scrollTop > top || document.body.scrollTop != top && document.body.scrollTop + (window.innerHeight || document.documentElement.offsetHeight) < top + article.offsetHeight) { + $('body').animate({ + scrollTop: top + }, { + duration: 200, + easing: "swing" + }); + } +} \ No newline at end of file diff --git a/doc/resources/ace/skins/skeleton/javascripts/script.js b/doc/resources/ace/skins/skeleton/javascripts/script.js deleted file mode 100644 index ad071588..00000000 --- a/doc/resources/ace/skins/skeleton/javascripts/script.js +++ /dev/null @@ -1,439 +0,0 @@ -$(function () { - 'use strict'; - - 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); - - if (pathName.indexOf("nodejs_ref_guide") >= 0) - $('li#node_js_ref').addClass("active"); - else if (pathName.indexOf("nodejs_dev_guide") >= 0) - $('li#nodejs_dev_guide').addClass("active"); - else if (pathName.indexOf("js_doc") >= 0) - $('li#js_doc').addClass("active"); - - function loadCallback(evt){ - var form = document.getElementById("searchbox"); - var input = form.query; - form.onsubmit = function (evt) { - var query = input.value; - if (query) { - input.value = ""; - input.blur(); - var currentVersion = $('#currentVersion').text(); - var url = "https://www.google.com/search?q=" + encodeURIComponent("site:nodemanual.org/" + currentVersion + " " + query); - window.open(url); - } - return false; - }; - } - - var fileNameRE = new RegExp("^" + fileName, "i"); - - $('a.menuLink').each(function(index) { - if ($(this).attr("href").match(fileNameRE)) - { - $(this).addClass("currentItem"); - return false; - } - }); - -// function getTitle($article) { -// var title = [baseTitle]; -// -// if ($article.data('title')) { -// title.push($article.data('title')); -// } -// -// return title.join(' | '); -// } - -// function eachParent($item, callback) { -// var $parent = $item.data('ndoc.parent'); -// if ($parent && $parent.length) { -// eachParent($parent, callback); -// callback($parent); -// } -// } - - // activates item (used upon scrolling) -// function activate($article, expandParents) { -// var $item; -// -// if ($active) { -// $item = $active.data('ndoc.item') || $empty; -// $item.removeClass('current'); -// eachParent($item, function ($parent) { -// $parent.removeClass('current-parent'); -// }); -// } -// -// // set new active article -// $active = $article; -// -// // update title -// document.title = getTitle($article); -// -// $item = $active.data('ndoc.item') || $empty; -// $item.addClass('current'); -// eachParent($item, function ($parent) { -// $parent.addClass('current-parent'); -// if (expandParents) { -// $parent.data('ndoc.childs') -// .data('ndoc.collapsed', false) -// .animate({ -// height: 'show', -// opacity: 'show' -// }); -// } -// }); -// } - - -// function processScroll(evt, expandParents) { -// var scrollTop = $window.scrollTop() + 10, -// i = targets.length; -// -// while (i--) { -// if ($active !== targets[i].article && scrollTop >= targets[i].offset -// && (!targets[i + 1] || scrollTop <= targets[i + 1].offset)) { -// activate(targets[i].article, expandParents) -// return; -// } -// } -// } - - // init articles -// $('article.article').each(function () { -// var $article = $(this); -// -// targets.push({ -// article: $article, -// offset: $article.offset().top -// }); -// }); - - // init menu items -// $items.each(function () { -// var $item = $(this), -// $childs = $item.parent().next(), -// $parent = $item.parents('ul').eq(0).prev().children(), -// $article = $('[id="' + $item.attr('href').slice(1) + '"]'); -// -// // cross-refs -// $item.data('ndoc.parent', $parent); -// $item.data('ndoc.childs', $childs); -// $article.data('ndoc.item', $item); -// -// // bind activator -// $item.on('click', function () { -// if ($item.hasClass('current') && !$childs.data('ndoc.collapsed')) { -// $childs.data('ndoc.collapsed', true).animate({ -// height: 'hide', -// opacity: 'hide' -// }); -// return false; -// } -// -// activate($article); -// -// $item.data('ndoc.childs').data('ndoc.collapsed', false).animate({ -// height: 'show', -// opacity: 'show' -// }); -// }); -// -// // collapse all 2nd levels -// if (0 != $parent.length) { -// $childs.data('ndoc.collapsed', true).hide(); -// } -// }); - -// function updateSearchResults() { -// $results.empty(); -// -// if ('' == this.value) { -// $results.hide(); -// return; -// } -// -// $results.show(); -// -// $items.filter('[data-id*="' + this.value + '"]').each(function () { -// var $item = $(this); -// $('