Skip to content

Commit 95c34d2

Browse files
committed
docs: temporary TS-referencing chapters for gaps in JS/Dart
Also displays styleguide at language level Fragmented glossary for JS & Dart
1 parent 8bc53b2 commit 95c34d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+429
-815
lines changed

public/_includes/_footer.jade

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
if current.path[1]
2+
- var language = current.path[1]
3+
if current.path[2]
4+
- var version = current.path[2].replace(/\_+/gm, ".")
5+
if version && language
6+
- var styleguide = "/docs/"+language+"/"+ version +"/styleguide.html"
7+
else
8+
- var styleguide = "/docs/ts/latest/styleguide.html"
9+
110
.main-footer
211
nav.background-silver.grid-fluid
312

@@ -44,5 +53,5 @@
4453

4554
footer(class="background-steel")
4655
small.text-caption Powered by Google ©2010-2016. Code licensed under an <a href="/license" class="text-snow">MIT-style License</a>. Documentation licensed under <a class="text-snow" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
47-
a(aria-label="View Style Guide" href="/docs/styleguide.html" title="Style Guide" class="styleguide-trigger text-snow" md-button)
56+
a(aria-label="View Style Guide" href=styleguide title="Style Guide" class="styleguide-trigger text-snow" md-button)
4857
span.icon-favorite

public/_includes/_version-dropdown.jade

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
- var version = ''
66
- var page = ''
77

8-
<!-- Replace _ undscores with . dots -->
8+
<!-- Replace _ underscores with . dots -->
99
if current.path[2]
1010
- var version = current.path[2].replace(/\_+/gm, ".")
1111

12-
<!-- Replace _ undscores with . dots -->
13-
if current.path[3]
12+
if current.path[4]
13+
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
14+
- var page = current.path[3] + '/' + current.path[4] + '/'
15+
else
16+
- var page = current.path[3] + '/' + current.path[4] + '.html'
17+
18+
else if current.path[3]
1419
if public.docs[current.path[1]][current.path[2]][current.path[3]]
1520
- var page = current.path[3] + '/'
1621
else

public/docs/_includes/_ts-temp.jade

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
- var language = current.path[1]
2+
- var lang = 'your choosen language'
3+
4+
if language == 'dart'
5+
- lang = 'Dart'
6+
if language == 'js'
7+
- lang = 'JavaScript'
8+
if language == 'ts'
9+
- lang = 'TypeScript'
10+
11+
- var page = ''
12+
if current.path[4]
13+
- var page = current.path[4] + '.html'
14+
15+
- var path = '/docs/ts/latest/'+ current.path[3] + '/' + page
16+
17+
- var name = 'it'
18+
- var secondaryPath = public.docs[current.path[1]][current.path[2]][current.path[3]]
19+
if secondaryPath
20+
- var data = secondaryPath._data
21+
- var listType = data._listtype
22+
- var items = listType == 'api' ? secondaryPath : data
23+
24+
for item, slug in items
25+
if slug == current.path[4]
26+
- name = 'the <b><i>' + item.title + '</i></b> chapter'
27+
28+
p.
29+
This chapter is not yet available in #{lang}.
30+
We recommend reading the TypeScript version.
31+
a(href=path, class='md-primary md-button md-ink-ripple').
32+
Read !{name} in TypeScript
33+
// != partial(path)

public/docs/_includes/styleguide/_code-examples.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ include ../../../_includes/_util-fns
170170
as can CSS files:
171171

172172
code-example(format="linenums" language="css").
173-
/* #docregion bar */
173+
/* #docregion center-global */
174174
.center-global {
175175
max-width: 1020px;
176176
margin: 0 auto;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.grid-fluid
2+
.c10
3+
!= partial("_layouts")
4+
!= partial("_code-examples")
5+
!= partial("_alerts")
6+
!= partial("_callouts")
7+
!= partial("_tables")
8+
!= partial("_aside")
9+
10+
//!= partial("_jump-nav")

public/docs/dart/latest/_data.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,24 @@
1111
"title": "5 Min Quickstart"
1212
},
1313

14+
"tutorial": {
15+
"icon": "list",
16+
"title": "Tutorial",
17+
"banner": "Angular 2 is currently in Beta."
18+
},
19+
1420
"guide": {
1521
"icon": "list",
1622
"title": "Developers Guide",
1723
"banner": "Angular 2 is currently in Beta."
1824
},
1925

26+
"cookbook": {
27+
"icon": "list",
28+
"title": "Cookbook",
29+
"banner": "How to solve common implementation challenges."
30+
},
31+
2032
"api": {
2133
"icon": "book",
2234
"title": "API Proposal"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"_listtype": "alpha",
3+
4+
"index": {
5+
"title": "Cookbook",
6+
"description": "A collection of recipes for common Angular application scenarios"
7+
},
8+
9+
"a1-a2-quick-reference": {
10+
"title": "Angular 1 to 2 Quick Ref",
11+
"description": "Learn how Angular 1 concepts and techniques map to Angular 2"
12+
},
13+
14+
"component-communication": {
15+
"title": "Component Interaction",
16+
"description": "Share information between different directives and components"
17+
}
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

0 commit comments

Comments
 (0)