Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 8f158f2

Browse files
Eric Jimeneznaomiblack
Eric Jimenez
authored andcommitted
docs(sidenav reorg): remove glossary and cheatsheet from REFERENCE. Move glossary to BASICS. Rename REFERENCE to API REFERENCE
1 parent 085e495 commit 8f158f2

File tree

10 files changed

+88
-50
lines changed

10 files changed

+88
-50
lines changed

public/docs/_includes/_side-nav.jade

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- var dir = current.path[4] ? current.path[3] + '/' : '';
44
- var cur = current.path[4] || current.path[3];
55
- cur = cur === 'index' ? '' : cur + '.html';
6-
- cur = base + dir + cur;
6+
- cur = base + dir + cur;
77

88
- var sections = function(dir, selector) {
99
- var secondaryPath = public.docs[current.path[1]][current.path[2]]
@@ -31,7 +31,7 @@
3131
- }
3232
- return section;
3333
- }
34-
34+
3535
- var tutorial = sections('tutorial');
3636
- var cookbook = sections('cookbook');
3737
- var basics = sections('guide', function(item) { return item.basics; });
@@ -42,11 +42,16 @@
4242
- var selectedCount = items.filter(function(item) { return !!item.class; }).length;
4343
- return selectedCount > 0 ? 'is-nav-title-selected' : '';
4444
- }
45-
- var isQuickstartSelected = function(_cur) {
45+
- var isQuickstartSelected = function() {
4646
- var splitted = cur.split('/');
4747
- var bit = splitted[splitted.length - 1].replace('.html', '');
4848
- return bit === 'quickstart' ? 'is-nav-title-selected' : '';
4949
-}
50+
- var isApiReferenceSelected = function() {
51+
- var splitted = cur.split('/');
52+
- var bit = splitted[splitted.length - 2];
53+
- return bit === 'api' ? 'is-nav-title-selected' : '';
54+
-}
5055
- var isCollapsed = function(titleStyle) {
5156
- return titleStyle === 'is-nav-title-selected' ? '' : 'is-hidden';
5257
- }
@@ -99,21 +104,15 @@ nav.side-nav.l-pinned-left.l-layer-4.l-offset-nav
99104
li(class="nav-list-item #{item.class}"): a(href="#{item.href}" title="#{item.tooltip}") #{item.navTitle}
100105

101106
.nav-blocks
102-
a(class="nav-title #{anyItemSelected(reference)}" href="#{reference[0].href}" title="#{reference[0].tooltip}") Reference
103-
img(class="inline-arrow-down-svg" src="/resources/images/icons/ic_keyboard_arrow_down_black_24px.svg")
104-
105-
.nav-unordered-lists(class="#{isCollapsed(anyItemSelected(reference))}")
106-
ul
107-
each item in reference
108-
li(class="nav-list-item #{item.class}"): a(href="#{item.href}" title="#{item.tooltip}") #{item.navTitle}
107+
a(class="nav-title #{isApiReferenceSelected()}" href="#{reference[0].href}" title="#{reference[0].tooltip}") API Reference
109108

110109
script.
111110
// Could put in appCtrl but only needed here and clear here
112111
(function scrollToSelectedLink() {
113-
var sideNav = document.getElementsByClassName('side-nav')[0];
112+
var sideNav = document.getElementsByClassName('side-nav')[0];
114113
var link = sideNav.getElementsByClassName('is-selected')[0];
115114
if(link && link.offsetTop > window.innerHeight){
116115
sideNav.scrollTop = link.offsetTop - (window.innerHeight/2);
117-
//alert("offsetTop: " + link.offsetTop + " side-nav top is " + sideNav.scrollTop);
118-
}
119-
})()
116+
//alert("offsetTop: " + link.offsetTop + " side-nav top is " + sideNav.scrollTop);
117+
}
118+
})()

public/docs/dart/latest/_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
"cheatsheet": {
4040
"title": "Angular Cheat Sheet",
4141
"intro": "A quick guide to Angular syntax.",
42-
"reference": true
42+
"reference": false
4343
},
4444

4545
"glossary": {
4646
"title": "Glossary",
4747
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
48-
"reference": true
48+
"reference": false
4949
},
5050

5151
"resources": {

public/docs/dart/latest/glossary.jade

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
include _util-fns
2-
+includeShared('{ts}', 'intro')
3-
+includeShared('{ts}', 'a2')
4-
+includeShared('{ts}', 'b-c')
5-
+includeShared('{ts}', 'd1')
6-
+includeShared('{ts}', 'd2')
7-
+includeShared('{ts}', 'e1')
8-
+includeShared('{ts}', 'e2')
9-
+includeShared('{ts}', 'f-l')
10-
+includeShared('{ts}', 'm1')
11-
+includeShared('{ts}', 'n-s')
12-
+includeShared('{ts}', 't1')
2+
// From ts/glossary.jade, the folder ts/latest/_fragments is generated which contains a bunch of partial files.
3+
// These partials comprise the glossary,a subset of these partials should be used to generate the glossary for
4+
// __dart__ under BASICS.
5+
!=partial('../../ts/latest/_fragments/glossary-intro')
6+
!=partial('../../ts/latest/_fragments/glossary-a-2')
7+
!=partial('../../ts/latest/_fragments/glossary-b-c')
8+
!=partial('../../ts/latest/_fragments/glossary-d1')
9+
!=partial('../../ts/latest/_fragments/glossary-d2')
10+
!=partial('../../ts/latest/_fragments/glossary-e1')
11+
!=partial('../../ts/latest/_fragments/glossary-e2')
12+
!=partial('../../ts/latest/_fragments/glossary-f-l')
13+
!=partial('../../ts/latest/_fragments/glossary-m1')
14+
//!=partial('../../ts/latest/_fragments/glossary-m2') not needed in dart
15+
!=partial('../../ts/latest/_fragments/glossary-n-s')
16+
!=partial('../../ts/latest/_fragments/glossary-t1')
17+
//!=partial('../../ts/latest/_fragments/glossary-t2') notneeded in dart
18+
!=partial('../../ts/latest/_fragments/glossary-u-z')
1319

14-
+includeShared('{ts}', 'u-z')
20+
// NOTE: (ericjim): I am almost certain these lines are doing nothing,
21+
// so instead I use `!=partial` to include the glossary fragments.
22+
//+includeShared('{ts}', 'intro')
23+
//+includeShared('{ts}', 'a2')
24+
//+includeShared('{ts}', 'b-c')
25+
//+includeShared('{ts}', 'd1')
26+
//+includeShared('{ts}', 'd2')
27+
//+includeShared('{ts}', 'e1')
28+
//+includeShared('{ts}', 'e2')
29+
//+includeShared('{ts}', 'f-l')
30+
//+includeShared('{ts}', 'm1')
31+
//+includeShared('{ts}', 'n-s')
32+
//+includeShared('{ts}', 't1')
33+
//+includeShared('{ts}', 'u-z')

public/docs/dart/latest/guide/_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@
131131
"glossary": {
132132
"title": "Glossary",
133133
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
134-
"hide": true
134+
"basics": true
135135
}
136136
}

public/docs/js/latest/_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
"cheatsheet": {
4040
"title": "Angular Cheat Sheet",
4141
"intro": "A quick guide to Angular syntax.",
42-
"reference": true
42+
"reference": false
4343
},
4444

4545
"glossary": {
4646
"title": "Glossary",
4747
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
48-
"reference": true
48+
"reference": false
4949
},
5050

5151
"resources": {

public/docs/js/latest/glossary.jade

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
include _util-fns
2-
+includeShared('{ts}', 'intro')
3-
+includeShared('{ts}', 'a2')
4-
+includeShared('{ts}', 'b-c')
5-
+includeShared('{ts}', 'd1')
6-
+includeShared('{ts}', 'd2')
7-
+includeShared('{ts}', 'e1')
8-
+includeShared('{ts}', 'e2')
9-
+includeShared('{ts}', 'f-l')
10-
+includeShared('{ts}', 'm1')
11-
+includeShared('{ts}', 'n-s')
12-
+includeShared('{ts}', 't1')
13-
+includeShared('{ts}', 't2')
14-
+includeShared('{ts}', 'u-z')
2+
// From ts/glossary.jade, the folder ts/latest/_fragments is generated which contains a bunch of partial files.
3+
// These partials comprise the glossary,a subset of these partials should be used to generate the glossary for
4+
// __javascript__ under BASICS.
5+
!=partial('../../ts/latest/_fragments/glossary-intro')
6+
//!=partial('../../ts/latest/_fragments/glossary-a-1') not needed in javascript
7+
!=partial('../../ts/latest/_fragments/glossary-a-2')
8+
!=partial('../../ts/latest/_fragments/glossary-b-c')
9+
!=partial('../../ts/latest/_fragments/glossary-d1')
10+
!=partial('../../ts/latest/_fragments/glossary-d2')
11+
!=partial('../../ts/latest/_fragments/glossary-e1')
12+
!=partial('../../ts/latest/_fragments/glossary-e2')
13+
!=partial('../../ts/latest/_fragments/glossary-f-l')
14+
!=partial('../../ts/latest/_fragments/glossary-m1')
15+
!=partial('../../ts/latest/_fragments/glossary-m2')
16+
!=partial('../../ts/latest/_fragments/glossary-n-s')
17+
!=partial('../../ts/latest/_fragments/glossary-t1')
18+
!=partial('../../ts/latest/_fragments/glossary-t2')
19+
!=partial('../../ts/latest/_fragments/glossary-u-z')
20+
21+
// NOTE: (ericjim): I am almost certain these lines are doing nothing,
22+
// so instead I use `!=partial` to include the glossary fragments.
23+
//+includeShared('{ts}', 'intro')
24+
//+includeShared('{ts}', 'a2')
25+
//+includeShared('{ts}', 'b-c')
26+
//+includeShared('{ts}', 'd1')
27+
//+includeShared('{ts}', 'd2')
28+
//+includeShared('{ts}', 'e1')
29+
//+includeShared('{ts}', 'e2')
30+
//+includeShared('{ts}', 'f-l')
31+
//+includeShared('{ts}', 'm1')
32+
//+includeShared('{ts}', 'n-s')
33+
//+includeShared('{ts}', 't1')
34+
//+includeShared('{ts}', 't2')
35+
//+includeShared('{ts}', 'u-z')

public/docs/js/latest/guide/_data.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,9 @@
126126
"intro": "Angular 1 applications can be incrementally upgraded to Angular 2."
127127
},
128128

129-
130129
"glossary": {
131130
"title": "Glossary",
132131
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
133-
"hide": true
132+
"basics": true
134133
}
135134
}

public/docs/ts/latest/_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
"cheatsheet": {
4040
"title": "Angular Cheat Sheet",
4141
"intro": "A quick guide to Angular syntax.",
42-
"reference": true
42+
"reference": false
4343
},
4444

4545
"glossary": {
4646
"title": "Glossary",
4747
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
48-
"reference": true
48+
"reference": false
4949
},
5050

5151
"resources": {

public/docs/ts/latest/guide/_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@
127127
"glossary": {
128128
"title": "Glossary",
129129
"intro": "Brief definitions of the most important words in the Angular 2 vocabulary",
130-
"hide": true
130+
"basics": true
131131
}
132132
}

tools/api-builder/angular.io-package/templates/class.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
.div(layout="row" layout-xs="column" class="instance-members" class="row-margin")
149149
div(flex="20" flex-xs="100")
150150
h2(class="h2-api-docs") Class Details
151-
div(flex="80" flex-xs="100")
151+
div(class="code-links" flex="80" flex-xs="100")
152152
{% for member in doc.members %}{% if not member.internal %}
153153
a(name="{$ member.name $}-anchor" class="anchor-offset")
154154
pre(class="prettyprint no-bg" ng-class="{ 'anchor-focused': appCtrl.isApiDocMemberFocused('{$ member.name $}') }")

0 commit comments

Comments
 (0)