docs: only allow 'Next Step' for *nextable* chapters

This commit is contained in:
Ward Bell 2016-03-03 17:31:37 -08:00
parent cab0abdb2c
commit ed5effa503
8 changed files with 88 additions and 51 deletions

View File

@ -4,17 +4,16 @@
for page, slug in data
if slug != "index"
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
if currentPage
if !nextPage
.l-sub-section
h3 Next Step
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
if currentPage
if !nextPage && page.nextable
.l-sub-section
h3 Next Step
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
//NEXT PAGE HAS NOW BEEN SET
- var nextPage = true
//NEXT PAGE HAS NOW BEEN SET
- var nextPage = true
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug
- var currentPage = true
// SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug
- var currentPage = true

View File

@ -21,7 +21,7 @@ html(lang="en" ng-app="angularIOApp" itemscope itemtype="http://schema.org/Frame
article(class="l-content-small grid-fluid docs-content")
!= yield
if (current.path[3] == 'guide' || current.path[3] == 'testing') && current.path[4]
if (current.path[3] == 'guide' || current.path[3] == 'tutorial') && current.path[4]
!= partial("../_includes/_next-item")
!= partial("../_includes/_footer")

View File

@ -2,37 +2,44 @@
"_listtype": "ordered",
"index": {
"title": "Documentation Overview"
"title": "Documentation Overview",
"nextable":true
},
"architecture": {
"title": "Architecture Overview",
"intro": "The basic building blocks of Angular 2 applications"
"intro": "The basic building blocks of Angular 2 applications",
"nextable":true
},
"displaying-data": {
"title": "Displaying Data",
"intro": "Interpolation and other forms of property binding help us show app data in the UI."
"intro": "Interpolation and other forms of property binding help us show app data in the UI.",
"nextable":true
},
"user-input": {
"title": "User Input",
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models."
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models.",
"nextable":true
},
"forms": {
"title": "Forms",
"intro": "A form creates a cohesive, effective, and compelling data entry experience. An Angular form coordinates a set of data-bound user controls, tracks changes, validates input, and presents errors."
"intro": "A form creates a cohesive, effective, and compelling data entry experience. An Angular form coordinates a set of data-bound user controls, tracks changes, validates input, and presents errors.",
"nextable":true
},
"dependency-injection": {
"title": "Dependency Injection",
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\"."
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\".",
"nextable":true
},
"template-syntax": {
"title": "Template Syntax",
"intro": "Learn how to write templates that display data and consume user events with the help of data binding."
"intro": "Learn how to write templates that display data and consume user events with the help of data binding.",
"nextable":true
},
"attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": {
"title": "Tutorial: Tour of Heroes",
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript."
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript.",
"nextable":true
},
"toh-pt1": {
"title": "The Hero Editor",
"intro": "We build a simple hero editor"
"intro": "We build a simple hero editor",
"nextable":true
},
"toh-pt2": {
"title": "Master/Detail",
"intro": "We build a master/detail page with a list of heroes"
"intro": "We build a master/detail page with a list of heroes",
"nextable":true
},
"toh-pt3": {
"title": "Multiple Components",
"intro": "We refactor the master/detail view into separate components"
"intro": "We refactor the master/detail view into separate components",
"nextable":true
},
"toh-pt4": {
"title": "Services",
"intro": "We create a reusable service to manage our hero data calls"
"intro": "We create a reusable service to manage our hero data calls",
"nextable":true
},
"toh-pt5": {
"title": "Routing",
"intro": "We add the Angular Component Router and learn to navigate among the views"
"intro": "We add the Angular Component Router and learn to navigate among the views",
"nextable":true
}
}

View File

@ -2,22 +2,26 @@
"_listtype": "ordered",
"index": {
"title": "Documentation Overview"
"title": "Documentation Overview",
"nextable":true
},
"architecture": {
"title": "Architecture Overview",
"intro": "The basic building blocks of Angular 2 applications"
"intro": "The basic building blocks of Angular 2 applications",
"nextable":true
},
"displaying-data": {
"title": "Displaying Data",
"intro": "Interpolation and other forms of property binding help us show app data in the UI."
"intro": "Interpolation and other forms of property binding help us show app data in the UI.",
"nextable":true
},
"user-input": {
"title": "User Input",
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models."
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models.",
"nextable":true
},
"forms": {
@ -27,12 +31,14 @@
"dependency-injection": {
"title": "Dependency Injection",
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\"."
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\".",
"nextable":true
},
"template-syntax": {
"title": "Template Syntax",
"intro": "Learn how to write templates that display data and consume user events with the help of data binding."
"intro": "Learn how to write templates that display data and consume user events with the help of data binding.",
"nextable":true
},
"attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": {
"title": "Tutorial: Tour of Heroes",
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript."
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript.",
"nextable":true
},
"toh-pt1": {
"title": "The Hero Editor",
"intro": "We build a simple hero editor"
"intro": "We build a simple hero editor",
"nextable":true
},
"toh-pt2": {
"title": "Master/Detail",
"intro": "We build a master/detail page with a list of heroes"
"intro": "We build a master/detail page with a list of heroes",
"nextable":true
},
"toh-pt3": {
"title": "Multiple Components",
"intro": "We refactor the master/detail view into separate components"
"intro": "We refactor the master/detail view into separate components",
"nextable":true
},
"toh-pt4": {
"title": "Services",
"intro": "We create a reusable service to manage our hero data calls"
"intro": "We create a reusable service to manage our hero data calls",
"nextable":true
},
"toh-pt5": {
"title": "Routing",
"intro": "We add the Angular Component Router and learn to navigate among the views"
"intro": "We add the Angular Component Router and learn to navigate among the views",
"nextable":true
}
}

View File

@ -2,37 +2,44 @@
"_listtype": "ordered",
"index": {
"title": "Documentation Overview"
"title": "Documentation Overview",
"nextable":true
},
"architecture": {
"title": "Architecture Overview",
"intro": "The basic building blocks of Angular 2 applications"
"intro": "The basic building blocks of Angular 2 applications",
"nextable":true
},
"displaying-data": {
"title": "Displaying Data",
"intro": "Interpolation and other forms of property binding help us show app data in the UI."
"intro": "Interpolation and other forms of property binding help us show app data in the UI.",
"nextable":true
},
"user-input": {
"title": "User Input",
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models."
"intro": "User input triggers DOM events. We listen to those events with event bindings that funnel updated values back into our components and models.",
"nextable":true
},
"forms": {
"title": "Forms",
"intro": "A form creates a cohesive, effective, and compelling data entry experience. An Angular form coordinates a set of data-bound user controls, tracks changes, validates input, and presents errors."
"intro": "A form creates a cohesive, effective, and compelling data entry experience. An Angular form coordinates a set of data-bound user controls, tracks changes, validates input, and presents errors.",
"nextable":true
},
"dependency-injection": {
"title": "Dependency Injection",
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\"."
"intro": "Angular's dependency injection system creates and delivers dependent services \"just-in-time\".",
"nextable":true
},
"template-syntax": {
"title": "Template Syntax",
"intro": "Learn how to write templates that display data and consume user events with the help of data binding."
"intro": "Learn how to write templates that display data and consume user events with the help of data binding.",
"nextable":true
},
"attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": {
"title": "Tutorial: Tour of Heroes",
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript."
"intro": "The Tour of Heroes tutorial takes us through the steps of creating an Angular application in TypeScript.",
"nextable":true
},
"toh-pt1": {
"title": "The Hero Editor",
"intro": "We build a simple hero editor"
"intro": "We build a simple hero editor",
"nextable":true
},
"toh-pt2": {
"title": "Master/Detail",
"intro": "We build a master/detail page with a list of heroes"
"intro": "We build a master/detail page with a list of heroes",
"nextable":true
},
"toh-pt3": {
"title": "Multiple Components",
"intro": "We refactor the master/detail view into separate components"
"intro": "We refactor the master/detail view into separate components",
"nextable":true
},
"toh-pt4": {
"title": "Services",
"intro": "We create a reusable service to manage our hero data calls"
"intro": "We create a reusable service to manage our hero data calls",
"nextable":true
},
"toh-pt5": {
"title": "Routing",
"intro": "We add the Angular Component Router and learn to navigate among the views"
"intro": "We add the Angular Component Router and learn to navigate among the views",
"nextable":true
}
}