Skip to content

Commit

Permalink
fix by #46
Browse files Browse the repository at this point in the history
  • Loading branch information
yscoder committed Jun 30, 2016
1 parent 3b294a0 commit 11655b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 30 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ menu:
target: _blank
link:
text: 测试
url: /
url: /404

rss: /atom.xml

Expand Down
5 changes: 3 additions & 2 deletions layout/_partial/menu.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
<ul class="nav flex-col">
<%
var menuItem, isActive = function(item) {
return (path === 'index.html' && item === 'home') || (is_archive() && item === 'archives') || ( (is_tag() || page.type === 'tags') && item === 'tags');
var url = url_for(item.url);
return (url === '/' ? '' : url) + '/index.html' === '/' + page.path;
};
for (var i in theme.menu) {
menuItem = theme.menu[i];
%>
<li class="waves-block waves-effect<% if(isActive(i)){ %> active<% } %>">
<li class="waves-block waves-effect<% if(isActive(menuItem)){ %> active<% } %>">
<a href="<%- url_for(menuItem.url) %>" <% if(menuItem.target){ %>target="_blank"<% } %> >
<i class="icon icon-lg icon-<%= i %>"></i>
<%=(menuItem.text || _.startCase(i)) %>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "hexo-theme-material-indigo",
"version": "0.4.2",
"version": "0.4.3",
"private": true
}
31 changes: 5 additions & 26 deletions source/css/_partial/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,6 @@
font-size: 13px;
}

.social {
margin: 2em 0 0;

a {
opacity: .8;

&.weibo {
color: #DC5442;
}

&.github {
color: #363F45;
}

&.rss {
color: #FF9800;
}

&:hover {
opacity: 1;
}

}

}

.nav {
margin: 0;
Expand All @@ -106,7 +81,10 @@
padding: 0 @menuPadding;

.icon {
padding-right: @menuPadding*1.5;
position: absolute;
top: 0;
left: @menuPadding;
line-height: @navH;
}

&:hover,
Expand All @@ -124,6 +102,7 @@

a {
display: block;
padding-left: @menuPadding*2.4;
height: @navH;
font-weight: 500;
color: @secondaryTextColor;
Expand Down

0 comments on commit 11655b8

Please sign in to comment.