diff --git a/_config.yml b/_config.yml index b3cceb27..2f34aae7 100644 --- a/_config.yml +++ b/_config.yml @@ -15,6 +15,9 @@ menu: url: /archives tags: url: /tags + th-list: + text: Categories + url: /categories github: url: https://github.com/yscoder target: _blank @@ -67,6 +70,9 @@ hideMenu: true toc: list_number: true # 是否显示数字排序 +#文章页版权声明内容,hexo中所有变量及辅助函数等均可调用,具体请查阅 hexo.io +copyright: 这里写留言或版权声明:<%- url %> + #站长统计,如要开启,输入CNZZ站点id,如 cnzz: 1255152447 cnzz: false diff --git a/layout/_partial/archive.ejs b/layout/_partial/archive.ejs index 821e53d8..2934784a 100644 --- a/layout/_partial/archive.ejs +++ b/layout/_partial/archive.ejs @@ -1,11 +1,14 @@ -
-
- <%- partial('post/date', { post: post, date_format: 'MMM D'}) %> -
-
+
+
+ <%- partial('post/title', { - hasLink: true - }) %> - <%- partial('post/tag') %> -
-
\ No newline at end of file + hasLink: true + }) %> +
+ <%- partial('post/tag') %> +
+ + \ No newline at end of file diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 06196537..e6d4cea4 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -3,13 +3,13 @@ -
<%=page.title || config.title %>
+
<%=title %>
<% if(theme.search){ %>
- + @@ -22,15 +22,26 @@ <% } %>
-
-
-

<%=page.title || config.title %>

-
- <% if(page.date && !page.noDate){ %> - <%- partial('post/head-meta') %> - <% } else { %> - <%=config.subtitle %> - <% }%> -
-
+
+ +
+

<%=title %>

+ + <% if(is_home()) { %> +
+ + <% if(subTitle){ %> + <%=config.subtitle %> + <% } else { %> + <%- partial('post/head-meta') %> + <% }%> +
+ <% } %> + +
+ + <%- partial('tags-bar', { + type: hdClass.split('-')[0] + }) %> +
diff --git a/layout/_partial/index-item.ejs b/layout/_partial/index-item.ejs index 99d0accb..570e1a37 100644 --- a/layout/_partial/index-item.ejs +++ b/layout/_partial/index-item.ejs @@ -1,24 +1,28 @@
- <%- partial('post/title', { hasLink: true }) %> + class="article-card article-type-<%= post.layout %>" itemprop="blogPost"> + + <%- partial('post/title', { hasLink: true }) %> +
<% if(theme.excerpt_render) { %> <%- post.excerpt || post.content %> - <% } else { - var tagReg = /<(S*?)[^>]*>.*?|<.*? \/>/gm; - %> - <%- post.excerpt ? post.excerpt.replace(tagReg, ' ') : post.content.replace(tagReg, ' ').substring(0, theme.excerpt_length) %> + <% } else { %> + <%- post.excerpt ? strip_html(post.excerpt) : truncate(strip_html(post.content), { + length: theme.excerpt_length + }) %> <% } %> <%-theme.excerpt_link%>
- <%- partial('post/tag') %> +
diff --git a/layout/_partial/menu.ejs b/layout/_partial/menu.ejs index 98333b9c..ea124701 100644 --- a/layout/_partial/menu.ejs +++ b/layout/_partial/menu.ejs @@ -1,35 +1,37 @@ -
- - - -
-
- -
-
<%- config.author %>
- <%- mail_to(theme.email, theme.email, {class: 'mail'}) %> -
+
+ \ No newline at end of file diff --git a/layout/_partial/paginator.ejs b/layout/_partial/paginator.ejs new file mode 100644 index 00000000..ae7c3456 --- /dev/null +++ b/layout/_partial/paginator.ejs @@ -0,0 +1,10 @@ +<% if (page.total > 1){ %> + +<% } %> \ No newline at end of file diff --git a/layout/_partial/post.ejs b/layout/_partial/post.ejs index 8fa279a9..8a8e1b1f 100644 --- a/layout/_partial/post.ejs +++ b/layout/_partial/post.ejs @@ -1,49 +1,65 @@
- -
- +
+

<%- post.title %>

+ +
+ <%- post.content %> +
+ +
+
+ <%- _.template(theme.copyright)(locals) %> +
+ +
-
+ <% if(theme.reward){ %> +
+ +
+ <% } %> -
- <%- post.content %> + -
-
\ No newline at end of file +
+ + <%- partial('post/nav') %> + + <%- partial('post/comment') %> + + + diff --git a/layout/_partial/post/nav.ejs b/layout/_partial/post/nav.ejs index 4aa095b1..b7f4e27d 100644 --- a/layout/_partial/post/nav.ejs +++ b/layout/_partial/post/nav.ejs @@ -1,9 +1,9 @@ <% if (post.prev || post.next){ %> -