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",
"subtitle": "Choose a language for Angular",
"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];
- item.slug = prop;
- 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;
- item.class = cur === href ? 'is-selected' : '';
- item.file = file;
- item.href = href;
- item.navTitle = item.navTitle || item.title;
- item.tooltip = item.description || item.intro || '';
- item.tooltip = item.description || item.intro || item.title || '';
- section.push(item);
- }
- }
@ -36,7 +38,6 @@
- var guide = sections('guide', function(item) { return !item.basics; });
- var qs = sections('', function(item) { return item.slug === 'quickstart'; })[0] || {};
- 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
// SEARCH BAR
@ -85,14 +86,6 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
each item in reference
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.
// Could put in appCtrl but only needed here and clear here
(function scrollToSelectedLink() {

View File

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

View File

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

View File

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