Skip to content

Commit

Permalink
Migrate to Bootstrap 3.1.1 and introduce Font Awesome
Browse files Browse the repository at this point in the history
  • Loading branch information
oiami committed Jul 28, 2014
1 parent e3d4f13 commit e11081f
Show file tree
Hide file tree
Showing 119 changed files with 9,629 additions and 5,718 deletions.
1 change: 1 addition & 0 deletions app.psgi
Expand Up @@ -110,6 +110,7 @@ $app = Plack::Middleware::Assets->wrap(
bootstrap/bootstrap-collapse
bootstrap/bootstrap-modal
bootstrap/bootstrap-tooltip
bootstrap/bootstrap-affix
bootstrap-slidepanel
)
],
Expand Down
2 changes: 1 addition & 1 deletion root/account/profile.html
@@ -1,7 +1,7 @@
<% PROCESS inc/account-bar.html %>
<div class="content account-settings">
<% IF no_profile -%>
<div class="alert alert-error">
<div class="alert alert-danger">
<h4 class="alert-heading">Error</h4>
In order to change your profile you have to <a href="<% oauth_prefix %>&amp;choice=pause" onclick="return logInPAUSE(this)">connect your account to PAUSE</a>.
</div>
Expand Down
289 changes: 150 additions & 139 deletions root/author.html
@@ -1,145 +1,156 @@
<% title = author.name _ " (" _ author.pauseid _ ")"; rss = 'author/' _ author.pauseid %>
<% twitter_card_inc = 'inc/twitter/author.html' %>
<ul class="nav nav-list slidepanel">
<li class="visible-phone search">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q"><input type="submit" class="hidden">
</form>
</li>
<li class="hidden-phone"><% INCLUDE inc/author-pic.html author = author %></li>
<li class="nav-header">Email</li>
<li>
<div>
<a href="mailto:<% author.email.0 %>" class="ellipsis" title="<%author.email.0 %>"><% author.email.0 %></a>
</div>
</li>
<%- IF author.website.size %>
<li class="nav-header">Website</li>
<% FOREACH website IN author.website %>
<li>
<div>
<a rel="me" href="<% website %>" title="<% website %>" target="_blank"><% website.decode_punycode %></a>
</div>
</li>
<%- END; END %>
<%
IF author.profile.size -%>
<li class="nav-header">Profiles</li>
<div class="user-profiles">
<%-
FOREACH profile IN author.profile.sort('name');
IF profiles.${profile.name} %>
<a rel="me" href="<% profiles.${profile.name}.url.replace('%s', profile.id) %>" target="_blank" title="<% profile.name %> - <% profile.id%>">
<img src="/static/images/profile/<% profile.name %>.png" width=16 height=16 alt="<% profile.name %>">
</a>
<% END; END %></div><% END %>
<% IF author.country || author.city || author.region %>
<li class="nav-header">Location</li>
<% IF author.country %>
<img src="/static/images/flag/<% author.country.lower %>.png" alt="<% author_country_name %>" title="<% author_country_name %>" width=16 height=11> &nbsp;
<%- END %>
<%- author.city; %><% IF author.city && author.region %>, <% END %><%- author.region %><br>
<% END %>
<% IF author.blog.size %>
<li class="nav-header">Blog</li>
<% FOREACH blog IN author.blog -%>
<li>
<div>
<%- IF blog.feed %>
<a href="<% blog.feed %>" target="_blank">
<img src="/static/images/profile/feed.png" width=16 height=16 style="float: right">
</a>
<li class="hidden-phone"><% INCLUDE inc/author-pic.html author = author %></li>
<li class="visible-xs">
<div>
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q" class="form-control tool-bar-form">
<input type="submit" class="hidden">
</form>
</div>
</li>
<li class="nav-header">Email</li>
<li>
<div>
<a href="mailto:<% author.email.0 %>" class="ellipsis" title="<%author.email.0 %>"><% author.email.0 %></a>
</div>
</li>
<%- IF author.website.size %>
<li class="nav-header">Website</li>
<% FOREACH website IN author.website %>
<li>
<div>
<a rel="me" href="<% website %>" title="<% website %>" target="_blank"><% website.decode_punycode %></a>
</div>
</li>
<%- END; END %>
<%
IF author.profile.size -%>
<li class="nav-header">Profiles</li>
<div class="user-profiles">
<%-
FOREACH profile IN author.profile.sort('name');
IF profiles.${profile.name} %>
<a rel="me" href="<% profiles.${profile.name}.url.replace('%s', profile.id) %>" target="_blank" title="<% profile.name %> - <% profile.id%>">
<img src="/static/images/profile/<% profile.name %>.png" width=16 height=16 alt="<% profile.name %>">
</a>
<% END; END %>
</div>
<% END %>
<% IF author.country || author.city || author.region %>
<li class="nav-header">Location</li>
<% IF author.country %>
<img src="/static/images/flag/<% author.country.lower %>.png" alt="<% author_country_name %>" title="<% author_country_name %>" width=16 height=11> &nbsp;
<%- END %>
<a href="<% blog.url %>" title="<% blog.url %>" target="_blank" class="ellipsis" style="width: 140px">
<% blog.url.replace('^https?://', '') %>
</a>
</div>
</li>
<% END; END %>
<% IF author.donation.size; FOREACH donate IN author.donation %>
<% IF donate.name == 'paypal' && donate.id %>
<br>
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="<% donate.id %>">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Donation to CPAN Author <% author.pauseid %> via MetaCPAN">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" style="width: auto">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form></center>
<% ELSIF donate.name == 'wishlist' && donate.id %>
<div style="text-align: center"><a rel="me" href="<% donate.id %>" target="_blank">Wishlist</a></div>
<% ELSIF donate.name == 'flattr' && donate.id %>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];

s.type = 'text/javascript';
s.async = true;
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';

t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<div style="text-align: center">
<a class="FlattrButton" style="display:none;"
title="<% author.name %> (<% author.pauseid %>) on MetaCPAN"
rev="flattr;uid:<% donate.id %>;button:compact;category:software;tags:perl,cpan,metacpan;"
href="https://metacpan.org/author/<% author.pauseid %>"
language="en_GB" >
<% author.name %> is <% author.pauseid %> on CPAN, the Comprehensive Perl Archive Network.
</a>
</div>
<% END; END; END %>
<%
i = 0;
counter = 1;
aggregated = [];
latest = releases[0];
FOREACH release IN releases;
IF release.date.dt_canonical > latest.date.dt_canonical; latest = release; END;
IF last == release.distribution; counter = counter + 1; NEXT;
ELSE; last = release.distribution; counter = 1; END;
UNLESS release.name; NEXT; END;
aggregated.push(release);
END %>
<li class="nav-header">Activity</li>
<% INCLUDE inc/activity.html query = 'author=' _ author.pauseid %>
<% INCLUDE inc/release-latest.html %>
<li class="nav-header">Tools</li>
<li>Search distributions:<br>
<form action="/search">
<input type="hidden" name="q" value="author:<% author.pauseid %>">
<input type="text" name="q" style="width: 160px">
<input type="submit" style="display: none">
</form>
</li>
<li>
<div>
<a href="http://cpantesters.org/author/<% author.pauseid.substr(0,1) %>/<% author.pauseid %>.html">CPANTesters Reports</a>
<a href="http://matrix.cpantesters.org/?author=<% author.pauseid %>" title="Matrix"><img src="/static/icons/grid.png" width="16" height="16" style="vertical-align: bottom; padding: 1px"></a>
</div>
</li>
<li>
<div>
<a href="http://explorer.metacpan.org/?url=/author/<% author.pauseid %>">MetaCPAN Explorer</a>
</div>
</li>
<li>
<div>
<a href="http://cpan.metacpan.org/authors/id/<% author.pauseid.substr(0,1) %>/<% author.pauseid.substr(0,2) %>/<% author.pauseid %>">Browse CPAN directory</a>
</div>
</li>
<%- author.city; %><% IF author.city && author.region %>, <% END %><%- author.region %><br>
<% END %>
<% IF author.blog.size %>
<li class="nav-header">Blog</li>
<% FOREACH blog IN author.blog -%>
<li>
<div>
<%- IF blog.feed %>
<a href="<% blog.feed %>" target="_blank">
<img src="/static/images/profile/feed.png" width=16 height=16 style="float: right">
</a>
<%- END %>
<a href="<% blog.url %>" title="<% blog.url %>" target="_blank" class="ellipsis" style="width: 140px">
<% blog.url.replace('^https?://', '') %>
</a>
</div>
</li>
<% END; END %>
<% IF author.donation.size; FOREACH donate IN author.donation %>
<% IF donate.name == 'paypal' && donate.id %>
<br>
<center>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="<% donate.id %>">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Donation to CPAN Author <% author.pauseid %> via MetaCPAN">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" style="width: auto">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</center>
<% ELSIF donate.name == 'wishlist' && donate.id %>
<div style="text-align: center"><a rel="me" href="<% donate.id %>" target="_blank">Wishlist</a></div>
<% ELSIF donate.name == 'flattr' && donate.id %>
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];

s.type = 'text/javascript';
s.async = true;
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';

t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<div style="text-align: center">
<a class="FlattrButton" style="display:none;"
title="<% author.name %> (<% author.pauseid %>) on MetaCPAN"
rev="flattr;uid:<% donate.id %>;button:compact;category:software;tags:perl,cpan,metacpan;"
href="https://metacpan.org/author/<% author.pauseid %>"
language="en_GB" >
<% author.name %> is <% author.pauseid %> on CPAN, the Comprehensive Perl Archive Network.
</a>
</div>
<% END; END; END %>
<%
i = 0;
counter = 1;
aggregated = [];
latest = releases[0];
FOREACH release IN releases;
IF release.date.dt_canonical > latest.date.dt_canonical; latest = release; END;
IF last == release.distribution; counter = counter + 1; NEXT;
ELSE; last = release.distribution; counter = 1; END;
UNLESS release.name; NEXT; END;
aggregated.push(release);
END %>
<li class="nav-header">Activity</li>
<% INCLUDE inc/activity.html query = 'author=' _ author.pauseid %>
<% INCLUDE inc/release-latest.html %>
<li class="nav-header">Tools</li>
<li>
Search distributions:<br>
</li>
<li class="toolbar-search-form">
<form action="/search">
<input type="hidden" name="q" value="author:<% author.pauseid %>">
<input type="text" name="q" class="form-control tool-bar-form">
<input type="submit" style="display: none">
</form>
</li>
<li>
<div>
<a href="http://cpantesters.org/author/<% author.pauseid.substr(0,1) %>/<% author.pauseid %>.html">CPANTesters Reports</a>
<a href="http://matrix.cpantesters.org/?author=<% author.pauseid %>" title="Matrix">
<img src="/static/icons/grid.png" width="16" height="16" style="vertical-align: bottom; padding: 1px">
</a>
</div>
</li>
<li>
<div>
<a href="http://explorer.metacpan.org/?url=/author/<% author.pauseid %>">MetaCPAN Explorer</a>
</div>
</li>
<li>
<div>
<a href="http://cpan.metacpan.org/authors/id/<% author.pauseid.substr(0,1) %>/<% author.pauseid.substr(0,2) %>/<% author.pauseid %>">Browse CPAN directory</a>
</div>
</li>
</ul>

<!-- End left content -->
<div class="content">
<div class="visible-phone inline-author-pic"><% INCLUDE inc/author-pic.html author = author %></div>
<% INCLUDE inc/release-table.html releases = aggregated, header = 1, tablesorter = 1, table_id = "author_releases" %>
<% INCLUDE inc/favorite-table.html favorites = faves, author = 1 tablesorter = 1 %>

</div>
<div class="visible-phone inline-author-pic"><% INCLUDE inc/author-pic.html author = author %></div>
<% INCLUDE inc/release-table.html releases = aggregated, header = 1, tablesorter = 1, table_id = "author_releases" %>
<% INCLUDE inc/favorite-table.html favorites = faves, author = 1 tablesorter = 1 %>
</div>
11 changes: 7 additions & 4 deletions root/browse.html
Expand Up @@ -7,10 +7,13 @@
</big></strong><br><br>

<ul class="nav nav-list slidepanel">
<li class="visible-phone search">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q"><input type="submit" class="hidden">
</form>
<li class="visible-xs">
<div>
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q" class="form-control tool-bar-form">
<input type="submit" class="hidden">
</form>
</div>
</li>
<li class="nav-header">Tools</li>
<li><div><a href="/release/<% author %>/<% release %>/">Release Info</a></div></li>
Expand Down
11 changes: 7 additions & 4 deletions root/diff.html
Expand Up @@ -21,10 +21,13 @@
file.path = parts.join("/"); END -%>

<ul class="nav nav-list slidepanel">
<li class="visible-phone search">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q"><input type="submit" class="hidden">
</form>
<li class="visible-xs">
<div>
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q" class="form-control tool-bar-form">
<input type="submit" class="hidden">
</form>
</div>
</li>
<li class="nav-header">Tools</li>
<li>
Expand Down
9 changes: 5 additions & 4 deletions root/home.html
Expand Up @@ -2,11 +2,12 @@
<div align="center" class="home">
<a href="/" class="big-logo" alt="meta::cpan"></a>
<form action="/search">
<input type="text" name="q" size="41" autofocus="autofocus" id="search-input" class="autofocus">
<br><br>
<button type="submit" class="btn">Search the CPAN</button>
<button type="submit" class="btn" name="lucky" value="1">I'm Feeling Lucky</button>
<input type="text" name="q" size="41" autofocus="autofocus" id="search-input" class="form-control home-search-input">
<br>
<button type="submit" class="btn search-btn">Search the CPAN</button>
<button type="submit" class="btn search-btn" name="lucky" value="1">I'm Feeling Lucky</button>
</form>
<br>
<%- hints = ['Press shift and enter if you are feeling lucky'] %>
<span style="color: #999" class="hidden-phone">Hint: <% hints.pick %></span>
<div id="link_to_task_kensho" class="alert alert-info" ><strong>New to CPAN?</strong> Maybe take a look at <a href="/pod/Task::Kensho">Task::Kensho!</a></div>
Expand Down
13 changes: 7 additions & 6 deletions root/inc/about-bar.html
@@ -1,10 +1,11 @@
<% UNLESS title; title = 'MetaCPAN About'; END %>
<div class="nav-list tabbable tabs-left about-bar slidepanel">
<ul class="nav nav-tabs">
<li class="visible-phone search">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q"><input type="submit" class="hidden">
</form>
<div class="list-group tabbable tabs-left about-bar slidepanel">
<ul class="nav nav-pills nav-stacked" data-spy="affix" data-offset-top="125" id="left-nav">
<li class="visible-xs">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q" class="form-control tool-bar-form">
<input type="submit" class="hidden">
</form>
</li>
<li<% IF req.action == 'about' %> class="active"<% END %>>
<a href="/about">About MetaCPAN</a>
Expand Down
9 changes: 2 additions & 7 deletions root/inc/account-bar.html
@@ -1,11 +1,6 @@
<% UNLESS title; title = 'MetaCPAN Account'; END %>
<div class="nav-list tabbable tabs-left account-bar slidepanel">
<ul class="nav nav-tabs">
<li class="visible-phone search">
<form action="<% IF req.uri.path == '/mirrors'; req.uri.path; ELSE; '/search'; END %>">
<input type="search" placeholder="Search" name="q"><input type="submit" class="hidden">
</form>
</li>
<div class="account-bar slidepanel" id="account-bar">
<ul class="nav nav-pills nav-stacked">
<%- UNLESS user.looks_human %>
<li<% IF req.action == 'account/turing' %> class="active"<% END %>>
<a href="/account/turing">Verify Account</a>
Expand Down

0 comments on commit e11081f

Please sign in to comment.