Skip to content

Commit

Permalink
Styling Gist Event
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Moazeni committed May 9, 2012
1 parent 6e8aa46 commit cefa4c1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coffee/site.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class Event extends Spine.Model
when "FollowEvent" then "follow" when "FollowEvent" then "follow"
when "PullRequestEvent" when "PullRequestEvent"
if @payload.action == "opened" then "pull_request" else "skip" if @payload.action == "opened" then "pull_request" else "skip"
when "GistEvent"
if @payload.action == "create" then "gist" else "skip"
when "CreateEvent" when "CreateEvent"
switch @payload.ref_type switch @payload.ref_type
when "branch" when "branch"
Expand All @@ -77,6 +79,8 @@ class Event extends Spine.Model
switch view switch view
when "item" when "item"
[view, id:@id, title:@type, date:@created_at_short_string()] [view, id:@id, title:@type, date:@created_at_short_string()]
when "gist"
[view, id:@id, url:@payload.gist.html_url, date:@created_at_short_string()]
when "issue" when "issue"
[view, [view,
id:@id id:@id
Expand Down
8 changes: 8 additions & 0 deletions coffee/views.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ views["issue"] = """
</li> </li>
""" """


views["gist"] = """
<li class="item" data-id="{{id}}">
<span class="corner"></span>
<h1>Created a <a href="{{url}}">gist</a></h1>
<span class="date">{{date}}</span>
</li>
"""

views["issue_comment"] = """ views["issue_comment"] = """
<li class="item" data-id="{{id}}"> <li class="item" data-id="{{id}}">
<span class="corner"></span> <span class="corner"></span>
Expand Down
15 changes: 15 additions & 0 deletions js/site.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions js/views.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cefa4c1

Please sign in to comment.