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
label(for="search-io" class="is-hidden") 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' : ''")
if current.path[2]
@ -18,38 +18,38 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
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>
// SECONDARY NAVIGATION
if selected
secondarySection = public.docs[current.path[1]][current.path[2]][current.path[3]]
// SECONDARY NAVIGATION
if selected
secondarySection = public.docs[current.path[1]][current.path[2]][current.path[3]]
if secondarySection
listType = public.docs[current.path[1]][current.path[2]][current.path[3]]._data._listtype || 'unordered'
ordered = listType == "ordered" ? "is-ordered" : ""
number = 0
if secondarySection
listType = public.docs[current.path[1]][current.path[2]][current.path[3]]._data._listtype || 'unordered'
ordered = listType == "ordered" ? "is-ordered" : ""
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
if slug != "index"
name = page.menuTitle || page.title
selected = current.path[4] == slug ? 'is-selected':''
num = (listType == "ordered") ? number++ : ''
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]]._data
if slug != "index"
name = page.menuTitle || page.title
selected = current.path[4] == slug ? 'is-selected':''
num = (listType == "ordered") ? number++ : ''
if slug != "_listtype"
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>
if slug != "_listtype"
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>
else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a>
else
li(class="#{selected}") <a href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html" md-button>#{page.title}</a>
// TERTIARY NAVIGATION
if selected
tertiarySection = public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
// TERTIARY NAVIGATION
if selected
tertiarySection = public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
if tertiarySection
ul.side-nav-tertiary
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
name = page.menuTitle || page.title
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>
if tertiarySection
ul.side-nav-tertiary
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]._data
name = page.menuTitle || page.title
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>

View File

@ -43,5 +43,5 @@
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>.
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

View File

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

View File

@ -182,16 +182,17 @@
.code-box
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.
import {Component, View, bootstrap} from 'angular2/angular2';
...
// bootstrap is available for use because it was imported from angular core
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);
});