diff --git a/lib/MetaCPAN/Web/Model/ReleaseInfo.pm b/lib/MetaCPAN/Web/Model/ReleaseInfo.pm index 48b8746d97..e75866a9f7 100644 --- a/lib/MetaCPAN/Web/Model/ReleaseInfo.pm +++ b/lib/MetaCPAN/Web/Model/ReleaseInfo.pm @@ -95,6 +95,7 @@ sub _fetch { $data->{chat} = $self->_get_chat( $release, $dist ); $data->{issues} = $self->_get_issues( $release, $dist ); + $data->{github} = $dist->{repo}->{github}; $data->{repository} = $self->_get_repository( $release, $dist ); Future->done($data); diff --git a/root/inc/favorite.tx b/root/inc/favorite.tx index 4b365c2747..aa8009fbeb 100644 --- a/root/inc/favorite.tx +++ b/root/inc/favorite.tx @@ -10,3 +10,11 @@
+%% if $github && $repository.url { +
+ + ⭐ Starred [% $github.stars %] + GitHub stars + +
+%% } diff --git a/root/static/less/global.less b/root/static/less/global.less index aa9638129e..34232c0375 100644 --- a/root/static/less/global.less +++ b/root/static/less/global.less @@ -110,11 +110,10 @@ a.favorite { display: inline-block; line-height: 1; text-align: right; - min-width: 25px; position: relative; - top: -1px; font-size: @font-size-base; font-weight: normal; + height: 100%; min-width: 35px; cursor: pointer; @@ -236,6 +235,30 @@ a.ellipsis:hover * { margin-bottom: 1px; } +.star-rating { + & a.btn.btn-primary { + padding: 1px 3px; + font-size: 0.9em; + background: #f0f0f0 linear-gradient(to bottom, #fbfbfb, #f0f0f0); + color: #000; + min-width: 25px; + position: relative; + font-size: @font-size-base; + font-weight: normal; + min-width: 35px; + border-color: #e0e0e0; + line-height: 1.54em; + + &:hover { + background: #36c linear-gradient(to bottom, #69f, #36c); + color: #fff; + border-color: #36c; + opacity: 1; + text-decoration: none; + } + } +} + /* Contributors list on release pages * see /release/Plack for example */