File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -464,7 +464,22 @@ <h2>Example code</h2>
464464 cache : true
465465 } ,
466466 templateResult : function ( repo ) {
467- return repo . full_name ;
467+ var markup = '<div class="row">' +
468+ '<div class="col-sm-1"><img src="' + repo . owner . avatar_url + '" style="max-width: 100%" /></div>' +
469+ '<div class="col-sm-11">' +
470+ '<div class="row">' +
471+ '<div class="col-sm-6">' + repo . full_name + '</div>' +
472+ '<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + repo . forks_count + '</div>' +
473+ '<div class="col-sm-3"><i class="fa fa-star"></i> ' + repo . stargazers_count + '</div>' +
474+ '</div>' ;
475+
476+ if ( repo . description ) {
477+ markup += '<div>' + repo . description + '</div>' ;
478+ }
479+
480+ markup += '</div></div>' ;
481+
482+ return markup ;
468483 } ,
469484 templateSelection : function ( repo ) {
470485 return repo . full_name ;
You can’t perform that action at this time.
0 commit comments