docs(api): fix api nav issue #927

closes #932
This commit is contained in:
Ward Bell 2016-03-08 08:45:44 -08:00
parent c92053f88e
commit 1a8a2d7d90
12 changed files with 28 additions and 30 deletions

View File

@ -3,17 +3,5 @@
"title": "Angular Docs", "title": "Angular Docs",
"subtitle": "Choose a language for Angular", "subtitle": "Choose a language for Angular",
"layout": "../_layout" "layout": "../_layout"
},
"search": {
"title": "Docs Search Results",
"layout": "../_layout"
},
"styleguide": {
"title": "Docs Style Guide",
"subtitle": "Design & Layout Patterns For Documentation",
"layout": "../_layout",
"autoformat": "true"
} }
} }

View File

@ -17,13 +17,15 @@
- var item = data[prop]; - var item = data[prop];
- item.slug = prop; - item.slug = prop;
- if (prop[0] !== '_' && !item.hide && selector(item)) { - if (prop[0] !== '_' && !item.hide && selector(item)) {
- var file = prop === 'index' ? '' : prop + '.html'; - var file = pro
- var ext = prop.lastIndexOf('/') === prop.length-1 ? '' : '.html';
- var file = prop === 'index' ? '' : prop + ext;
- var href = prefix + file; - var href = prefix + file;
- item.class = cur === href ? 'is-selected' : ''; - item.class = cur === href ? 'is-selected' : '';
- item.file = file; - item.file = file;
- item.href = href; - item.href = href;
- item.navTitle = item.navTitle || item.title; - item.navTitle = item.navTitle || item.title;
- item.tooltip = item.description || item.intro || ''; - item.tooltip = item.description || item.intro || item.title || '';
- section.push(item); - section.push(item);
- } - }
- } - }
@ -36,7 +38,6 @@
- var guide = sections('guide', function(item) { return !item.basics; }); - var guide = sections('guide', function(item) { return !item.basics; });
- var qs = sections('', function(item) { return item.slug === 'quickstart'; })[0] || {}; - var qs = sections('', function(item) { return item.slug === 'quickstart'; })[0] || {};
- var reference = sections('', function(item) { return item.reference; }); - var reference = sections('', function(item) { return item.reference; });
- var resources = sections('', function(item) { return item.resources; });
nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
// SEARCH BAR // SEARCH BAR
@ -84,14 +85,6 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
ul ul
each item in reference each item in reference
li(class="#{item.class}"): a(href="#{item.href}" title="#{item.tooltip}") #{item.navTitle} li(class="#{item.class}"): a(href="#{item.href}" title="#{item.tooltip}") #{item.navTitle}
.nav-blocks
.nav-title Resources
.nav-unordered-lists
ul
each item in resources
li(class="#{item.class}"): a(href="#{item.href}" title="#{item.tooltip}") #{item.navTitle}
script. script.
// Could put in appCtrl but only needed here and clear here // Could put in appCtrl but only needed here and clear here

View File

@ -30,7 +30,7 @@
"banner": "How to solve common implementation challenges." "banner": "How to solve common implementation challenges."
}, },
"api": { "api/": {
"icon": "book", "icon": "book",
"title": "API Preview", "title": "API Preview",
"reference": true "reference": true
@ -59,5 +59,10 @@
"icon": "chat", "icon": "chat",
"title": "Help & Support", "title": "Help & Support",
"resources": true "resources": true
},
"styleguide": {
"title": "Docs Style Guide",
"intro": "Design & Layout Patterns For Documentation"
} }
} }

View File

@ -1,12 +1,14 @@
.l-main-section .l-main-section
.l-sub-section .l-sub-section
h3 TypeScript
p: <a href="/docs/ts/latest">Angular 2 TS - Latest Version</a>
h3 JavaScript h3 JavaScript
ul p <a href="/docs/js/latest">Angular 2 JS - Latest Version</a>
li <a href="/docs/js/latest">Angular 2 JS - Latest Version</a>
h3 Dart h3 Dart
ul p: <a href="/docs/dart/latest">Angular 2 Dart - Latest Version</a>
li <a href="/docs/dart/latest">Angular 2 Dart - Latest Version</a>

View File

@ -30,7 +30,7 @@
"banner": "How to solve common implementation challenges." "banner": "How to solve common implementation challenges."
}, },
"api": { "api/": {
"icon": "book", "icon": "book",
"title": "API Preview", "title": "API Preview",
"reference": true "reference": true
@ -59,5 +59,10 @@
"icon": "chat", "icon": "chat",
"title": "Help & Support", "title": "Help & Support",
"resources": true "resources": true
},
"styleguide": {
"title": "Docs Style Guide",
"intro": "Design & Layout Patterns For Documentation"
} }
} }

View File

@ -30,7 +30,7 @@
"banner": "How to solve common implementation challenges." "banner": "How to solve common implementation challenges."
}, },
"api": { "api/": {
"icon": "book", "icon": "book",
"title": "API Preview", "title": "API Preview",
"reference": true "reference": true
@ -59,5 +59,10 @@
"icon": "chat", "icon": "chat",
"title": "Help & Support", "title": "Help & Support",
"resources": true "resources": true
},
"styleguide": {
"title": "Docs Style Guide",
"intro": "Design & Layout Patterns For Documentation"
} }
} }