Skip to content

Commit

Permalink
Merge pull request #1467 from wchristian/top_menu_icons
Browse files Browse the repository at this point in the history
add icons to the top menu to increase discoverability
  • Loading branch information
oalders committed Mar 11, 2015
2 parents a7fe9ab + 1efd7b0 commit d8f274b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Binary file added root/static/icons/metacpan-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions root/static/less/nav.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
> li > a {
text-shadow: none;
padding: 5px 10px 5px;
white-space: nowrap;
&:hover {
border-top: 2px solid lighten(@linkColor, 20%);
position: relative;
Expand Down
16 changes: 13 additions & 3 deletions root/wrapper.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
<%- menu = [{
title = "Home",
path = ["/", "/search"]
path = ["/", "/search"],
image = "/static/icons/metacpan-icon.png",
},
{
title = "Recent",
path = ["/recent"]
path = ["/recent"],
icon = "history",
},
{
title = "FAQ",
path = ["/about/faq"],
class = 'hidden-xs',
icon = "question",
},
{
title = "Github Issues",
path = ["https://github.com/CPAN-API/metacpan-web/issues"],
class = 'hidden-xs',
icon = "github-alt",
},
{
title = "News",
path = ["/news"],
class = 'hidden-xs',
icon = "rss",
},
{
title = "Lab",
path = ["/lab"],
class = 'hidden-xs',
icon = "rocket",
},
] %>
<!DOCTYPE HTML>
Expand Down Expand Up @@ -99,7 +105,11 @@
<%- ELSE %>
<li class="<% item.class %>">
<%- END %>
<a href="<% item.path.0 %>"><% item.title %></a>
<a href="<% item.path.0 %>">
<%- IF item.icon %><i class="fa fa-<% item.icon %>"></i><% END -%>
<%- IF item.image %><img src="<% item.image %>" /><% END -%>
<%- item.title -%>
</a>
</li>
<%- END %>
</ul>
Expand Down

0 comments on commit d8f274b

Please sign in to comment.