diff --git a/app/controllers/HomeController.scala b/app/controllers/HomeController.scala index a792caf..132e95a 100644 --- a/app/controllers/HomeController.scala +++ b/app/controllers/HomeController.scala @@ -34,7 +34,13 @@ class HomeController @Inject()( Ok(views.html.robot.demo(assetsFinder)) } - def tutorial = Action { implicit request => - Ok(views.html.robot.tutorial(assetsFinder)) + def tutorialHome = Action { implicit request => + Ok(views.html.tutorialHome(assetsFinder)) + } + + def tutorial(part: Int) = Action { implicit request => + if (part == 1) { + Ok(views.html.robot.tutorial(assetsFinder)) + } else NotFound } } diff --git a/app/views/index.scala.html b/app/views/index.scala.html index b2c13d9..4dd7ad4 100644 --- a/app/views/index.scala.html +++ b/app/views/index.scala.html @@ -45,11 +45,11 @@
* Rewrote Garage frontend
* Fixed bug with robot saving not working
+* RR Tutorial
* RR Tutorial
* Improvements to the CLI
* New action type (healing)
* A competition!
diff --git a/app/views/main.scala.html b/app/views/main.scala.html index d1acf3d..2d621b2 100644 --- a/app/views/main.scala.html +++ b/app/views/main.scala.html @@ -18,6 +18,10 @@ boards + + + tutorial + docs diff --git a/conf/routes b/conf/routes index 422bcac..556b965 100644 --- a/conf/routes +++ b/conf/routes @@ -5,7 +5,8 @@ GET / controllers.HomeController.index GET /rules controllers.HomeController.rules GET /demo controllers.HomeController.demo -GET /tutorial controllers.HomeController.tutorial +GET /tutorial controllers.HomeController.tutorialHome +GET /tutorial/:part controllers.HomeController.tutorial(part: Int) GET /signup controllers.UserController.create POST /signup controllers.UserController.postCreate