Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Created April 10, 2013 01:44
Show Gist options
  • Save thomasboyt/5351074 to your computer and use it in GitHub Desktop.
Save thomasboyt/5351074 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=latin1">
<style type="text/css">
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 125%; }
body .hll { background-color: #49483e }
body { background: #272822; color: #f8f8f2 }
body .c { color: #75715e } /* Comment */
body .err { color: #960050; background-color: #1e0010 } /* Error */
body .k { color: #66d9ef } /* Keyword */
body .l { color: #ae81ff } /* Literal */
body .n { color: #f8f8f2 } /* Name */
body .o { color: #f92672 } /* Operator */
body .p { color: #f8f8f2 } /* Punctuation */
body .cm { color: #75715e } /* Comment.Multiline */
body .cp { color: #75715e } /* Comment.Preproc */
body .c1 { color: #75715e } /* Comment.Single */
body .cs { color: #75715e } /* Comment.Special */
body .ge { font-style: italic } /* Generic.Emph */
body .gs { font-weight: bold } /* Generic.Strong */
body .kc { color: #66d9ef } /* Keyword.Constant */
body .kd { color: #66d9ef } /* Keyword.Declaration */
body .kn { color: #f92672 } /* Keyword.Namespace */
body .kp { color: #66d9ef } /* Keyword.Pseudo */
body .kr { color: #66d9ef } /* Keyword.Reserved */
body .kt { color: #66d9ef } /* Keyword.Type */
body .ld { color: #e6db74 } /* Literal.Date */
body .m { color: #ae81ff } /* Literal.Number */
body .s { color: #e6db74 } /* Literal.String */
body .na { color: #a6e22e } /* Name.Attribute */
body .nb { color: #f8f8f2 } /* Name.Builtin */
body .nc { color: #a6e22e } /* Name.Class */
body .no { color: #66d9ef } /* Name.Constant */
body .nd { color: #a6e22e } /* Name.Decorator */
body .ni { color: #f8f8f2 } /* Name.Entity */
body .ne { color: #a6e22e } /* Name.Exception */
body .nf { color: #a6e22e } /* Name.Function */
body .nl { color: #f8f8f2 } /* Name.Label */
body .nn { color: #f8f8f2 } /* Name.Namespace */
body .nx { color: #a6e22e } /* Name.Other */
body .py { color: #f8f8f2 } /* Name.Property */
body .nt { color: #f92672 } /* Name.Tag */
body .nv { color: #f8f8f2 } /* Name.Variable */
body .ow { color: #f92672 } /* Operator.Word */
body .w { color: #f8f8f2 } /* Text.Whitespace */
body .mf { color: #ae81ff } /* Literal.Number.Float */
body .mh { color: #ae81ff } /* Literal.Number.Hex */
body .mi { color: #ae81ff } /* Literal.Number.Integer */
body .mo { color: #ae81ff } /* Literal.Number.Oct */
body .sb { color: #e6db74 } /* Literal.String.Backtick */
body .sc { color: #e6db74 } /* Literal.String.Char */
body .sd { color: #e6db74 } /* Literal.String.Doc */
body .s2 { color: #e6db74 } /* Literal.String.Double */
body .se { color: #ae81ff } /* Literal.String.Escape */
body .sh { color: #e6db74 } /* Literal.String.Heredoc */
body .si { color: #e6db74 } /* Literal.String.Interpol */
body .sx { color: #e6db74 } /* Literal.String.Other */
body .sr { color: #e6db74 } /* Literal.String.Regex */
body .s1 { color: #e6db74 } /* Literal.String.Single */
body .ss { color: #e6db74 } /* Literal.String.Symbol */
body .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
body .vc { color: #f8f8f2 } /* Name.Variable.Class */
body .vg { color: #f8f8f2 } /* Name.Variable.Global */
body .vi { color: #f8f8f2 } /* Name.Variable.Instance */
body .il { color: #ae81ff } /* Literal.Number.Integer.Long */
</style>
</head>
<body>
<h2></h2>
<div class="highlight"><pre><span class="cp">{{</span><span class="nf">#view</span> <span class="nv">EmberFirebaseChat.ChatView</span> <span class="na">class</span><span class="o">=</span><span class="s2">&quot;chat-container&quot;</span><span class="cp">}}</span>
<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;chat-messages-container&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;ul</span> <span class="na">class=</span><span class="s">&quot;chat-messages&quot;</span><span class="nt">&gt;</span>
<span class="cp">{{</span><span class="k">#each</span> <span class="nv">message</span> <span class="k">in</span> <span class="nv">content</span><span class="cp">}}</span>
<span class="nt">&lt;li&gt;</span>
[<span class="cp">{{</span><span class="nv">formatTimestamp</span> <span class="s2">&quot;message.timestamp&quot;</span> <span class="na">fmtString</span><span class="o">=</span><span class="s2">&quot;h:mm:ss A&quot;</span><span class="cp">}}</span>]
<span class="nt">&lt;strong&gt;</span><span class="cp">{{</span><span class="nv">message.sender</span><span class="cp">}}</span><span class="nt">&lt;/strong&gt;</span>: <span class="cp">{{</span><span class="nv">message.content</span><span class="cp">}}</span>
<span class="nt">&lt;/li&gt;</span>
<span class="cp">{{</span><span class="k">/each</span><span class="cp">}}</span>
<span class="nt">&lt;/ul&gt;</span>
<span class="nt">&lt;/div&gt;</span>
<span class="c">{{! Comment }}</span>
<span class="cs">{{{</span><span class="nv">unescaped</span> <span class="nv">value</span><span class="cs">}}}</span>
<span class="cp">{{</span><span class="nf">#view</span> <span class="nv">EmberFirebaseChat.InputView</span> <span class="na">class</span><span class="o">=</span><span class="s2">&quot;chat-input-container&quot;</span><span class="cp">}}</span>
<span class="nt">&lt;form</span> <span class="na">class=</span><span class="s">&quot;form-inline&quot;</span><span class="nt">&gt;</span>
<span class="cp">{{</span><span class="k">#if</span> <span class="s2">&quot;auth.authed&quot;</span><span class="cp">}}</span>
<span class="cp">{{</span><span class="k">#if</span> <span class="s2">&quot;auth.hasName&quot;</span><span class="cp">}}</span>
<span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">id=</span><span class="s">&quot;message&quot;</span> <span class="na">placeholder=</span><span class="s">&quot;Message&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;button</span> <span class="cp">{{</span><span class="nv">action</span> <span class="s2">&quot;postMessage&quot;</span> <span class="na">target</span><span class="o">=</span><span class="s2">&quot;view&quot;</span><span class="cp">}}</span> <span class="na">class=</span><span class="s">&quot;btn&quot;</span><span class="nt">&gt;</span>Send<span class="nt">&lt;/button&gt;</span>
<span class="cp">{{</span><span class="k">else</span><span class="cp">}}</span>
<span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">id=</span><span class="s">&quot;username&quot;</span> <span class="na">placeholder=</span><span class="s">&quot;Enter your username...&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;button</span> <span class="cp">{{</span><span class="nv">action</span> <span class="s2">&quot;pickName&quot;</span> <span class="na">target</span><span class="o">=</span><span class="s2">&quot;view&quot;</span><span class="cp">}}</span> <span class="na">class=</span><span class="s">&quot;btn&quot;</span><span class="nt">&gt;</span>Send<span class="nt">&lt;/button&gt;</span>
<span class="cp">{{</span><span class="k">/if</span><span class="cp">}}</span>
<span class="cp">{{</span><span class="k">else</span><span class="cp">}}</span>
<span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">placeholder=</span><span class="s">&quot;Log in with Persona to chat!&quot;</span> <span class="na">disabled=</span><span class="s">&quot;disabled&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;button</span> <span class="cp">{{</span><span class="nv">action</span> <span class="s2">&quot;login&quot;</span><span class="cp">}}</span> <span class="na">class=</span><span class="s">&quot;btn&quot;</span><span class="nt">&gt;</span>Login<span class="nt">&lt;/button&gt;</span>
<span class="cp">{{</span><span class="k">/if</span><span class="cp">}}</span>
<span class="nt">&lt;/form&gt;</span>
<span class="cp">{{</span><span class="nf">/view</span><span class="cp">}}</span>
<span class="cp">{{</span><span class="nf">/view</span><span class="cp">}}</span>
</pre></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment