Skip to content

Link watcher and fork counts to GitHub on the Plugin Registry. #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions themes/plugins.jquery.com/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ function jq_plugin_watchers() {
return jq_plugin_meta( array( "key" => "watchers" ) );
}

function jq_plugin_watchers_url() {
return jq_plugin_repo_url() . "/stargazers";
}

function jq_plugin_forks() {
return jq_plugin_meta( array( "key" => "forks" ) );
}

function jq_plugin_forks_url() {
return jq_plugin_repo_url() . "/network";
}

function jq_plugin_versions() {
$versions = jq_plugin_meta( array( "key" => "versions" ) );
$latest = jq_plugin_meta( array( "key" => "latest" ) );
Expand Down
8 changes: 4 additions & 4 deletions themes/plugins.jquery.com/sidebar-jquery_plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@

<aside class="widget github-activity group">
<h3 class="widget-title"><span class="icon-github"></span>GitHub Activity</h3>
<div class="info-block watchers">
<a href="<?php echo jq_plugin_watchers_url(); ?>" class="info-block watchers">
<div class="number"><?php echo jq_plugin_watchers(); ?></div>
<div class="caption">Watchers</div>
</div>
<div class="info-block forks">
</a>
<a href="<?php echo jq_plugin_forks_url(); ?>" class="info-block forks">
<div class="number"><?php echo jq_plugin_forks(); ?></div>
<div class="caption">Forks</div>
</div>
</a>
</aside>

<aside class="widget author-info">
Expand Down
4 changes: 4 additions & 0 deletions themes/plugins.jquery.com/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ a {
font: bold 11px "klavika-web", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}

.jquery-plugin #sidebar .github-activity a:hover {
text-decoration: none;
}

.jquery-plugin #sidebar li a {
overflow: hidden;
white-space: nowrap;
Expand Down