Skip to content

Instantly share code, notes, and snippets.

@potomak
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save potomak/5272d7723bb71a9b015e to your computer and use it in GitHub Desktop.
Save potomak/5272d7723bb71a9b015e to your computer and use it in GitHub Desktop.
Test story

{{#kitchen}} You remember you already saw the kitchen, but let's take a look at it again. {{/kitchen}}

{{^kitchen}} You never saw the kitchen, you're excited! {{/kitchen}}

Enter the kitchen.

init state
function() { window.counter = window.counter + 1 || 1; }
name kitchen foo counter
Giovanni
false
function() { return 'foo'; }
function() { return window.counter; }

Test story

Hi {{name}}, this is a test story of {{foo}}.

The counter is set to: {{counter}}.

{{^key}} There's a door. It's locked, you need a key to unlock it.

Go find the key. {{/key}}

{{#key}} There's a stair. {{/key}}

Or you can explore the kitchen.

state style
key
true
body { color: red; background-color: gold; }

You found the key!

Now you can open the door.

state
kitchen
true

It's a normal kitchen.

Go back.

body {
color: #eee;
background-color: #222;
font-family: monospace;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment