This commit is contained in:
Alex Wolfe 2015-04-22 10:12:55 -07:00
parent cf220fed48
commit 8e0e727f7d
5 changed files with 37 additions and 47 deletions

View File

@ -1,7 +0,0 @@
.code-box
header.code-box-header
nav.code-box-nav
button(class="button" aria-label="View ES5" ng-class="(language == 'es5') ? 'is-selected' : ''" ng-click="toggleCodeLanguage($event, 'es5')" ) ES5
button(class="button" aria-label="View TypeScript" ng-class="(language == 'typescript') ? 'is-selected' : ''" ng-click="toggleCodeLanguage($event, 'typescript')") TypeScript
.code-box-content

View File

@ -3,7 +3,7 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
form.st-input-inner form.st-input-inner
label(for="search-io" class="is-hidden") Search Docs label(for="search-io" class="is-hidden") Search Docs
input(type="search" id="search-io" placeholder="SEARCH DOCS...") input(type="search" id="search-io" placeholder="SEARCH DOCS...")
button(class="mobile-trigger button" aria-label="View Docs Menu" ng-click="toggleDocsMenu($event)" md-button) Docs <span class="icon icon-arrow-drop-down"></span> button(aria-label="Docs Menu" class="mobile-trigger button" aria-label="View Docs Menu" ng-click="toggleDocsMenu($event)" md-button) Docs <span class="icon icon-arrow-drop-down"></span>
ul(class="side-nav-primary" ng-class="showDocsNav ? 'is-visible' : ''") ul(class="side-nav-primary" ng-class="showDocsNav ? 'is-visible' : ''")
if current.path[2] if current.path[2]
@ -18,38 +18,38 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
else else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}.html" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a> li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{slug}.html" md-button><span class="side-nav-icon icon-#{page.icon}"></span> #{name}</a>
// SECONDARY NAVIGATION // SECONDARY NAVIGATION
if selected if selected
secondarySection = public.docs[current.path[1]][current.path[2]][current.path[3]] secondarySection = public.docs[current.path[1]][current.path[2]][current.path[3]]
if secondarySection if secondarySection
listType = public.docs[current.path[1]][current.path[2]][current.path[3]]._data._listtype || 'unordered' listType = public.docs[current.path[1]][current.path[2]][current.path[3]]._data._listtype || 'unordered'
ordered = listType == "ordered" ? "is-ordered" : "" ordered = listType == "ordered" ? "is-ordered" : ""
number = 0 number = 0
ul(class="side-nav-secondary #{ordered}") ul(class="side-nav-secondary #{ordered}")
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]]._data for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]]._data
if slug != "index" if slug != "index"
name = page.menuTitle || page.title name = page.menuTitle || page.title
selected = current.path[4] == slug ? 'is-selected':'' selected = current.path[4] == slug ? 'is-selected':''
num = (listType == "ordered") ? number++ : '' num = (listType == "ordered") ? number++ : ''
if slug != "_listtype" if slug != "_listtype"
if num if num
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{num}. #{page.title}</a> li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{num}. #{page.title}</a>
else else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a> li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a>
// TERTIARY NAVIGATION // TERTIARY NAVIGATION
if selected if selected
tertiarySection = public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]] tertiarySection = public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
if tertiarySection if tertiarySection
ul.side-nav-tertiary ul.side-nav-tertiary
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
name = page.menuTitle || page.title name = page.menuTitle || page.title
selected = current.path[5] == slug ? 'is-selected':'' selected = current.path[5] == slug ? 'is-selected':''
li(class="#{selected}")<a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{current.path[4]}/#{slug}.html" md-button>#{name}</a> li(class="#{selected}")<a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{current.path[4]}/#{slug}.html" md-button>#{name}</a>

View File

@ -43,5 +43,5 @@
footer(class="background-steel") footer(class="background-steel")
small.text-caption Powered by Google ©2010-2015. Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" class="text-snow">Apache License, Version 2.0</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>. small.text-caption Powered by Google ©2010-2015. Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" class="text-snow">Apache License, Version 2.0</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.
a(href="/docs/styleguide.html" title="Style Guide" class="styleguide-trigger text-snow" md-button) a(aria-label="View Style Guide" href="/docs/styleguide.html" title="Style Guide" class="styleguide-trigger text-snow" md-button)
span.icon-favorite span.icon-favorite

View File

@ -1,6 +1,4 @@
{ {
"strict": true,
"index": { "index": {
"icon": "home", "icon": "home",
"title": "Angular Docs", "title": "Angular Docs",
@ -21,9 +19,7 @@
"api": { "api": {
"icon": "book", "icon": "book",
"title": "API Preview", "title": "API Preview"
"strict": true
}, },
"help": { "help": {

View File

@ -182,16 +182,17 @@
.code-box .code-box
pre.prettyprint.lang-typescript(data-name="es5") pre.prettyprint.lang-typescript(data-name="es5")
code.
// window.angular is available because the script file attaches the angular property to the window
document.addEventListener('DOMContentLoaded', function() {
angular.bootstrap(AppComponent);
});
pre.prettyprint.lang-typescript(data-name="typescript")
code. code.
import {Component, View, bootstrap} from 'angular2/angular2'; import {Component, View, bootstrap} from 'angular2/angular2';
... ...
// bootstrap is available for use because it was imported from angular core // bootstrap is available for use because it was imported from angular core
bootstrap(AppComponent); bootstrap(AppComponent);
pre.prettyprint.lang-typescript(data-name="typescript")
code.
// window.angular is available because the script file attaches the angular property to the window
document.addEventListener('DOMContentLoaded', function() {
angular.bootstrap(AppComponent);
});