{{#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}}
{{#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}}
init | state | ||||||||
---|---|---|---|---|---|---|---|---|---|
function() {
window.counter = window.counter + 1 || 1;
}
|
|
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 | ||
---|---|---|---|
|
body {
color: red;
background-color: gold;
}
|
You found the key!
Now you can open the door.
state | ||
---|---|---|
|
It's a normal kitchen.
Nothing to see here...
body { | |
color: #eee; | |
background-color: #222; | |
font-family: monospace; | |
} |