Skip to content

Commit

Permalink
优化一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
secret committed Apr 29, 2018
1 parent fd165ec commit 9b9a8eb
Show file tree
Hide file tree
Showing 14 changed files with 2,841 additions and 118 deletions.
7 changes: 7 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ social:
GitHub: isecret
Coding: isecret

# 底部字数统计 需安装 hexo-wordcount 插件
footer_wordcount: enabled

# 底部版权补充
footer_expand: 'Hosted by <a href="https://pages.coding.me">Coding Pages</a>, '

# 站点微缩图
favicon: /favicon.ico

Expand All @@ -41,6 +47,7 @@ tencent_analytics: 63006715
# CSS 样式表路径
stylesheets:
- //fonts.openapi.link/css?family=Lato:300,300italic,400,400italic,700,700italic&amp;subset=latin,latin-ext
- /css/font-awesome.min.css
- /css/gitment.css
- /css/hola.css

Expand Down
10 changes: 8 additions & 2 deletions layout/category.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@
<div class="pagination noborder">
<% if (page.next){ %>
<div class="nav-next nav-item">
<a href="/page/<%=page.next%>">较旧的文章</a>
<a href="/page/<%=page.next%>">
<i class="fa fa-angle-left"></i>
<span>较旧的文章</span>
</a>
</div>
<% } %>
<% if (page.prev){ %>
<div class="nav-prev nav-item">
<% if (page.prev == 1) { %>
<a href="/">较新的文章</a>
<% } else { %>
<a href="/page/<%=page.prev%>">较新的文章</a>
<a href="/page/<%=page.prev%>">
<span>较新的文章</span>
<i class="fa fa-angle-right"></i>
</a>
<% } %>
</div>
<% } %>
Expand Down
10 changes: 8 additions & 2 deletions layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@
<div class="pagination noborder">
<% if (page.next){ %>
<div class="nav-next nav-item">
<a href="/page/<%=page.next%>">较旧的文章</a>
<a href="/page/<%=page.next%>">
<i class="fa fa-angle-left"></i>
<span>较旧的文章</span>
</a>
</div>
<% } %>
<% if (page.prev){ %>
<div class="nav-prev nav-item">
<% if (page.prev == 1) { %>
<a href="/">较新的文章</a>
<% } else { %>
<a href="/page/<%=page.prev%>">较新的文章</a>
<a href="/page/<%=page.prev%>">
<span>较新的文章</span>
<i class="fa fa-angle-right"></i>
</a>
<% } %>
</div>
<% } %>
Expand Down
31 changes: 25 additions & 6 deletions layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ if (is_home()) pageTitle = config.title;
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
<title><%=pageTitle%></title>
<% if (page.keywords !== undefined) { %>
<meta name="keywords" content="<%=page.keywords%>" />
<% } else if (page.tags !== undefined && page.tags.length > 0) { %>
<meta name="keywords" content="<% page.tags.forEach(function(tag) { %><%=tag.name%>,<% }); %>" />
<% } else if (theme.keywords !== undefined) { %>
<meta name="keywords" content="<%=theme.keywords%>" />
<% } %>
<link rel="shortcut icon" type="image/x-icon" href="<%=theme.favicon%>">
<%-open_graph()%>
<title><%=pageTitle%></title>
<link rel="shortcut icon" type="image/x-icon" href="<%=theme.favicon%>">
<% if (theme.stylesheets !== undefined && theme.stylesheets.length > 0) { %>
<% theme.stylesheets.forEach(function(url) { %>
<link rel="stylesheet" href="<%=url%>">
Expand Down Expand Up @@ -71,10 +71,29 @@ if (is_home()) pageTitle = config.title;
</div>

<div class="footer-outer">
<div class="footer-author">
© <%=theme.since%> - <%=time(new Date(),'Y')%> <%=config.author%>
<div class="footer-items">
<span class="footer-copyright">
<i class="fa fa-copyright"></i>
</span>
<span class="footer-year">
<%=theme.since%> - <%=time(new Date(),'Y')%>
</span>
<span class="footer-author">
<%=config.author%>
</span>
<%if (theme.footer_wordcount) { %>
<span class="footer-wordcount">
<i class="fa fa-pencil footer-icon"></i>
Has <%=totalcount(site)%> words.
</span>
<% } %>
</div>
<div class="footer-inner">
<span class="footer-other">
<%-theme.footer_expand%>
Proudly powered by <a href="http://hexo.io">Hexo</a> and Theme by <a href="https://github.com/isecret/Hola">Hola</a>.
</span>
</div>
<div class="footer-inner">由 <a href="http://hexo.io">Hexo</a> 强力驱动 | 主题 - <a href="https://github.com/isecret/Hola">Hola</a></div>
</div>
</div>
<% if (theme.scripts !== undefined && theme.scripts.length > 0) { %>
Expand Down Expand Up @@ -104,7 +123,7 @@ if (is_home()) pageTitle = config.title;
})
.then(function (data) {
var hitokoto = document.getElementById('hitokoto');
hitokoto.innerText = '' + data.hitokoto + '——' + data.from;
hitokoto.innerText = '' + data.hitokoto + '——' + '' + data.from + '';
})
.catch(function (err) {
console.error(err);
Expand Down
10 changes: 8 additions & 2 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@
<div class="pagination">
<% if (page.next){ %>
<div class="nav-next nav-item">
<a href="<%- url_for(page.next.path) %>"><%=page.next.title %></a>
<a href="<%- url_for(page.next.path) %>">
<i class="fa fa-angle-left"></i>
<span><%=page.next.title%></span>
</a>
</div>
<% } %>
<% if (page.prev){ %>
<div class="nav-prev nav-item">
<a href="<%- url_for(page.prev.path) %>"><%=page.prev.title %></a>
<a href="<%- url_for(page.prev.path) %>">
<span><%=page.prev.title%></span>
<i class="fa fa-angle-right"></i>
</a>
</div>
<% } %>
</div>
Expand Down
10 changes: 8 additions & 2 deletions layout/tag.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@
<div class="pagination noborder">
<% if (page.next){ %>
<div class="nav-next nav-item">
<a href="/page/<%=page.next%>">较旧的文章</a>
<a href="/page/<%=page.next%>">
<i class="fa fa-angle-left"></i>
<span>较旧的文章</span>
</a>
</div>
<% } %>
<% if (page.prev){ %>
<div class="nav-prev nav-item">
<% if (page.prev == 1) { %>
<a href="/">较新的文章</a>
<% } else { %>
<a href="/page/<%=page.prev%>">较新的文章</a>
<a href="/page/<%=page.prev%>">
<span>较新的文章</span>
<i class="fa fa-angle-right"></i>
</a>
<% } %>
</div>
<% } %>
Expand Down
4 changes: 4 additions & 0 deletions source/css/font-awesome.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 9b9a8eb

Please sign in to comment.