Created
November 6, 2010 23:28
-
-
Save hns/665796 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% subskin content %> | |
<p>Logs for the <a href="irc://irc.freenode.net/ringojs">RingoJS IRC channel</a>, | |
as logged by <a href="http://github.com/earl/ringobot"><code>ringostarr</code></a>.</p> | |
<h1><% day %></h1> | |
<% for record in <% records %> render record %> | |
<% subskin record %> | |
<p class="utterance"> | |
<span class="time">[<% record.datetime | substring 11 16 %>]</span> | |
<% if <% record.is_message %> render message_record %> | |
<% if <% record.is_action %> render action_record %> | |
</p> | |
<% subskin message_record %> | |
<span class="is_message"> | |
<span class="sender"><<% record.sender %>></span> | |
<span class="message"><% record.message %></span> | |
</span> | |
<% subskin action_record %> | |
<span class="is_action"> | |
* | |
<span class="sender"><% record.sender %></span> | |
<span class="action"><% record.action %></span> | |
</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function content() { | |
return html( | |
["p", "Logs for the ", | |
["a", {href: "irc://irc.freenode.net/ringojs"}, "RingoJS IRC channel"], | |
", as logged by ", | |
["a", {href: "http://github.com/earl/ringobot"}, ["code", "ringostarr"]]], | |
["h1", day], | |
records.map(record)); | |
} | |
function record(r) { | |
return html( | |
"p.utterance", | |
["span.time", "[", r.datetime, "]"], | |
r.is_message ? | |
["span.is_message", | |
["span.sender", "<", r.sender, ">"], | |
["span.message", r.message]] : | |
["span.is_action", " * ", | |
["span.sender", "<", r.sender, ">"], | |
["span.action", r.action]]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment