From fd8d03fc116f28f32fccd57108e827c9af351e5f Mon Sep 17 00:00:00 2001 From: Geoff Doty Date: Wed, 19 Jun 2019 17:45:10 -0400 Subject: [PATCH] added routing example --- app/css/main.css | 2 ++ app/js/app.js | 5 ++++ app/tags/home.tag.html | 42 ++++++++++++++++----------------- app/tags/layout/footer.tag.html | 22 ++++++++--------- app/tags/layout/header.tag.html | 25 ++++++++++---------- 5 files changed, 52 insertions(+), 44 deletions(-) diff --git a/app/css/main.css b/app/css/main.css index c475dd6..1518859 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -3,3 +3,5 @@ body {font-size: 1.2em;} .header, .footer { margin: 1.4em 0; } + +code {color: indianred} diff --git a/app/js/app.js b/app/js/app.js index 14f43e2..437c13c 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -43,6 +43,11 @@ route('/', function () { riot.mount('#view', 'home'); }); +// about page +route('/about', function () { + riot.mount('#view', 'about'); +}); + // [ start router ] ------------------------------ route.start(true); \ No newline at end of file diff --git a/app/tags/home.tag.html b/app/tags/home.tag.html index 8caae5a..197a535 100644 --- a/app/tags/home.tag.html +++ b/app/tags/home.tag.html @@ -1,21 +1,21 @@ - -
- -

RiotJS Kickstarter

- - Built your next revolutionary Single Page Application (SPA) starting right here: - -
/app/tags/home.tag.html
- - This seed kicks your development into high gear with all tools you'll need, and very little you don't. - -
    -
  • * RiotJS+Compiler for rapid application prototyping
  • -
  • * Router to manage url navigation
  • -
  • * Grayscale CSS for minimal style
  • -
- - No bloat here. -

-

-
+ +
+ +

RiotJS Kickstarter

+ + Built your next revolutionary Single Page Application (SPA) starting right here: + +
/app/tags/home.tag.html
+ + This seed kicks your development into high gear with all tools you'll need, and very little you don't. + +
    +
  • * RiotJS+Compiler for rapid application prototyping
  • +
  • * Router to manage url navigation
  • +
  • * Grayscale CSS for minimal style
  • +
+ + No bloat here. +

+

+
diff --git a/app/tags/layout/footer.tag.html b/app/tags/layout/footer.tag.html index 4bc3e12..568b4f2 100644 --- a/app/tags/layout/footer.tag.html +++ b/app/tags/layout/footer.tag.html @@ -1,12 +1,12 @@ -