diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examplefiles/demo.hbs | 12 | ||||
-rw-r--r-- | tests/examplefiles/ember.handlebars | 33 |
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/examplefiles/demo.hbs b/tests/examplefiles/demo.hbs new file mode 100644 index 00000000..1b9ed5a7 --- /dev/null +++ b/tests/examplefiles/demo.hbs @@ -0,0 +1,12 @@ +<!-- post.handlebars --> + +<div class='intro'> + {{intro}} +</div> + +{{#if isExpanded}} + <div class='body'>{{body}}</div> + <button {{action contract}}>Contract</button> +{{else}} + <button {{action expand}}>Show More...</button> +{{/if}} diff --git a/tests/examplefiles/ember.handlebars b/tests/examplefiles/ember.handlebars new file mode 100644 index 00000000..515dffbd --- /dev/null +++ b/tests/examplefiles/ember.handlebars @@ -0,0 +1,33 @@ +{{#view EmberFirebaseChat.ChatView class="chat-container"}} + <div class="chat-messages-container"> + <ul class="chat-messages"> + {{#each message in content}} + <li> + [{{formatTimestamp "message.timestamp" fmtString="h:mm:ss A"}}] + <strong>{{message.sender}}</strong>: {{message.content}} + </li> + {{/each}} + </ul> + </div> + + {{! Comment }} + {{{unescaped value}}} + + {{#view EmberFirebaseChat.InputView class="chat-input-container"}} + <form class="form-inline"> + {{#if "auth.authed"}} + {{#if "auth.hasName"}} + <input type="text" id="message" placeholder="Message"> + <button {{action "postMessage" target="view"}} class="btn">Send</button> + {{else}} + <input type="text" id="username" placeholder="Enter your username..."> + <button {{action "pickName" target="view"}} class="btn">Send</button> + {{/if}} + {{else}} + <input type="text" placeholder="Log in with Persona to chat!" disabled="disabled"> + <button {{action "login"}} class="btn">Login</button> + {{/if}} + </form> + {{/view}} +{{/view}} + |