Feature: List commits
Let's add a list of commits for the feature List Commits
. Each item in the list consists of a commit message
, project name
, a date
, and the committer's username
. The following is a HTML template ./templates/commits.hbs
for a commit item:
<a class="pull-left" href="#"> <img class="media-object" src="{{avatar_url}}" style="width:64px; height:64px"> </a> <div class="media-body"> <h4 class="media-heading">{{message}}</h4> <small>{{repository}}</small> <small>{{ago}}</small> <br/><small>{{login}}</small> </div>
Let's implement our Commit
model. We define a function, Commit
, which extends the Backbone Model
type, and we include a hash of default values for the properties in our model.
Vision.Commit = Backbone.Model.extend({ defaults: ...
Get Advanced Express Web Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.