ordered guide

This commit is contained in:
Alex Wolfe 2015-04-16 07:24:28 -07:00
parent 90d4c0f015
commit 5be4e6fbea
9 changed files with 78 additions and 17 deletions

View File

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

@ -1 +1,12 @@
h1 path #{current.path[0]} .l-main-section
.l-sub-section
h3 JavaScript
ul
li <a href="/docs/js/latest">Angular 2 JS - Latest Version</a>
h3 Dart
ul
li <a href="/docs/dart/latest">Angular 2 Dart - Latest Version</a>

View File

@ -11,15 +11,15 @@
"title": "5 Min Quickstart" "title": "5 Min Quickstart"
}, },
"resources": { "guide": {
"icon": "play-circle-fill", "icon": "play-circle-fill",
"title": "Angular Resources", "title": "Guide",
"banner": "Angular 2 is currently in Alpha Preview. For <a href='https://docs.angularjs.org/guide'>Angular 1.X Resources</a> please visit <a href='https://angularjs.org/'>Angularjs.org</a>." "banner": "Angular 2 is currently in Alpha Preview. For <a href='https://docs.angularjs.org/guide'>Angular 1.X Resources</a> please visit <a href='https://angularjs.org/'>Angularjs.org</a>."
}, },
"api": { "api": {
"icon": "book", "icon": "book",
"title": "API Proposal" "title": "API"
}, },
"help": { "help": {

View File

View File

@ -0,0 +1,11 @@
{
"_listtype": "ordered",
"view": {
"title": "View Guide"
},
"zones": {
"title": "Zone Guide"
}
}

View File

View File

View File

@ -12,17 +12,17 @@ div.c4
div.c4 div.c4
md-card.card md-card.card
md-card-content md-card-content
h3.text-headline.text-uppercase <span class="icon-play-circle-outline"></span> Resources h3.text-headline.text-uppercase <span class="icon-play-circle-outline"></span> Guide
p.text-body Preview of v2.0 p.text-body Step by Step Guide
footer footer
a(href="/docs/#{current.path[1]}/#{current.path[2]}/resources.html" class="button button-primary" md-button) View Resources a(href="/docs/#{current.path[1]}/#{current.path[2]}/guide/" class="button button-primary" md-button) View Resources
div.c4 div.c4
md-card.card md-card.card
md-card-content md-card-content
h3.text-headline.text-uppercase <span class="icon-book"></span> API Preview h3.text-headline.text-uppercase <span class="icon-book"></span> API
p.text-body Proposal for v2.0 API p.text-body Proposal for v2.0 API
footer footer

View File

@ -140,6 +140,24 @@
display: none; display: none;
} }
&.is-ordered {
list-style-type: decimal;
list-style: none;
> li {
line-height: 40px;
vertical-align: top;
> a {
padding: 0px 0px 0px ($unit * 8);
display: block;
box-sizing: normal;
width: 100%;
line-height: 40px;
}
}
}
> li { > li {
&.is-selected { &.is-selected {