-
<% INCLUDE mobile/toolbar-search-form.html %>
diff --git a/root/recent.html b/root/recent.html
index 527134ebf5d..1c32d783e9c 100644
--- a/root/recent.html
+++ b/root/recent.html
@@ -5,6 +5,12 @@
%>
+
<%-
MoY = [undef, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
DoW = [undef, "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
diff --git a/root/static/css/style.css b/root/static/css/style.css
index 55d204aa49c..139cc7b3227 100644
--- a/root/static/css/style.css
+++ b/root/static/css/style.css
@@ -338,4 +338,8 @@ div.qtip-github table th {
.news_feed {
float: right;
+}
+
+#icon-rss {
+ background: url('/static/icons/icon-rss.png');
}
\ No newline at end of file
diff --git a/root/static/icons/icon-rss.png b/root/static/icons/icon-rss.png
new file mode 100644
index 00000000000..3a0529e293f
Binary files /dev/null and b/root/static/icons/icon-rss.png differ
diff --git a/root/static/icons/rss_feed.png b/root/static/icons/rss_feed.png
new file mode 100644
index 00000000000..cde1b070e7e
Binary files /dev/null and b/root/static/icons/rss_feed.png differ
diff --git a/root/static/less/account.less b/root/static/less/account.less
index 7f8a9f4e06e..930f6b231e5 100644
--- a/root/static/less/account.less
+++ b/root/static/less/account.less
@@ -9,7 +9,6 @@
padding-left: 0px !important;
}
-
#account-profile {
.form-group:after {
clear: both !important;
diff --git a/root/static/less/author.less b/root/static/less/author.less
index e1068c980be..c875f7d0b34 100644
--- a/root/static/less/author.less
+++ b/root/static/less/author.less
@@ -64,3 +64,29 @@
}
}
}
+
+#feed_subscription {
+ &.page-header {
+ margin: 0 0 5px;
+ font-weight: bold;
+ margin-left: 5px;
+ }
+
+ p {
+ font-size: 16px;
+ display: inline;
+ }
+
+ a {
+ display: inline;
+ width: 20px;
+ height: 20px;
+ padding-right: 20px;
+ float: right;
+ }
+
+ .fa {
+ float: right;
+ margin-right: -15px;
+ }
+}
diff --git a/root/static/less/button.less b/root/static/less/button.less
index ca3372e8516..325a9c7daf2 100644
--- a/root/static/less/button.less
+++ b/root/static/less/button.less
@@ -18,16 +18,16 @@
font-size: 14px;
line-height: 20px;
margin-bottom: 0;
+ padding: 4px 12px;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
-
-
+
&:hover,
&:focus {
- background-color: #e6e6e6;
- text-decoration: none;
- background-image: none;
+ background-color: #e6e6e6;
+ text-decoration: none;
+ background-image: none;
}
}
diff --git a/root/static/less/nav-list.less b/root/static/less/nav-list.less
index f93fa212474..9409d187c47 100644
--- a/root/static/less/nav-list.less
+++ b/root/static/less/nav-list.less
@@ -48,6 +48,7 @@ ul.nav-list.box-right {
.nav > li {
line-height: 20px;
+ width: inherit;
}
.nav-list > li > a,
@@ -100,6 +101,6 @@ ul.nav-list.box-right {
line-height: 25px;
}
-#pod-navlist li {
+.left-toolbar li {
width: 180px;
-}
+}
\ No newline at end of file
diff --git a/root/static/less/responsive.less b/root/static/less/responsive.less
index 42e13bdcea8..74dce4b5697 100644
--- a/root/static/less/responsive.less
+++ b/root/static/less/responsive.less
@@ -136,6 +136,7 @@
.home input.home-search-input {
position: relative;
+ right: 5px;
width: 93%;
font-size: 1.4em;
}
diff --git a/root/static/less/style.less b/root/static/less/style.less
index 113555fcaa9..6b6b9407bee 100644
--- a/root/static/less/style.less
+++ b/root/static/less/style.less
@@ -35,17 +35,17 @@
@screen-sm-min: (@screen-xs + 1);
h1, .h1, h2, .h2, h3, .h3 {
- line-height: 35px;
+ line-height: 35px;
}
.black {
- color: @black;
+ color: @black;
}
.border-radius(@radius) {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
}
.collapse .navbar-collapse {
@@ -61,10 +61,15 @@ h1, .h1, h2, .h2, h3, .h3 {
input#search-input {
font-size: 16px;
+ height: 30px;
+}
+
+.home {
+ padding: 40px 0 50px;
}
.home .btn {
- font-size: 1.2em;
+ font-size: 1.2em;
}
.home input {
@@ -125,7 +130,7 @@ body {
}
#map {
- margin-right: 200px !important;
+ margin-right: 200px !important;
}
#map img {
@@ -133,72 +138,77 @@ body {
}
.smaller {
- font-size: 1.0em;
- line-height: 2.5em;
+ font-size: 1.0em;
+ line-height: 2.5em;
}
.btn.btn-slidepanel {
- border-radius: 2px;
- padding: 1px 4px 5px 4px;
- margin-top: 3px;
+ border-radius: 2px;
+ padding: 1px 4px 5px 4px;
+ margin-top: 3px;
}
.table.tablesorter th {
- padding-right: 20px;
+ padding-right: 20px;
}
.container-top {
- padding: 0 10px 10px 10px;
+ padding: 0 10px 10px 10px;
}
.head-small-logo {
- width: 200px;
+ width: 200px;
}
.main-content {
- margin-bottom: 60px;
- margin-top: 25px;
- line-height: 20px;
+ margin-bottom: 60px;
+ margin-top: 25px;
+ line-height: 20px;
}
#lab {
- margin-top: -25px;
- margin-bottom: 50px;
+ margin-top: -25px;
+ margin-bottom: 50px;
}
.tool-bar-form {
- margin-top: 2px;
- margin-bottom: 10px;
- height: 30px;
- width: 165px !important;
+ margin-top: 2px;
+ margin-bottom: 10px;
+ height: 30px;
+ width: 165px !important;
}
li button.dependencies-graph {
- padding: 0;
- font-size: inherit;
- background: none !important;
- background-image: none;
- border: none;
- color: @linkColor !important;
+ padding: 0;
+ font-size: inherit;
+ background: none !important;
+ background-image: none;
+ border: none;
+ color: @linkColor !important;
}
.top-content {
- padding-bottom: 10px;
+ padding-bottom: 10px;
}
.row-fluid {
- padding-bottom: 10px;
+ padding-bottom: 10px;
}
.footer {
- .sponsor-logo {
- border: none;
- float: right;
- width: 90%;
- padding: 0px;
- }
+ .sponsor-logo {
+ border: none;
+ float: right;
+ width: 90%;
+ padding: 0px;
+ }
}
.ui-tooltip-titlebar {
- height: 25px !important;
+ height: 25px !important;
}
+
+#rss-subscription {
+ width: 1.2em;
+ font-size: 1.1em;
+}
\ No newline at end of file
diff --git a/t/controller/feed.t b/t/controller/feed.t
index c19f77afbbc..8080630c074 100644
--- a/t/controller/feed.t
+++ b/t/controller/feed.t
@@ -3,6 +3,7 @@ use warnings;
use Test::More;
use MetaCPAN::Web::Test;
use Try::Tiny;
+use MetaCPAN::Web::Controller::Feed;
my @tests
= qw(/feed/recent /feed/author/PERLER /feed/distribution/Moose /feed/news);
@@ -52,4 +53,66 @@ sub valid_xml {
return $tx;
}
+my $feed = MetaCPAN::Web::Controller::Feed->new();
+
+subtest 'get correct author favorite data format' => sub {
+ my $favorite_data = [
+ {
+ author => 'DOLMEN',
+ date => '2013-07-05T14:41:26.000Z',
+ distribution => 'Git-Sub',
+ }
+ ];
+
+ my $entry
+ = $feed->_format_favorite_entries( 'PERLHACKER', $favorite_data );
+ is(
+ $entry->[0]->{abstract},
+ 'PERLHACKER ++ed Git-Sub from DOLMEN',
+ 'get correct release abstract'
+ );
+ is(
+ $entry->[0]->{link},
+ 'https://metacpan.org/release/Git-Sub',
+ 'get correct release link'
+ );
+ is(
+ $entry->[0]->{name},
+ 'PERLHACKER ++ed Git-Sub',
+ 'get correct release title'
+ );
+ is( $entry->[0]->{author}, 'PERLHACKER', 'get correct author name' );
+};
+
+subtest 'get correct author release data format' => sub {
+ my $data = [
+ {
+ abstract => 'Easy OO access to the FreshBooks.com API',
+ author => 'OALDERS',
+ date => '2014-05-03T03:06:44.000Z',
+ distribution => 'Net-FreshBooks-API',
+ name => 'Net-FreshBooks-API-0.24',
+ status => 'latest',
+ }
+ ];
+
+ my $entry = $feed->_format_release_entries($data);
+ is(
+ $entry->[0]->{abstract},
+ 'Easy OO access to the FreshBooks.com API',
+ 'get correct release abstract'
+ );
+ is(
+ $entry->[0]->{link},
+ 'https://metacpan.org/release/OALDERS/Net-FreshBooks-API-0.24',
+ 'get correct release link'
+ );
+ is(
+ $entry->[0]->{name},
+ 'OALDERS has released Net-FreshBooks-API-0.24',
+ 'get correct release title'
+ );
+ is( $entry->[0]->{author}, 'OALDERS', 'get correct author name' );
+};
+
done_testing;