% extends 'skins/base.html' %> <% subskin 'content' -------------------------------------------------------------------- %> <% render <% page %> %> <% subskin 'welcome' | markdown %> This is a little game to show off continuations support in RingoJS. All you'll have to do is answer a few easy questions. > [Click here to start](<% session.first %>) What's special about this demo is that all pages are generated by [one single JavaScript function][1] providing multiple action callbacks. Local variables are stored in the HTTP user session, so no extra effort is required to manage state between pages. [1]: http://github.com/ringo/ringojs/blob/master/apps/demo/actions.js#L85 <% subskin 'ask_name' | markdown %> What is your name?
[forward](<% session.next %>) <% render 'list' %> <% subskin 'ask_food' | markdown %> What is your favorite food? [back](<% session.previous %>) [forward](<% session.next %>) <% render 'list' %> <% subskin 'ask_animal' | markdown %> What is your favorite animal? [back](<% session.previous %>) [forward](<% session.next %>) <% render 'list' %> <% subskin 'result' | markdown %> Thanks for your collaboration. Your name is <% session.data.name %>, you love to eat <% session.data.food %> and your favorite animal is <% session.data.animal %>. [back](<% session.previous %>) <% render 'list' %> <% subskin 'list'%> <% for value in <% session.data %> render 'item' | wrap "