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 for page, slug in data
if slug != "index" // CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE
// CHECK IF CURRENT PAGE IS SET, THEN SET NEXT PAGE if currentPage
if currentPage if !nextPage && page.nextable
if !nextPage .l-sub-section
.l-sub-section h3 Next Step
h3 Next Step a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
a(href="/docs/#{current.path[1]}/#{current.path[2]}/#{current.path[3]}/#{slug}.html") #{page.title}
//NEXT PAGE HAS NOW BEEN SET //NEXT PAGE HAS NOW BEEN SET
- var nextPage = true - var nextPage = true
// SET CURRENT PAGE FLAG WHEN YOU PASS IT // SET CURRENT PAGE FLAG WHEN YOU PASS IT
if current.path[4] == slug if current.path[4] == slug
- var currentPage = true - 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") article(class="l-content-small grid-fluid docs-content")
!= yield != 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/_next-item")
!= partial("../_includes/_footer") != partial("../_includes/_footer")

View File

@ -2,37 +2,44 @@
"_listtype": "ordered", "_listtype": "ordered",
"index": { "index": {
"title": "Documentation Overview" "title": "Documentation Overview",
"nextable":true
}, },
"architecture": { "architecture": {
"title": "Architecture Overview", "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": { "displaying-data": {
"title": "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": { "user-input": {
"title": "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": { "forms": {
"title": "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": { "dependency-injection": {
"title": "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": { "template-syntax": {
"title": "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": { "attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": { "index": {
"title": "Tutorial: Tour of Heroes", "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": { "toh-pt1": {
"title": "The Hero Editor", "title": "The Hero Editor",
"intro": "We build a simple hero editor" "intro": "We build a simple hero editor",
"nextable":true
}, },
"toh-pt2": { "toh-pt2": {
"title": "Master/Detail", "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": { "toh-pt3": {
"title": "Multiple Components", "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": { "toh-pt4": {
"title": "Services", "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": { "toh-pt5": {
"title": "Routing", "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", "_listtype": "ordered",
"index": { "index": {
"title": "Documentation Overview" "title": "Documentation Overview",
"nextable":true
}, },
"architecture": { "architecture": {
"title": "Architecture Overview", "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": { "displaying-data": {
"title": "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": { "user-input": {
"title": "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": { "forms": {
@ -27,12 +31,14 @@
"dependency-injection": { "dependency-injection": {
"title": "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": { "template-syntax": {
"title": "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": { "attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": { "index": {
"title": "Tutorial: Tour of Heroes", "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": { "toh-pt1": {
"title": "The Hero Editor", "title": "The Hero Editor",
"intro": "We build a simple hero editor" "intro": "We build a simple hero editor",
"nextable":true
}, },
"toh-pt2": { "toh-pt2": {
"title": "Master/Detail", "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": { "toh-pt3": {
"title": "Multiple Components", "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": { "toh-pt4": {
"title": "Services", "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": { "toh-pt5": {
"title": "Routing", "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", "_listtype": "ordered",
"index": { "index": {
"title": "Documentation Overview" "title": "Documentation Overview",
"nextable":true
}, },
"architecture": { "architecture": {
"title": "Architecture Overview", "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": { "displaying-data": {
"title": "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": { "user-input": {
"title": "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": { "forms": {
"title": "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": { "dependency-injection": {
"title": "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": { "template-syntax": {
"title": "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": { "attribute-directives": {

View File

@ -3,26 +3,32 @@
"index": { "index": {
"title": "Tutorial: Tour of Heroes", "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": { "toh-pt1": {
"title": "The Hero Editor", "title": "The Hero Editor",
"intro": "We build a simple hero editor" "intro": "We build a simple hero editor",
"nextable":true
}, },
"toh-pt2": { "toh-pt2": {
"title": "Master/Detail", "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": { "toh-pt3": {
"title": "Multiple Components", "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": { "toh-pt4": {
"title": "Services", "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": { "toh-pt5": {
"title": "Routing", "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
} }
} }