Permalink
Browse files

Starting in on show html

  • Loading branch information...
1 parent 5e2dd93 commit 9e1aa09ec7085657ad51abfe02ceb34fbfcc7209 Zach Moazeni committed May 8, 2012
Showing with 137 additions and 5 deletions.
  1. +3 −1 coffee/site.coffee
  2. +19 −1 coffee/views.coffee
  3. +1 −0 index.html
  4. +104 −0 js-lib/date.js
  5. +9 −2 js/site.js
  6. +1 −1 js/views.js
View
@@ -23,7 +23,9 @@ $ ->
class User extends Spine.Model
@configure "User", "type", "url", "public_gists", "followers", "gravatar_id", "hireable", "avatar_url", "public_repos", "bio", "login", "email", "html_url", "created_at", "company", "blog", "location", "following", "name"
-
+ created_at_date: =>
+ sliced = @created_at.slice(0, @created_at.length - 1)
+ Date.parse(sliced).toString('MMMM d, yyyy')
##
# App
View
@@ -20,7 +20,25 @@ views["index"] = """
views["show"] = """
-<div>user: {{user.name}}</div>
+<header>
+ <div class="span1"><img src="{{user.avatar_url}}" alt="image of {{user.name}}"/></div>
+ <div class="span5">
+ <h1>{{user.name}} <a href="{{user.html_url}}">{{user.login}}</a></h1>
+ <ul>
+ {{#user.email}}
+ <li>Email: <a href="mailto:{{user.email}}">{{user.email}}</a></li>
+ {{/user.email}}
+
+ {{#user.company}}
+ <li>Company: {{user.company}}</li>
+ {{/user.company}}
+
+ {{#user.created_at}}
+ <li>Joined: {{user.created_at_date}}</li>
+ {{/user.created_at}}
+ </ul>
+ </div>
+</header>
"""
views["static"] = """
View
@@ -19,6 +19,7 @@
</footer>
</div>
+ <script src="js-lib/date.js" type="text/javascript"></script>
<script src="js-lib/jquery.min.js" type="text/javascript"></script>
<script src="js-lib/jquery.masonry.min.js" type="text/javascript"></script>
<script src="js-lib/bootstrap.min.js" type="text/javascript"></script>
Oops, something went wrong.

0 comments on commit 9e1aa09

Please sign in to comment.