Skip to content

Commit

Permalink
modified github stats layout, #30
Browse files Browse the repository at this point in the history
  • Loading branch information
dnbard committed Jul 20, 2014
1 parent 79f4b0d commit 3089813
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions extension/services/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ define(function (require, exports, module){
//hide daily downloads counter for extensions without daily downloads
if (!dailyDownloads) { $t.find('.ext-daily').hide(); }

//hide stars counter for extensions without stars on GitHub
if (!stars) { $t.find('.ext-stars').hide(); }

//hide forks counter for extensions without forks on GitHub
if (!forks) { $t.find('.ext-forks').hide(); }

if (registryEntry.badge && registryEntry.badge.length > 0){
badgeHolder = $('<div class="ext-badges"></div>');
$t.find('.ext-info').append(badgeHolder);
Expand Down
4 changes: 4 additions & 0 deletions extension/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ span.ext-daily{
.fa{
font-size: 14px;
}

.ext-stars, .ext-forks{
margin-right: 2px;
}
8 changes: 6 additions & 2 deletions extension/templates/downloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<span data-extension-id="${id}" title="${downloads} ${str_downloads}" class="ext-link_more">${downloads}</span>
</a>
<span title="${daily} ${str_daily}" class="ext-daily">(+${daily})</span>
<i class="fa fa-star"></i> ${stars}
<i class="fa fa-code-fork"></i> ${forks}
<span class="ext-stars">
<i class="fa fa-star"></i> ${stars}
</span>
<span class="ext-forks">
<i class="fa fa-code-fork"></i> ${forks}
</span>
</div>

0 comments on commit 3089813

Please sign in to comment.