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,19 +11,40 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
name = page.menuTitle || page.title
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>
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
for page, slug in public.docs[current.path[1]][current.path[2]][current.path[3]]._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]}/#{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
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

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"
},
"resources": {
"guide": {
"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>."
},
"api": {
"icon": "book",
"title": "API Proposal"
"title": "API"
},
"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
md-card.card
md-card-content
h3.text-headline.text-uppercase <span class="icon-play-circle-outline"></span> Resources
p.text-body Preview of v2.0
h3.text-headline.text-uppercase <span class="icon-play-circle-outline"></span> Guide
p.text-body Step by Step Guide
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
md-card.card
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
footer

View File

@ -140,6 +140,24 @@
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 {
&.is-selected {